/* --- CSS VARIABLES & RESET --- */
:root {
    --primary-green: #2e8b57;
    --dark-green: #1e5c39;
    --primary-blue: #4682b4;
    --light-blue: #f0f8ff;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-green);
}

.logo span {
    color: var(--primary-blue);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-green);
}

/* Dropdown Header */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    padding: 0;
    list-style: none;
    top: 100%;
    left: 0;
}

.dropdown-content li{
    margin: 0 !important;
    border-bottom: 1px solid #f1f1f1;
}
        
.dropdown-content li a{
    color: var(--text-dark);
    padding: 12px 16px;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content li a:hover {
    background-color: var(--light-blue);
    color: var(--primary-green);
}

.dropdown:hover .dropdown-content{
    display: block;
}

@media (max-width: 768px) {
            .menu-toggle {
                display: block;
            }

            /* Hide navigation by default */
            nav ul {
                display: none;
                flex-direction: column;
                position: absolute;
                top: 70px;
                left: 0;
                width: 100%;
                background: var(--white);
                box-shadow: 0 2px 5px rgba(0,0,0,0.1);
                padding: 0;
            }

            /* Show navigation when active */
            nav ul.active {
                display: flex;
            }

            nav ul li {
                margin: 0;
                text-align: center;
                padding: 0;
                border-bottom: 1px solid #f1f1f1;
            }

            nav ul li a {
                display: block;
                padding: 15px 0;
            }

            /* CRITICAL: Disable desktop hover on mobile */
            .dropdown:hover .dropdown-content {
                display: none;
            }

            /* Hide dropdown content by default */
            .dropdown-content {
                display: none !important;
                position: static;
                box-shadow: none;
                background-color: #fafafa;
                padding: 0;
                margin: 0;
            }

            /* Show dropdown when parent has active class */
            .dropdown.active .dropdown-content {
                display: block !important;
            }

            .dropdown-content li {
                border-bottom: 1px solid #e0e0e0;
            }

            .dropdown-content li a {
                padding: 12px 0 12px 30px;
                text-align: left;
            }
        }

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6)), url('../gambar/sawah1.jpg') no-repeat center center/cover;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 60px;
}

.hero h1 {
    font-size: 4rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* --- SECTIONS GENERAL --- */
section {
    padding: 4rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-green);
    font-size: 2rem;
    position: relative;
}
        
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-blue);
    margin: 10px auto 0;
}

@media (max-width: 1920px) {
    .section-title {
        text-align: center;
        margin-bottom: 3rem;
        color: var(--primary-green);
        font-size: 3rem;
        position: relative;
    }
        
    .section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 3px;
        background: var(--primary-blue);
        margin: 10px auto 0;
    }
}

/* --- DESCRIPTION SECTION --- */
.about {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .about {
        font-size: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 1920px) {
    .about{
        font-size: 2rem;
        max-width: 1200px;
    }
}

/* --- SEJARAH DESA --- */
.history{
    text-align: justify;
    max-width: 1000px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.history ul{
    margin-top: 1rem;
    margin-left: 1.5rem;
}

.history li{
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .history {
        font-size: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 1921px) {
    .history {
        font-size: 1.5rem;
        max-width: 1200px;
    }
}

/* --- VISI MISI --- */
.visimisi{
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.visimisi h3{
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.visimisi ol{
    margin-top: 1rem;
    margin-left: 1.5rem;
}

.visimisi li{
    margin-bottom: 0.5rem;
    text-align: justify;
}

@media (max-width: 768px) {
    .visimisi {
        font-size: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 1920px){
    .visimisi{
        font-size: 1.5rem;
        max-width: 1200px;
    }
    .visimisi h3{
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 2.2rem;
    }

    .visimisi ol{
        margin-top: 1.2rem;
        margin-left: 2rem;
    }

    .visimisi li{
        margin-bottom: 0.8rem;
        text-align: justify;
    }
}

/* --- CARDS SECTION --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.7);
    overflow: hidden;
    transition: transform 0.3s;
    border-bottom: 5px solid var(--primary-blue);
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-green);
}

/* --- SLIDESHOW SECTION --- */
.slideshow-section {
    background-color: var(--light-blue);
}

.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.mySlides {
    display: none;
}

.mySlides img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: var(--primary-green);
}

/* --- SPECIFIC INFO SECTION --- */
.details-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 60px 10%;
    gap: 2rem;
    margin-bottom: 5rem;
}

.details-text {
    flex: 1;
    min-width: 300px;
    text-align: justify;
}

.details-image {
    flex: 1;
    min-width: 300px;
}

.details-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.details-image, .details-text{
    flex: 1;
}

/* --- REVERSE DETAILS --- */
.details-container.reverse {
    flex-direction: row-reverse;
}

/* --- PHONE --- */
@media (max-width: 768px) {
.details-text, .details-text.reverse {
    flex-direction: column; /* Gambar dan teks menumpuk */
    text-align: center;
    padding: 40px 5%;
}
    
.details-image {
    order: -1;
}
.details-container, .details-container.reverse{
    margin-bottom: 20px;
}
}

.btn {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--dark-green);
}

/* --- FOOTER --- */
footer {
    background: var(--dark-green);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0;
        text-align: center;
        padding: 10px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .mySlides img {
        height: 300px;
    }
}