body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 60px; /* Sesuaikan dengan tinggi navbar */
    overflow: hidden;  /*Prevent horizontal scroll */
    background-color: #F7F5F2; /* New background color */
    color: #1D1E1E; /* Default text color */
}

/* Hanya aktifkan scroll saat mobile */
@media (max-width: 800px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 800px) {
    #home {
        height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Untuk iOS smooth scroll */
    }
}


html {
    scroll-behavior: smooth;
}

/* ===== TOP NAVBAR STYLES ===== */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    padding: 0 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    /*bagian warna*/
    /* Background transparan dengan efek glass */
    background-color: rgba(24, 41, 66, 0.9); /* #182942 with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Hilangkan properti yang tidak perlu */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Shadow lebih subtle */
}

/* Navbar links */
.topnav a {
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    text-align: center;
    color: #F7F5F2; /* Off-white text */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Bayangan teks halus */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active/hover states */
.topnav a:hover {
    color: #F8B51C; /* Yellow on hover */
    background-color: rgba(248, 181, 28, 0.1); /* Light yellow background on hover */
}

.topnav a.active {
    background-color: #F8B51C; /* Yellow for active */
    color: #1D1E1E; /* Dark text for active */
}

/* Hamburger icon - hidden by default */
.topnav a.icon {
    display: none;
    padding: 14px 16px;
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 600px) {
  /* Sembunyikan semua link kecuali icon */
  .topnav a:not(.icon) {
    display: none;
  }
  .topnav a.icon {
    display: block;
    position: absolute;
    top: 12px;
    right: 16px;
  }

  /* Saat tombol hamburger diklik => .responsive aktif */
  .topnav.responsive {
    display: flex !important;
    flex-direction: column;      /* Menu vertikal */
    justify-content: flex-start; /* Mulai dari atas */
    align-items: stretch;        /* Full-width */
    position: fixed;             /* Tetap di atas */
    top: 0;
    left: 0;
    width: 100%;
    padding-top: 60px;           /* Sesuaikan tinggi navbar */
    background-color: rgba(24,41,66,0.95);
    z-index: 10000;
  }

  .topnav.responsive a {
    display: block;              /* Tampilkan tiap link */
    width: 100%;                 /* Sepanjang screen */
    text-align: left;            /* Rata kiri */
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* Biarkan icon tetap di pojok kanan atas */
  .topnav.responsive a.icon {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
  }
  
  /* Khusus icon (✕), posisikan absolut di kanan atas */
  .topnav.responsive a.icon {
    display: block;             /* pastikan terlihat */
    position: absolute;
    top: 12px;                  /* sesuaikan jarak dari atas */
    right: -23px;                /* jarak dari kanan */
    padding: 8px;               /* area klik lebih nyaman */
    background: transparent;
    font-size: 24px;
    line-height: 1;
  }
}


/* Animation for menu items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*ini untuk navbar section*/
/* Perbaikan untuk konten di bawah navbar */
section:first-of-type {
    margin-top: -60px; /* Kompensasi fixed navbar */
    padding-top: 80px; /* Ruang untuk konten pertama */
}


section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem; /* Padding for small screens */
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

#intro {
    background: linear-gradient(135deg, #182942, #1D1E1E); /* Dark blue to dark gray */
    position: relative;
    color: #F7F5F2; /* Off-white text */
}

#intro img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.7; /* Slightly transparent to see gradient */
}

#intro .container {
    position: relative;
    z-index: 1;
}

/* ===== HOME SECTION RESPONSIVE ===== */
#home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: #F7F5F2;
    overflow: hidden;
    
}

#home img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.2; /* Slightly transparent to see gradient */
}

#home::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.15;
    z-index: 0;
    transition: opacity 0.3s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#home:hover::before {
    opacity: 0.2;
}

#home .container {
    position: relative;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    #home::before {
        background-size: 90% auto;
    }
    
    #home .container {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

@media (min-width: 768px) {
    #home::before {
        background-size: 70% auto;
    }
    
    #home .container {
        padding: 3rem;
    }
}

@media (min-width: 1024px) {
    #home::before {
        background-size: 60% auto;
    }
    
    #home .container {
        padding: 4rem;
    }
}

#news {
    background: #FFFFFF; /* Pure white background */
    color: #1D1E1E; /* Dark text */
}

#karya-siswa {
    background: #F7F5F2; /* Off-white background */
    color: #1D1E1E; /* Dark text */
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-item img {
    width: 100%;
    height: auto; /* Image adjusts height */
    max-height: 200px; /* Maximum height limit */
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* Default for mobile */
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for tablet and desktop */
    }
}

.flex-item {
    display: flex;
    flex-direction: column; /* Default for mobile */
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .flex-item {
        flex-direction: row; /* Row for tablet and desktop */
    }
}

.flex-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flex-item img:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

button {
    transition: background-color 0.3s ease, transform 0.3s ease;
    background-color: #F8B51C; /* Yellow buttons */
    color: #1D1E1E; /* Dark text on buttons */
}

button:hover {
    background-color: #e6a30c; /* Darker yellow on hover */
    transform: translateY(-3px);
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #FFFFFF; /* White cards */
}

.card:hover {
    transform: translateY(-5px );
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}


/* Background color adjustments for News Section */
#news .main-item {
    background-color: #182942; /* Dark blue */
    color: #F7F5F2; /* Off-white text */
}

#news .flex-item {
    background-color: #F8B51C; /* Yellow */
    color: #1D1E1E; /* Dark text */
}

/* Background color adjustments for Karya Siswa Section */
#karya-siswa .main-item {
    background-color: #182942; /* Dark blue */
    color: #F7F5F2; /* Off-white text */
}

#karya-siswa .flex-item {
    background-color: #F8B51C; /* Yellow */
    color: #1D1E1E; /* Dark text */
}

/* Responsive Font Sizes */
h1 {
    font-size: 2rem; /* Default for mobile */
    color: #ffffff; /* Dark blue headings */
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem; /* Larger for tablet and desktop */
    }
}

h2 {
    font-size: 1.5rem; /* Default for mobile */
    color: #ffffff; /* Dark blue headings */
}

@media (min-width: 768px) {
    h2 {
        font-size: 2rem; /* Larger for tablet and desktop */
    }
}

h3 {
    font-size: 1.25rem; /* Default for mobile */
    color: #182942; /* Dark blue headings */
}

@media (min-width: 768px) {
    h3 {
        font-size: 1.75rem; /* Larger for tablet and desktop */
    }
}

p {
    font-size: 1rem; /* Default for mobile */
}

@media (min-width: 768px) {
    p {
        font-size: 1.125rem; /* Larger for tablet and desktop */
    }
}

/* Update navigation buttons to match new theme */
.bg-blue-500 {
    background-color: #182942 !important; /* Dark blue */
}
.bg-blue-600 {
    background-color: #0f1d33 !important; /* Darker blue */
}
.bg-green-500 {
    background-color: #F8B51C !important; /* Yellow */
}
.bg-green-600 {
    background-color: #e6a30c !important; /* Darker yellow */
}
.bg-red-500 {
    background-color: #d9534f !important; /* Keep red for pause button */
}
.bg-red-600 {
    background-color: #c9302c !important; /* Keep darker red for pause button hover */
}

/* Update text colors in sections */
#news h2, #news h3,
#karya-siswa h2, #karya-siswa h3 {
    color: #182942; /* Dark blue headings */
}

/* Update button in intro section */
#intro button {
    background-color: #F8B51C; /* Yellow */
    color: #1D1E1E; /* Dark text */
}

#intro button:hover {
    background-color: #e6a30c; /* Darker yellow */
}