/* ========================================
   1. CSS VARIABLES (Tema Warna Polindo)
   ======================================== */
:root {
    --portal-primary: #2563eb;
    --portal-primary-dark: #1d4ed8;
    --portal-secondary: #0f172a;
    --portal-bg: #f8fafc;
    --portal-surface: #ffffff;
    --portal-text: #1e293b;
    --portal-text-muted: #64748b;
    --portal-border: #e2e8f0;
    --portal-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --portal-font: 'Poppins', sans-serif;
    --portal-container: 1200px;
    --portal-bottom-nav-height: 60px;
}

/* ========================================
   2. RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--portal-font);
    background-color: var(--portal-bg);
    color: var(--portal-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ========================================
   3. LAYOUT UTILITIES
   ======================================== */
.portal-container {
    max-width: var(--portal-container);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ========================================
   4. HEADER & NAVBAR (DESKTOP)
   ======================================== */
.portal-header {
    background-color: var(--portal-surface);
    box-shadow: var(--portal-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.portal-header .portal-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand / Logo */
.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--portal-primary);
    font-size: 1.2rem;
}

.portal-brand-icon {
    width: 40px;
    height: 40px;
    background-color: var(--portal-primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.portal-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-brand-text strong {
    font-size: 1.1rem;
    color: var(--portal-secondary);
}

.portal-brand-text span {
    font-size: 0.75rem;
    color: var(--portal-text-muted);
    font-weight: 400;
}

/* Navigasi Desktop */
.portal-nav {
    display: flex;
    gap: 8px;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--portal-text);
}

.portal-nav-link i {
    font-size: 0.9rem;
}

.portal-nav-link span {
    display: inline;
}

.portal-nav-link:hover {
    background-color: #eff6ff;
    color: var(--portal-primary);
}

.portal-nav-link.active {
    background-color: var(--portal-primary);
    color: white;
}

/* Sembunyikan tombol mobile di desktop */
.portal-mobile-toggle,
.portal-mobile-overlay {
    display: none;
}

/* ========================================
   5. FOOTER MODERN & ELEGANT
   ======================================== */
.portal-footer {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: #cbd5e1;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

/* Efek pattern halus di background footer */
.portal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Top Footer - Main Content */
.portal-footer-main {
    padding: 60px 0 40px;
    position: relative;
    z-index: 1;
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.3fr;
    gap: 48px;
}

/* Brand Column */
.brand-col {
    max-width: 320px;
}

.portal-footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    text-decoration: none;
}

.portal-footer-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--portal-primary) 0%, #1e40af 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.portal-footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-footer-logo-text strong {
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.portal-footer-logo-text span {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.portal-footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 24px;
}

/* Social Media Links */
.portal-footer-social {
    display: flex;
    gap: 10px;
}

.portal-social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.portal-social-link:hover {
    background: var(--portal-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    border-color: var(--portal-primary);
}

/* Footer Headings */
.portal-footer-heading {
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.portal-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--portal-primary);
    border-radius: 2px;
}

/* Footer Links */
.portal-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-footer-links li {
    margin-bottom: 12px;
}

.portal-footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.portal-footer-links a i {
    font-size: 0.7rem;
    color: var(--portal-primary);
    transition: transform 0.3s ease;
}

.portal-footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.portal-footer-links a:hover i {
    transform: translateX(3px);
}

/* Contact Section */
.portal-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portal-contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.portal-contact-icon {
    width: 36px;
    height: 36px;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.portal-contact-icon.whatsapp {
    background: rgba(22, 163, 74, 0.15);
    color: #16a34a;
}

.portal-contact-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.portal-contact-text strong {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.portal-contact-text span,
.portal-contact-text a {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.portal-contact-text a:hover {
    color: var(--portal-primary);
}

/* Bottom Footer - Copyright Bar */
.portal-footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

.portal-footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-copyright {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
}

.portal-copyright strong {
    color: white;
}

.portal-credit {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
}

.portal-credit strong {
    color: var(--portal-primary);
}

/* ========================================
   6. RESPONSIVE - MOBILE APP-LIKE
   ======================================== */
@media (max-width: 768px) {
    
    /* Ruang bawah body agar konten tidak tertutup bottom nav */
    body {
        padding-bottom: 60px;
    }

    /* Header di mobile: lebih compact */
    .portal-header {
        padding: 10px 0;
    }

    .portal-header .portal-container {
        justify-content: center;
    }

    .portal-brand-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .portal-brand-text strong {
        font-size: 0.95rem;
    }

    .portal-brand-text span {
        display: none;
    }

    /* ========================================
       BOTTOM NAVIGATION (6 Menu)
       ======================================== */
    .portal-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: var(--portal-bottom-nav-height);
        background-color: var(--portal-surface);
        border-top: 1px solid var(--portal-border);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        padding: 0;
        gap: 0;
        z-index: 1000;
        overflow: hidden;
    }

    .portal-nav-link {
        flex: 1 1 0%;
        min-width: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 4px 2px;
        border-radius: 0;
        gap: 2px;
        position: relative;
        white-space: nowrap;
        overflow: hidden;
    }

    .portal-nav-link i {
        font-size: 1rem;
        margin-bottom: 1px;
    }

    .portal-nav-link span {
        font-size: 0.58rem;
        font-weight: 500;
        line-height: 1;
        text-align: center;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portal-nav-link:hover {
        background-color: rgba(37, 99, 235, 0.05);
        color: var(--portal-primary);
    }

    .portal-nav-link.active {
        background-color: rgba(37, 99, 235, 0.08);
        color: var(--portal-primary);
    }

    .portal-nav-link.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background-color: var(--portal-primary);
        border-radius: 0 0 3px 3px;
    }

    /* Footer Responsive Mobile */
    .portal-footer {
        margin-top: 40px;
    }

    .portal-footer-main {
        padding: 40px 0 30px;
    }

    .portal-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .brand-col {
        max-width: 100%;
    }

    .portal-footer-heading {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .portal-footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .portal-copyright,
    .portal-credit {
        font-size: 0.8rem;
    }
}

/* Untuk layar sangat kecil (HP kecil < 380px) */
@media (max-width: 380px) {
    body {
        padding-bottom: 55px;
    }
    
    .portal-nav {
        height: 55px;
    }
    
    .portal-nav-link i {
        font-size: 0.95rem;
    }
    
    .portal-nav-link span {
        font-size: 0.55rem;
    }
}

/* Tablet (769px - 992px) */
@media (max-width: 992px) and (min-width: 769px) {
    .portal-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .brand-col {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}