/* --- Root Variables for Colors & Sizing --- */
:root {
    --primary-green: #166534;
    --secondary-green: #15803d;
    --light-green-bg: #f0fdf4;
    --accent-yellow: #facc15;
    --font-family: 'Inter', sans-serif;
    --sidebar-width-expanded: 240px;
    --sidebar-width-collapsed: 80px;
    --top-nav-height: 70px;
    --main-padding: 3rem;
    --card-transition-speed: 0.6s;
    /* Note: Reduced from 0.9s for better responsiveness */
    --animation-duration: 0.8s;
}

/* --- General Body & Font Styling --- */
body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-green-bg);
    color: #333;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* --- Paper Texture Overlay --- */
body::before {
    content: "";
    position: fixed;
    /* Changed to fixed to stay with viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img/papertexture.jpeg');
    background-repeat: repeat;
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

/* --- Sidebar Navigation (Desktop View) --- */
.sidebar {
    width: var(--sidebar-width-collapsed);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-green);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-header h3 {
    transition: opacity 0.2s ease, width 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    width: 0;
    overflow: hidden;
    font-size: 1.5rem;
    font-family: 'Righteous', sans-serif;
    /* Selaraskan font */
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: relative;
    transform: translateX(-14px) rotate(0deg);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.sidebar-toggle-btn:hover {
    opacity: 0.7;
}

.sidebar-toggle-btn:active {
    transform: scale(0.9);
}

.sidebar-toggle-btn .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.nav-links {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nav-links .mt-auto {
    margin-top: auto;
    margin-bottom: 2.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    color: #e5e7eb;
    text-decoration: none;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s, padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    padding-left: calc((var(--sidebar-width-collapsed) - 20px - 2rem) / 2);
    position: relative;
    overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--secondary-green);
    color: #ffffff;
}

.nav-link__icon,
.nav-link__text {
    position: relative;
    /* Pastikan ikon & teks di atas ::before/::after */
    z-index: 1;
}

.nav-link__icon {
    min-width: 20px;
    color: var(--accent-yellow);
    font-size: 1.1rem;
}

.nav-link__text {
    transition: opacity 0.2s ease-out, max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    max-width: 0;
    overflow: hidden;
    margin-left: 15px;
    font-size: 1rem;
    font-weight: 500;
}

/* === Animasi Gold Outline untuk Sidebar Nav === */
.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 300%;
    background: conic-gradient(from 0deg,
            transparent 0deg 180deg,
            var(--accent-yellow) 180deg 360deg);
    border-radius: 8px;
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    animation: rotateGoldOutline 2s linear infinite;
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: 2px;
    /* Jarak 'outline' (2px) */
    background-color: var(--secondary-green);
    /* Warna latar belakang apabila aktif */
    border-radius: 6px;
    /* Mesti (border-radius) - (inset) */
    z-index: 0;
    /* Letak di belakang */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
}

@keyframes rotateGoldOutline {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* === (TAMAT) Animasi Gold Outline === */

#main-wrapper {
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: var(--sidebar-width-collapsed);
}

.mobile-nav-icons {
    display: none;
}

body:not(.sidebar-collapsed) .sidebar {
    width: var(--sidebar-width-expanded);
}

body:not(.sidebar-collapsed) #main-wrapper {
    margin-left: var(--sidebar-width-expanded);
}

body:not(.sidebar-collapsed) .sidebar-toggle-btn {
    transform: translateX(0) rotate(180deg);
}

body:not(.sidebar-collapsed) .sidebar-header h3 {
    opacity: 1;
    pointer-events: auto;
    width: auto;
}

body:not(.sidebar-collapsed) .nav-link {
    padding-left: 1rem;
}

body:not(.sidebar-collapsed) .nav-link__text {
    opacity: 1;
    pointer-events: auto;
    max-width: 150px;
}

/* --- Header & Marquee --- */
.parallax-header {
    position: relative;
    height: clamp(220px, 25vh, 250px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    background-image: url('img/IMG-20241001-WA0057.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 10;
    overflow: hidden;
}

.parallax-header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.1) 0%, transparent 70%);
    animation: rotateGradient 20s linear infinite;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 101, 52, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    padding: 0 3rem;
    gap: 2rem;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

.logo-container-kiri img {
    width: auto;
    height: clamp(80px, 12vw, 150px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-container-kanan img {
    width: auto;
    height: clamp(60px, 11vw, 130px);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.header-text {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    max-width: 750px;
    flex-grow: 1;
}

.header-title-project {
    font-family: 'Righteous', sans-serif;
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    background: linear-gradient(45deg, #facc15, #ffffff, #facc15);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInFromLeft 0.8s ease-out, shimmer 3s linear infinite;
    filter: drop-shadow(0 2px 8px rgba(250, 204, 21, 0.5));
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.header-title-subtitle {
    /* Digunakan oleh sub-tajuk */
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    animation: slideInFromLeft 0.8s ease-out;
    animation-delay: 0.1s;
    /* Lengah sikit */
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.marquee-container {
    width: 100%;
    background: linear-gradient(90deg, var(--secondary-green) 0%, var(--primary-green) 50%, var(--secondary-green) 100%);
    color: white;
    padding: 0.4rem 0;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-anim 20s linear infinite;
    margin: 0;
    font-weight: 600;
}

@keyframes marquee-anim {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-150%);
    }
}


/* --- Main Content Area --- */
#main-content {
    padding: 0.8rem var(--main-padding);
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 2px solid rgba(22, 101, 52, 0.1);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-green);
}

/* --- Scroll Animation --- */
.animate-on-scroll {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(30px);
    transition: opacity var(--animation-duration) ease-out,
        filter var(--animation-duration) ease-out,
        transform var(--animation-duration) ease-out;
    transition-delay: 0.2s;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- On-Load Animation --- */
@keyframes fadeInOnLoad {
    from {
        opacity: 0;
        filter: blur(5px);
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.animate-on-load {
    opacity: 0;
    animation-name: fadeInOnLoad;
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

/* --- Parallax Content Section --- */
.parallax-content-section {
    position: relative;
    padding: 4rem 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* Changed from fixed for performance */
    margin-left: calc(-1 * var(--main-padding));
    margin-right: calc(-1 * var(--main-padding));
    margin-top: 2rem;
}

.parallax-content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(22, 101, 52, 0.8), rgba(0, 0, 0, 0.75));
    z-index: 1;
}

.parallax-content-section .video-container,
.parallax-content-section .pengenalan-container,
.parallax-content-section .visi-misi-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--main-padding);
    position: relative;
    z-index: 2;
}

/* --- Video Section --- */
.video-section {
    background-image: url('img/IMG-20241001-WA0087.jpg');
}

.video-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    color: #f0fdf4;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
}

.video-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.video-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Pengenalan Section --- */
.pengenalan-section {
    background-image: url('img/relasismembersimg.jpeg');
}

.pengenalan-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    color: #f0fdf4;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
}

.pengenalan-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.pengenalan-card__image {
    flex-shrink: 0;
}

.pengenalan-card__image img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background-color: white;
    /* Added background for transparency */
    padding: 1rem;
    box-sizing: border-box;
}

.pengenalan-card__text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-yellow);
    padding-bottom: 0.5rem;
    display: inline-block;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.pengenalan-card__text p {
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* --- General Section Title --- */
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-top: 0;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 4px;
    background-color: var(--accent-yellow);
    border-radius: 2px;
}

.section-title.title-center {
    text-align: center;
    display: block;
}

.section-title.title-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* --- Galeri (Expanding Panel) --- */
.gallery-slider-section {
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.gallery-slider-section .section-title {
    text-align: center;
    display: block;
    margin-bottom: 2.5rem;
}

.gallery-slider-section .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.gallery-slider-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 60vh;
    min-height: 400px;
    gap: 1rem;
}

.gallery-panel {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    flex: 1;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: flex 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-panel h3 {
    font-size: 1.5rem;
    position: absolute;
    bottom: 20px;
    left: 20px;
    margin: 0;
    opacity: 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    transition: opacity 0.3s ease-in 0.4s;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
}

.gallery-panel.active,
.gallery-slider-container .gallery-panel:hover {
    flex: 5;
}

.gallery-panel.active h3,
.gallery-slider-container .gallery-panel:hover h3 {
    opacity: 1;
}

.gallery-button-container {
    text-align: center;
    margin-top: 2rem;
}

.gallery-button-container a {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-green);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.gallery-button-container a:hover {
    background-color: var(--secondary-green);
    transform: scale(1.05);
}

/* --- Visi Misi Section --- */
.visi-misi-section {
    background-image: url('img/IMG-20241001-WA0267.jpg');
}

.visi-misi-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    gap: 3rem;
    align-items: center;
    color: #f0fdf4;
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
}

.visi-misi-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.visi-misi-text {
    flex: 1;
}

.visi-misi-text .section-title {
    color: #ffffff;
}

.visi-misi-text .section-title::after {
    background-color: var(--accent-yellow);
}

.visi-misi-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

.visi-misi-text p {
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #f0fdf4;
}

.misi-content {
    margin-top: 2rem;
}

.visi-misi-image {
    flex-basis: 40%;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.visi-misi-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.visi-misi-image img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: block;
}

/* --- Syarat & Faedah Section --- */
.syarat-faedah-section {
    margin-top: 2rem;
}

.visual-info-section {
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.visual-info-section .section-title {
    text-align: center;
    display: block;
}

.visual-info-section .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.visual-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.visual-info-grid.single-item {
    grid-template-columns: 1fr;
    display: flex;
    justify-content: center;
}

.info-graphic-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(22, 101, 52, 0.12);
    overflow: hidden;
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
}

.info-graphic-card.clickable-image {
    cursor: pointer;
}

.info-graphic-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 18px 50px rgba(22, 101, 52, 0.22);
}

.info-graphic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-graphic-card.large {
    max-width: 800px;
    width: 100%;
}

.maklumat-section {
    padding: 2.5rem 0;
}

.maklumat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.maklumat-card {
    background-color: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.maklumat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.maklumat-card__text {
    flex: 1;
}

.maklumat-card ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    color: #333;
}

.maklumat-card ul li {
    padding-left: 1.7em;
    text-indent: -1.7em;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.maklumat-card ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-green);
    display: inline-block;
    width: 1.7em;
    font-size: 0.9em;
}

.maklumat-card ul li:last-child {
    margin-bottom: 0;
}

.maklumat-card__image {
    flex-basis: 35%;
    flex-shrink: 0;
}

.maklumat-card__image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* --- Artikel Section (Slideshow) --- */
.artikel-section {
    padding: 2.5rem 0;
    margin-top: 2rem;
}

.artikel-section .section-title {
    text-align: center;
    display: block;
    margin-bottom: 2.5rem;
}

.artikel-section .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.slideshow-container {
    background-color: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.slideshow-wrapper {
    display: flex;
}

.slide {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 1rem;
    width: calc(100% / 3);
    /* Default Desktop */
}

.artikel-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: #333;
    border: 1px solid #e5e7eb;
    transition: transform var(--card-transition-speed) ease, box-shadow var(--card-transition-speed) ease;
    height: 100%;
}

.artikel-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 45px rgba(22, 101, 52, 0.2);
}

.artikel-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.artikel-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--card-transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.artikel-card:hover .artikel-card__image img {
    transform: scale(1.05);
}

.artikel-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.artikel-card__source {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--primary-green);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.artikel-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--primary-green);
}

.artikel-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    color: #4b5563;
}

.artikel-card__readmore {
    margin-top: 1rem;
    color: var(--secondary-green);
    font-weight: 600;
    text-decoration: none;
    align-self: flex-end;
    transition: color 0.3s ease;
}

.artikel-card__readmore i {
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
}

.artikel-card:hover .artikel-card__readmore {
    color: var(--primary-green);
}

.artikel-card:hover .artikel-card__readmore i {
    transform: translateX(4px);
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-green);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.slide-nav:hover {
    background-color: white;
    color: var(--secondary-green);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.slide-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
}

.slide-nav.prev {
    left: 10px;
}

.slide-nav.next {
    right: 10px;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-green);
    color: #e5e7eb;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    margin-top: 2rem;
    position: relative;
    z-index: 5;
}

.site-footer p {
    margin: 0;
}

/* --- Image Modal --- */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.image-modal.visible {
    display: block;
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 85%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-modal.visible .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1ff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* --- Chatbot Styles --- */
#chat-bubble {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 4rem;
    height: 4rem;
    background-color: var(--secondary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1010;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#chat-bubble:hover {
    transform: scale(1.1);
    background-color: var(--primary-green);
}

#chat-bubble i {
    color: white;
    font-size: 1.75rem;
}

#chat-window {
    position: fixed;
    bottom: calc(1.5rem + 4rem + 0.5rem);
    right: 1.5rem;
    width: 90vw;
    max-width: 380px;
    height: 500px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1009;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

#chat-window.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#chat-window .chat-header {
    background-color: var(--primary-green);
    color: white;
    padding: 0.75rem 1rem;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#chat-window .chat-header h3 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

#close-chat {
    color: white;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

#close-chat:hover {
    opacity: 0.8;
}

#chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: var(--light-green-bg);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#chat-messages>div {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.message-user {
    background-color: var(--secondary-green);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-ai {
    background-color: #fff;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
}

.message-typing {
    font-style: italic;
    color: #64748b;
    font-size: 0.85rem;
    align-self: flex-start;
}

#chat-input-area {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    background-color: #fff;
    flex-shrink: 0;
}

#chat-input-area .flex {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#chat-input {
    flex-grow: 1;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#chat-input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(101, 163, 13, 0.2);
}

#chat-send {
    width: 44px;
    height: 44px;
    background-color: var(--secondary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

#chat-send:hover {
    background-color: var(--primary-green);
}

#chat-send:active {
    transform: scale(0.95);
}

#chat-send i {
    font-size: 1rem;
}


/* --- Media Queries --- */
@media (max-width: 1024px) {
    #main-content {
        --main-padding: 2rem;
        padding: var(--main-padding);
    }

    .header-content {
        padding: 0 2rem;
    }

    .slide {
        width: calc(100% / 2);
    }

    /* Tablet: 2 slides */
    .sidebar {
        height: var(--top-nav-height);
        width: 100% !important;
        flex-direction: row;
        align-items: center;
        padding: 0 1.5rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar-header {
        border: none;
        margin: 0;
        padding: 0;
        flex-grow: 1;
    }

    .sidebar-header h3 {
        opacity: 1;
        pointer-events: auto;
        width: auto;
        font-size: 1.4rem;
        color: #fff;
    }

    .sidebar-toggle-btn {
        transform: rotate(0deg) !important;
        order: -1;
        margin-right: 1rem;
        transform: translateX(0) !important;
    }

    .mobile-nav-icons {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: var(--top-nav-height);
        left: 0;
        height: calc(100vh - var(--top-nav-height));
        width: 280px;
        background-color: var(--primary-green);
        flex-direction: column;
        padding: 1.5rem 1rem;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    body:not(.sidebar-collapsed) .nav-links {
        transform: translateX(0);
    }

    .nav-links .nav-link {
        padding-left: 1rem;
    }

    .nav-links .nav-link__text {
        opacity: 1;
        max-width: 150px;
        margin-left: 15px;
        font-size: 1rem;
    }

    #main-wrapper {
        margin-left: 0 !important;
        padding-top: var(--top-nav-height);
    }

    body:not(.sidebar-collapsed) .sidebar-toggle-btn .bar:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

    body:not(.sidebar-collapsed) .sidebar-toggle-btn .bar:nth-child(2) {
        opacity: 0;
    }

    body:not(.sidebar-collapsed) .sidebar-toggle-btn .bar:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }
}

@media (max-width: 900px) {
    .pengenalan-card {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
    }

    .pengenalan-card__image img {
        max-width: 150px;
    }

    .pengenalan-card__text h2 {
        font-size: 1.5rem;
        border: none;
        padding-bottom: 0;
    }

    .pengenalan-card__text p {
        font-size: 0.9rem;
        text-align: left;
    }

    .visi-misi-card {
        flex-direction: column;
        padding: 2rem;
    }

    .visi-misi-image {
        width: 100%;
        margin-top: 2rem;
    }

    .info-card {
        flex-direction: column-reverse;
        padding: 2rem;
        text-align: center;
    }

    .info-card .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .maklumat-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #main-content {
        --main-padding: 1.5rem;
        padding: var(--main-padding);
    }

    .header-content {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .parallax-header,
    .parallax-content-section {
        background-attachment: scroll;
    }

    .parallax-content-section {
        padding: 3rem 0;
    }

    .video-card {
        padding: 1.5rem;
    }

    .video-card h2 {
        font-size: 1.25rem;
    }

    .slide {
        width: 100%;
        padding: 0 0.5rem;
    }

    /* Mobile: 1 slide */
    .visual-info-grid {
        grid-template-columns: 1fr;
    }

    .gallery-slider-container {
        flex-direction: column;
        height: auto;
        gap: 1.5rem;
    }

    .gallery-panel {
        flex: auto;
        height: 250px;
    }

    .gallery-panel h3 {
        opacity: 1;
    }

    .gallery-panel.active,
    .gallery-slider-container .gallery-panel:hover {
        flex: auto;
    }

    #chat-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: calc(1rem + 4rem + 0.5rem);
    }

    #chat-bubble {
        width: 3.5rem;
        height: 3.5rem;
        bottom: 1rem;
        right: 1rem;
    }

    #chat-bubble i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --main-padding: 1rem;
    }

    .sidebar {
        padding: 0 1rem;
    }

    .sidebar-header h3 {
        font-size: 1.2rem;
    }

    /* No back button styles defined, remove if not needed */
}