/* General Resets and Variables */
:root {
    --primary-color: #004085; /* Dark blue from logo */
    --secondary-color: #FFC107; /* Yellow/Orange accent */
    --light-blue: #E0F2F7; /* Light blue background for ID dropdown/user profile */
    --text-color: #333;
    --light-text-color: #666;
    --border-color: #e0e0e0;
    --white: #fff;
    --gray-bg: #f0f2f5; /* Background for the main content area and refresh card */
    --dark-gray: #495057;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--gray-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Global container for content within the gray background */
.container {
    max-width: 1800px; /* UBAH: Ditingkatkan menjadi 1800px */
    margin: 0 auto;
    padding: 0 16px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* Header - Sekarang distyle sebagai kartu */
.main-header.card-box {
    background-color: var(--white);
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1800px; /* UBAH: Ditingkatkan menjadi 1800px */
    position: relative;
    z-index: 1000;
}

.header-inner-container {
    max-width: 1800px; /* UBAH: Disesuaikan dengan max-width header (1800px - 30px padding) */
    margin: 0 auto;
    padding: 18px 15px;
}

.top-header-bar {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 50px;
}

.enerco-logo {
    width: 32px !important; /* Tambahkan !important */
    height: 32px !important; /* Tambahkan !important */
    margin-right: 10px;
    border-radius: 4px;
    object-fit: contain;
}

.app-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3em;
    letter-spacing: 0.5px;
}

.search-section {
    display: flex;
    align-items: center;
    background-color: #f5f7fa;
    border-radius: 24px;
    padding: 9px 18px;
    border: 1px solid var(--border-color);
    flex-grow: 1;
    max-width: 480px;
    margin: 0 25px;
}

.search-section .search-icon {
    color: #888;
    margin-right: 12px;
    font-size: 1.05em;
    padding: 0;
}

.search-input {
    border: none;
    padding: 0;
    flex-grow: 1;
    outline: none;
    background-color: transparent;
    font-size: 0.95em;
    color: var(--text-color);
}

.search-input::placeholder {
    color: #a0a0a0;
}

.search-section .shortcut-key {
    background-color: #e8e8e8;
    color: #666;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78em;
    margin-left: 15px;
    font-weight: 500;
    border-left: none;
}

.user-interaction-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Jarak antar ikon/grup, disesuaikan */
    flex-shrink: 0;
}

.user-interaction-group .icon { /* Bell dan Cog icons */
    font-size: 1.2em;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.user-interaction-group .icon:hover {
    color: var(--primary-color);
}

.id-group, .user-info-group {
    display: flex;
    align-items: center;
    background-color: var(--light-blue); /* Light blue background */
    padding: 5px 10px; /* Adjust padding to match screenshot */
    border-radius: 20px; /* Rounded corners */
    color: var(--primary-color);
    font-size: 0.9em;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 600; /* Text inside seems bold */
}

.id-group i {
    font-size: 0.7em;
    margin: 0 3px;
    color: #888; /* Chevron color */
}

.user-info-group .user-id-number {
    background-color: var(--white); /* White background for the number */
    padding: 3px 8px; /* Smaller padding */
    border-radius: 15px; /* More rounded */
    font-size: 0.8em; /* Smaller font size for the number */
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 8px; /* Space between ID number and name */
}
.user-info-group .user-name {
    /* Already styled by parent .user-info-group for font-weight and color */
    margin-right: 5px;
}
.user-info-group .arrow-icon {
    font-size: 0.7em;
    color: #888;
}

.main-navigation {
    padding-top: 16px;
}

.main-navigation ul {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation ul li a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.main-navigation ul li a:hover {
    color: var(--primary-color);
}

.main-navigation ul li a i:first-child {
    margin-right: 9px;
    color: #888;
    font-size: 1.05em;
}

.main-navigation ul li a .fa-chevron-down {
    margin-left: 6px;
    margin-right: 0;
    font-size: 0.7em;
    color: #888;
}

/* Status aktif untuk "Portal Saya" - berdasarkan screenshot */
.main-navigation li.active a {
    color: var(--primary-color);
    font-weight: 600;
}

.main-navigation li.active a .fas {
    color: var(--primary-color);
}

.main-navigation li.active a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}


/* Main Content - Area yang menampung semua "kartu" */
.main-content {
    flex-grow: 1;
    padding: 20px 0;
}

/* Gaya dasar untuk semua "kartu" di konten utama */
.card-box {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* Top Content Grid (Dua Kolom) */
.top-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Kolom kiri 2x lebih lebar dari kanan */
    gap: 20px;
    margin-bottom: 20px;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Welcome Text Card */
.welcome-text-card {
    padding: 25px;
}

.welcome-text-card h1 {
    font-size: 1.8em;
    color: var(--text-color);
    margin-bottom: 8px;
}

.welcome-text-card h2 {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 15px;
    font-weight: normal;
}

.welcome-text-card p {
    font-size: 0.95em;
    color: #777;
    line-height: 1.5;
}


/* Announcements Section */
.announcements-section {
    padding: 25px;
}

.announcements-section h3 {
    color: var(--text-color);
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.announcements-section h3 i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.announcements-section > p {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
}

.announcement-carousel {
    display: flex; /* Ini yang membuat item horizontal */
    overflow-x: auto; /* Ini yang membuat bisa digulir horizontal */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 15px; /* Padding di sekitar carousel */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--gray-bg);
    height: auto;
    align-items: stretch;
}

.carousel-item {
    flex: 0 0 250px; /* Lebar tetap untuk setiap item, disesuaikan dengan screenshot */
    scroll-snap-align: start;
    background-color: var(--white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transition: none;
}

.carousel-item .item-number {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1em;
    flex-shrink: 0;
    margin-right: 15px;
}

.carousel-text {
    flex: 1;
}

.carousel-text h4 {
    color: var(--text-color);
    font-size: 0.95em; /* Ukuran font disesuaikan */
    margin-bottom: 5px;
}

.carousel-text p {
    font-size: 0.75em; /* Ukuran font disesuaikan */
    color: #666;
    line-height: 1.4;
}

/* Help & Guide Section */
.help-guide-section {
    padding: 25px;
}

.help-guide-section h3 {
    color: var(--text-color);
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.help-guide-section h3 i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.help-guide-section > p {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.help-guide-section .view-all-link {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.help-guide-section .view-all-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.help-guide-section .view-all-link:hover i {
    transform: translateX(5px);
}

/* Refresh Display Card (Kolom Kanan) */
.refresh-display-card {
    background-color: var(--gray-bg); /* Latar belakang abu-abu muda */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* Konten ditumpuk secara vertikal */
    gap: 20px; /* Jarak antara bagian-bagian */
}

.refresh-card-header {
    text-align: left;
    line-height: 1.1;
    color: var(--primary-color);
    font-weight: 800; /* Extra bold */
}
.refresh-card-header .refresh-title-line-1 {
    display: block; /* Paksa baris baru */
    font-size: 2.2em; /* Ukuran font besar */
}
.refresh-card-header .refresh-title-line-2 {
    display: block; /* Paksa baris baru */
    font-size: 2.5em; /* Lebih besar untuk CORETAX */
}

.refresh-card-intro p {
    font-size: 0.9em;
    color: var(--text-color);
}

.refresh-card-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.refresh-card-features .feature-item {
    display: flex;
    align-items: flex-start; /* Sejajarkan ikon dan teks di bagian atas */
    gap: 10px;
}
.refresh-card-features .feature-item i {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-top: 3px; /* Sejajarkan ikon dengan baris pertama teks */
}
.refresh-card-features .feature-item p {
    font-size: 0.85em;
    color: var(--text-color);
}

.refresh-card-main-text p {
    font-size: 1em;
    color: var(--dark-gray);
    font-weight: 500;
}

.refresh-card-illustration img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Tengah gambar */
}

.refresh-card-footer-text p {
    font-size: 0.85em;
    color: var(--text-color);
}
.refresh-card-footer-text .highlight {
    font-weight: bold;
    color: var(--primary-color);
}


/* Service Cards Section (Grid of smaller cards) */
.service-cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.service-cards-section .card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
}

.service-cards-section .card .card-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-cards-section .card h4 {
    color: var(--text-color);
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-cards-section .card p {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 15px;
    flex-grow: 1;
    line-height: 1.5;
}

.service-cards-section .card-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    font-size: 0.85em;
}

.service-cards-section .card-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 0.75em;
}

.service-cards-section .card-link:hover i {
    transform: translateX(5px);
}

/* Footer - Full width, background */
.main-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-logo-address {
    flex: 1;
    min-width: 250px;
}

.djp-logo-footer {
    height: 50px;
    filter: brightness(0) invert(1);
    margin-bottom: 10px;
}

.footer-logo-address h4,
.footer-logo-address h5,
.footer-logo-address h6 {
    margin: 0;
    line-height: 1.2;
}

.footer-logo-address p {
    font-size: 0.9em;
    margin-top: 10px;
    color: rgba(255,255,255,0.8);
}

.footer-links {
    display: flex;
    flex: 2;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-column {
    min-width: 180px;
}

.footer-column h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.footer-column p {
    font-size: 0.9em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.8);
}

.footer-column p i {
    margin-right: 10px;
    color: rgba(255,255,255,0.6);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.2em;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .main-header.card-box {
        margin: 10px auto;
        padding: 15px 0;
        max-width: 1800px; /* DIUBAH: Memaksa lebar 1800px bahkan pada layar <= 1024px */
    }
    .header-inner-container {
        padding: 0 10px;
        max-width: 1770px; /* DIUBAH: Memaksa lebar 1770px bahkan pada layar <= 1024px */
    }
    .top-header-bar {
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 10px;
    }
    .logo-group {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    .search-section {
        order: 3;
        flex-basis: 90%;
        margin: 10px 0;
        max-width: none;
    }
    .user-interaction-group {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        gap: 10px;
    }
    .id-group, .user-info-group {
        padding: 5px 8px;
    }
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding-top: 10px;
    }
    .main-navigation li a {
        font-size: 0.9em;
        padding: 8px 0;
    }

    .top-content-grid {
        grid-template-columns: 1fr; /* Satu kolom di tablet */
    }
    .refresh-display-card {
        padding: 25px;
    }
    .refresh-card-header .refresh-title-line-1 {
        font-size: 1.8em;
    }
    .refresh-card-header .refresh-title-line-2 {
        font-size: 2.1em;
    }
    .service-cards-section {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di tablet */
    }
    .carousel-item {
        flex: 0 0 200px; /* Ukuran item carousel di tablet */
    }
    .container {
        max-width: 1800px; /* DIUBAH: Memaksa lebar 1800px bahkan pada layar <= 1024px */
    }
}

@media (max-width: 768px) {
    .main-content .container {
        padding: 0 10px;
    }
    .card-box {
        padding: 20px;
        margin-bottom: 15px;
    }
    .welcome-text-card h1 {
        font-size: 1.5em;
    }
    .welcome-text-card h2 {
        font-size: 1.1em;
    }
    .announcements-section h3,
    .help-guide-section h3 {
        font-size: 1.1em;
    }
    .carousel-item {
        flex: 0 0 180px; /* Ukuran item carousel di ponsel */
        flex-direction: column;
        text-align: center;
    }
    .carousel-item .item-number {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .refresh-display-card {
        padding: 20px;
    }
    .refresh-card-header .refresh-title-line-1 {
        font-size: 1.5em;
    }
    .refresh-card-header .refresh-title-line-2 {
        font-size: 1.8em;
    }
    .service-cards-section {
        grid-template-columns: 1fr;
    }
    .service-cards-section .card {
        padding: 20px;
    }
    .service-cards-section .card-icon {
        font-size: 2em;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-logo-address,
    .footer-links,
    .footer-column {
        width: 100%;
        max-width: 400px;
    }
    .footer-column h4 {
        margin-top: 20px;
    }
    .social-icons {
        justify-content: center;
        display: flex;
    }
}

@media (max-width: 576px) {
    .welcome-text-card h1 {
        font-size: 1.5em;
    }
    .welcome-text-card h2 {
        font-size: 1.2em;
    }
    .announcements-section h3,
    .help-guide-section h3 {
        font-size: 1.2em;
    }
}
