/* General Body and Reset */
html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    /* PERBAIKAN STICKY FOOTER: Memaksa tinggi halaman 100vh presisi */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Global Container --- */
.container {
    margin: 15px 20px !important; /* Presisi 20px kiri-kanan sejajar header & footer */
    width: auto !important;
    max-width: none !important;
    /* PERBAIKAN: Mendorong footer ke bagian paling bawah layar */
    flex: 1 0 auto; 
    display: flex;
    flex-direction: column;
}

/* --- Utilities --- */
.highlight-blue {
    color: #007bff;
    font-weight: 600;
}

/* --- Main Header --- */
.main-header {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin: 10px 20px;
    position: relative;
    flex-shrink: 0;
}

.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
}

.logo-section {
    display: flex;
    align-items: center;
}

.enerco-logo {
    height: 30px;
    vertical-align: middle;
    margin-right: 5px;
}

.logo-section .brand-name {
    font-weight: bold;
    color: #333;
}

.separator {
    margin: 0 10px;
    color: #ccc;
    font-size: 1.2em;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f5f7fa;
    border-radius: 20px;
    padding: 5px 15px;
    flex-grow: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-bar i {
    color: #888;
    margin-right: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    flex-grow: 1;
    font-size: 0.9em;
    color: #333;
}

.search-shortcut {
    background-color: #e0e4eb;
    color: #555;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75em;
}

.user-controls {
    display: flex;
    align-items: center;
}

.control-icon {
    padding: 8px;
    color: #555;
    font-size: 1.1em;
    margin-left: 10px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.control-icon:hover {
    background-color: #f0f2f5;
}

.user-profile {
    display: flex;
    align-items: center;
    background-color: #e0e4eb;
    border-radius: 20px;
    padding: 5px 15px;
    margin-left: 15px;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
}

.user-profile span {
    margin-right: 5px;
}

.user-profile .user-id {
    font-weight: bold;
}

.header-nav {
    padding: 10px 20px;
}

.header-nav ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-nav li {
    margin: 0 10px;
}

.header-nav li.has-dropdown {
    padding-bottom: 5px;
    margin-bottom: -5px;
}

.header-nav a {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #555;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: #007bff;
}

.header-nav a i {
    margin-right: 5px;
    font-size: 1.1em;
}

.header-nav a .dropdown-caret {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.2s ease-in-out;
}

.header-nav li.has-dropdown:hover .active-on-hover {
    background-color: #FFECB3;
    border-radius: 5px 5px 0 0;
    color: #333;
    padding: 8px 15px;
    margin: 0 -15px;
}

.header-nav li.has-dropdown:hover .dropdown-caret {
    transform: rotate(180deg);
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: calc(100% - 5px);
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.3s;
    pointer-events: none;
}

.header-nav li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0s;
    pointer-events: auto;
}

.dropdown-menu.single-line-access {
    padding: 15px 20px;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.dropdown-menu.single-line-access .access-link {
    display: block;
    padding: 8px 15px;
    border-radius: 5px;
    background-color: #f5f7fa;
    color: #555;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
    width: fit-content;
}

.dropdown-menu.single-line-access .access-link:hover {
    background-color: #e0e4eb;
    color: #007bff;
}

.dropdown-column {
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: 0;
    min-width: 180px;
    padding: 0 10px;
    border-right: 1px solid #e9ecef;
}

.dropdown-column:last-child {
    border-right: none;
}

.dropdown-column h4 {
    font-size: 0.9em;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.dropdown-column ul,
.dropdown-column li {
    display: block;
}

.dropdown-column li a {
    display: block;
    padding: 5px 0;
    color: #333;
    font-size: 0.9em;
    transition: color 0.2s;
    white-space: nowrap;
    line-height: 1.3;
}

.dropdown-column li a:hover {
    color: #007bff;
}

/* --- Hero Section & Card Grid Fixes --- */
.hero-section {
    margin-bottom: 20px;
    flex: 1; /* Memasukkan fleksibilitas pada hero section */
}

.hero-section-outer-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    padding: 35px 30px; /* PERBAIKAN: Padding diperbesar vertikal agar gagah */
    display: flex;
    gap: 20px;
    align-items: stretch;
    height: 100%;
    box-sizing: border-box;
}

.hero-left {
    flex: 0 0 30%;
    max-width: 30%;
    min-width: 0;
}

.hero-right {
    flex: 0 0 70%;
    max-width: 70%;
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.hero-main-refresh-card {
    flex: 1 1 auto;
    min-width: 0;
    background-color: #f0f4f9;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    min-height: 360px; /* PERBAIKAN: Mengunci tinggi minimal kartu tengah */
}

.hero-faq-sidebar-card {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
    background-color: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.education-cards-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    padding: 15px 20px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.education-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-right: 1px solid #f1f5f9;
}

.card-grid .education-item:last-child {
    border-right: none;
}

/* --- Responsive Adjustments for Dropdown --- */
@media (max-width: 1200px) {
    .dropdown-menu {
        flex-wrap: wrap;
        justify-content: flex-start;
        left: 0;
        width: 100%;
        padding: 20px;
    }
    .dropdown-column {
        flex-basis: calc(50% - 10px);
        border-right: none;
        min-width: unset;
        margin-bottom: 20px;
    }
    .dropdown-column:nth-child(odd) {
        border-right: 1px solid #e9ecef;
    }
    .dropdown-column:last-child {
        border-right: none;
    }
    .dropdown-menu.single-line-access {
        padding: 15px;
    }
    .dropdown-menu.single-line-access .access-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        padding: 15px;
        gap: 15px;
    }
    .dropdown-column {
        flex-basis: 100%;
        max-width: 100%;
        border-right: none;
        margin-bottom: 15px;
    }
    .dropdown-column:not(:last-child) {
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 15px;
    }
    .dropdown-menu.single-line-access {
        padding: 10px;
    }
    .dropdown-menu.single-line-access .access-link {
        font-size: 0.85em;
        padding: 8px 10px;
    }
}

/* --- Footer Styling (PERBAIKAN LOCK TO BOTTOM) --- */
.main-footer {
    background-color: #f0f2f5;
    color: #333;
    padding: 20px 0 10px;
    margin: 20px 20px 20px !important; /* Margin sejajar 20px */
    border-radius: 8px;
    font-size: 0.9em;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    position: relative;
    flex-shrink: 0; /* Mencegah footer gepeng */
    margin-top: auto !important; /* MENDORONG FOOTER KE PALING BAWAH DISPLAY */
}

.footer-content {
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2.5fr 2fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 10px;
}

.footer-section {
    padding-left: 15px;
    padding-right: 15px;
}

.footer-section:not(:first-child) {
    border-left: 1px solid #eee;
}

.footer-section h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.footer-section p {
    color: #555;
    margin-bottom: 8px;
    line-height: 1.4;
}

.footer-brand p:not(.address) {
    font-weight: bold;
}

.footer-section a {
    color: #007bff;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #0056b3;
}

.footer-brand .enerco-font {
    height: 40px;
    width: auto;
    max-width: 100%;
    margin-bottom: 15px;
    display: block;
}

.footer-brand p {
    margin-bottom: 5px;
}

.footer-brand .address {
    font-size: 0.85em;
    color: #777;
}

.footer-brand .copyright {
    font-size: 0.8em;
    color: #777;
    margin-top: 15px;
}

.footer-contact i, .footer-digital-services i {
    margin-right: 8px;
    color: #007bff;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.social-icons a {
    font-size: 1.5em;
    color: #333;
    transition: color 0.2s;
}

.social-icons a:hover {
    color: #007bff;
}

.social-handle {
    font-size: 0.85em;
    color: #777;
}

.back-to-top {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 40px;
    width: 40px;
    height: 40px;
    background-color: #007bff;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-size: 1.2em;
    z-index: 10;
}

.back-to-top:hover {
    background-color: #0056b3;
}

/* Responsiveness for Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
        border-left: none;
        padding-left: 0;
        padding-right: 0;
    }

    .footer-section:not(:last-child) {
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 15px;
    }

    .footer-section h3 {
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .back-to-top {
        position: static;
        margin: 20px auto 0;
        right: auto;
        bottom: auto;
        transform: none;
    }

    .hero-section-outer-wrapper,
    .hero-right {
        flex-direction: column;
    }

    .hero-left,
    .hero-right,
    .hero-faq-sidebar-card {
        max-width: 100%;
        width: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}