/* ========== PARTNER DETAIL MODAL ========== */

/* Overlay */
.partner-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 50, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.partner-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.partner-modal-container {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 
        0 32px 80px rgba(15, 82, 186, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(40px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: #0F52BA33 transparent;
}

.partner-modal-overlay.active .partner-modal-container {
    transform: translateY(0) scale(1);
}

.partner-modal-container::-webkit-scrollbar {
    width: 5px;
}
.partner-modal-container::-webkit-scrollbar-thumb {
    background: #0F52BA44;
    border-radius: 99px;
}

/* Hero / Media Section */
.pmodal-hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 24px 24px 0 0;
}

.pmodal-hero img,
.pmodal-hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Gradient overlay on hero */
.pmodal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 82, 186, 0.08) 0%,
        rgba(10, 18, 40, 0.55) 70%,
        rgba(10, 18, 40, 0.80) 100%
    );
}

/* Close button */
.pmodal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,0.35);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    line-height: 1;
}

.pmodal-close:hover {
    background: rgba(255,255,255,0.32);
    transform: scale(1.08) rotate(90deg);
}

/* Type badge on hero */
.pmodal-type-badge {
    position: absolute;
    bottom: 20px;
    left: 24px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1.5px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(10px);
}

/* Badge colors by type */
.pmodal-type-badge.badge-SDN  { background: rgba(59,130,246,0.75); color: #fff; }
.pmodal-type-badge.badge-SMPN,
.pmodal-type-badge.badge-SMP  { background: rgba(139,92,246,0.75); color: #fff; }
.pmodal-type-badge.badge-SMAN,
.pmodal-type-badge.badge-SMA  { background: rgba(245,158,11,0.85); color: #fff; }
.pmodal-type-badge.badge-SLBN { background: rgba(239,68,68,0.75); color: #fff; }
.pmodal-type-badge.badge-PERUSAHAAN { background: rgba(16,185,129,0.80); color: #fff; }

/* Hero name overlay */
.pmodal-hero-name {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    width: calc(100% - 48px);
    text-align: center;
}

.pmodal-hero-name h2 {
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.45rem);
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
    margin: 0;
}

/* Body */
.pmodal-body {
    padding: 28px 32px 36px;
}

/* Meta row */
.pmodal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.pmodal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f5ff;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    color: #1e3a6e;
    font-weight: 600;
    border: 1px solid #dbeafe;
}

.pmodal-meta-item i {
    color: #0F52BA;
    font-size: 0.9rem;
}

/* Section title */
.pmodal-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0F52BA;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pmodal-section-title::before {
    content: '';
    display: block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #0F52BA, #3b82f6);
    border-radius: 99px;
}

/* Projects grid */
.pmodal-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.pmodal-project-card {
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
    border: 1px solid #c7d7f8;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pmodal-project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 82, 186, 0.15);
}

.pmodal-project-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #0F52BA, #3b82f6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pmodal-project-card span {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e3a6e;
    line-height: 1.3;
}

/* Divider */
.pmodal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #dbeafe 20%, #dbeafe 80%, transparent);
    margin: 24px 0;
}

/* Stats row */
.pmodal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.pmodal-stat {
    text-align: center;
    padding: 18px 12px;
    background: #f8faff;
    border-radius: 16px;
    border: 1px solid #e0eaff;
}

.pmodal-stat-num {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0F52BA, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.pmodal-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

/* Map embed area */
.pmodal-map {
    border-radius: 16px;
    overflow: hidden;
    height: 180px;
    background: #e8f0fe;
    margin-bottom: 28px;
    border: 1px solid #c7d7f8;
    position: relative;
}

.pmodal-map iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.pmodal-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0F52BA;
    font-size: 0.85rem;
    font-weight: 600;
}

.pmodal-map-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Action buttons */
.pmodal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pmodal-btn {
    flex: 1;
    min-width: 140px;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s;
    border: none;
    text-decoration: none;
}

.pmodal-btn-primary {
    background: linear-gradient(135deg, #0F52BA 0%, #3b82f6 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(15, 82, 186, 0.3);
}

.pmodal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 82, 186, 0.4);
    color: #fff;
    text-decoration: none;
}

.pmodal-btn-secondary {
    background: #f0f5ff;
    color: #0F52BA;
    border: 1.5px solid #c7d7f8;
}

.pmodal-btn-secondary:hover {
    background: #dbeafe;
    transform: translateY(-2px);
}

.pmodal-btn-wa {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

.pmodal-btn-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
    color: #fff;
    text-decoration: none;
}

/* Company-specific styles */
.pmodal-company-highlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pmodal-company-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.pmodal-company-highlight h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pmodal-company-highlight p {
    font-size: 0.85rem;
    color: #047857;
    margin: 0;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .pmodal-body {
        padding: 22px 20px 28px;
    }

    .pmodal-hero {
        height: 220px;
    }

    .pmodal-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .pmodal-stat-num {
        font-size: 1.3rem;
    }

    .pmodal-projects {
        grid-template-columns: 1fr 1fr;
    }

    .pmodal-btn {
        min-width: 100px;
        font-size: 0.82rem;
        padding: 12px 14px;
    }

    .pmodal-hero-name h2 {
        font-size: 1rem;
    }
}
