/* === RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #111111; color: #222; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* === NAVBAR CUSTOM === */
.navbar-custom { background: #4287f5; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; width: 100%; }
.navbar-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0.3rem 2vw; }
.navbar-logo { display: flex; align-items: center; gap: 0.6rem; font-weight: bold; font-size: 1.1rem; color: #222; }
.logo-img { height: 38px; width: auto; object-fit: contain; }
.logo-text { font-size: 1.1rem; font-weight: 700; }

.navbar-menu { display: flex; align-items: center; gap: 0.5rem; list-style: none; transition: max-height 0.4s cubic-bezier(.77,0,.18,1), opacity 0.3s; }
.navbar-menu li 
.navbar-menu .nav-link { color: #222; padding: 0.7rem 1.2rem; font-size: 1rem; border-radius: 3px; transition: color 0.2s, background 0.2s; display: block; position: relative; }
.navbar-menu .nav-link.active,
.navbar-menu .nav-link:focus,
.navbar-menu .nav-link:hover { color: #0066cc; background: #f9f9f9; }
.navbar-menu .nav-link.active::after { content: ''; display: block; height: 2px; background: #0066cc; width: 80%; margin: 0.2rem auto 0; border-radius: 2px; }

.navbar-toggle { display: none; flex-direction: column; gap: 4px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; align-items: center; justify-content: center; }
.navbar-toggle .bar { display: block; width: 24px; height: 3px; background: #f0f7ff; border-radius: 2px; transition: all 0.3s; }

/* Hamburger animasi */
.navbar-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open .bar:nth-child(2) { opacity: 0; }
.navbar-toggle.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu (hanya aktif di <=900px) */
@media (max-width: 900px) {
  .navbar-container { 
    flex-wrap: wrap; 
    padding: 0.3rem 4vw;
  }
  .navbar-menu {
    flex-direction: column;
    background: #1a5bbf; /* Darker blue for better contrast */
    position: fixed;
    top: 70px; /* Adjust based on your navbar height */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow-y: auto;
    transition: all 0.4s ease-in-out;
    z-index: 1000;
    padding: 0;
    margin: 0;
  }
  .navbar-menu.open {
    max-height: calc(100vh - 70px);
    opacity: 1;
    padding: 15px 0;
  }
  .navbar-menu li { 
    width: 100%; 
    margin: 0;
  }
  .navbar-menu .nav-link { 
    color: #fff !important;
    padding: 12px 20px;
    font-size: 1rem;
    display: block;
    transition: all 0.2s ease;
  }
  .navbar-menu .nav-link:hover,
  .navbar-menu .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
  }
  .navbar-toggle { 
    display: flex;
    z-index: 1001;
  }
  /* Add smooth transition for mobile menu */
  .navbar-menu li {
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .navbar-menu.open li {
    transform: translateY(0);
    opacity: 1;
  }
  /* Add delay for each menu item */
  .navbar-menu.open li:nth-child(1) { transition-delay: 0.1s; }
  .navbar-menu.open li:nth-child(2) { transition-delay: 0.15s; }
  .navbar-menu.open li:nth-child(3) { transition-delay: 0.2s; }
  .navbar-menu.open li:nth-child(4) { transition-delay: 0.25s; }
  .navbar-menu.open li:nth-child(5) { transition-delay: 0.3s; }
}

/* Desktop menu (selalu horizontal, hamburger disembunyikan) */
@media (min-width: 901px) {
  .navbar-menu {
    flex-direction: row;
    position: static;
    background: none;
    max-height: none;
    opacity: 1;
    box-shadow: none;
    padding: 0;
    width: auto;
    overflow: visible;
  }
  .navbar-menu li { width: auto; }
  .navbar-toggle { display: none !important; }
}


/* === HERO SECTION === */
.hero { position: relative; min-height: 50vh; }
.hero-bg { position: relative; width: 100%; height: 350px; overflow: hidden; }
.hero-bg img { width: 100%; height: 350px; object-fit: cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30,20,10,0.45); z-index: 1; }
.hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #fff; text-align: center; z-index: 2; }
.hero-content h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.7rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 1.5rem; }
.btn-hero { background: #0066cc; color: #fff; padding: 0.7rem 2.2rem; border-radius: 30px; font-weight: bold; font-size: 1rem; border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: background 0.2s; }
.btn-hero:hover { background: #0055aa; }

@media (max-width: 600px) {
  .hero-bg, .hero-bg img { height: 200px; }
  .hero-content h1 { font-size: 1.1rem; }
  .hero-content p { font-size: 0.95rem; }
}

/* === SECTION === */
.section { padding: 2.5rem 0 1.5rem 0; }
.section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; color: #0066cc; letter-spacing: 0.5px; }

/* === SLIDER === */
.simple-slider { display: flex; align-items: center; gap: 0.5rem; }
.slider-container { display: flex; overflow-x: auto; scroll-behavior: smooth; gap: 1rem; padding-bottom: 0.5rem; }
.slider-card { background: #4287f5; border-radius: 10px; box-shadow: 0 3px 12px rgba(0,0,0,0.07); min-width: 220px; max-width: 220px; flex: 0 0 220px; transition: transform 0.2s; }
.slider-card img { border-radius: 10px 10px 0 0; height: 120px; object-fit: cover; }
.card-body { padding: 0.7rem; }
.card-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.2rem; }
.card-date { font-size: 0.92rem; color: #0066cc; }
.slider-prev, .slider-next { background: #0066cc; color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 1.2rem; cursor: pointer; transition: background 0.2s; }
.slider-prev:hover, .slider-next:hover { background: #0055aa; }

@media (max-width: 600px) {
  .slider-card { min-width: 160px; max-width: 160px; }
  .slider-card img { height: 80px; }
}

/* === ARTIKEL === */
.artikel-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.artikel-card { background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); flex: 1 1 220px; max-width: 320px; display: flex; flex-direction: column; }
.artikel-card img { border-radius: 10px 10px 0 0; height: 120px; object-fit: cover; }
.artikel-body { padding: 0.8rem; flex: 1; display: flex; flex-direction: column; }
.artikel-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.2rem; color: #222; }
.artikel-desc { font-size: 0.97rem; margin-bottom: 0.6rem; color: #444; }
.artikel-link { color: #0066cc; font-weight: 500; font-size: 0.98rem; align-self: flex-end; }
.artikel-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .artikel-row { flex-direction: column; gap: 1rem; align-items: stretch; }
  .artikel-card { max-width: 100%; }
}

/* === FOOTER === */

/* === PROFIL PAGE === */
.profil-wrapper { display: flex; gap: 2rem; max-width: 1200px; margin: 2rem auto; padding: 0 2vw; }
.profil-sidebar { width: 220px; background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 1.3rem 0.7rem; }
.profil-sidebar ul { list-style: none; }
.profil-sidebar li { padding: 0.8rem 1rem; border-radius: 6px; color: #222; font-weight: 500; margin-bottom: 0.2rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.profil-sidebar li.active, .profil-sidebar li:hover { background: #0066cc; color: #fff; }
.profil-content { flex: 1; background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 2rem; }
.profil-card { display: flex; gap: 2rem; align-items: center; }
.profil-img img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.profil-text h3 { color: #0066cc; margin-bottom: 0.8rem; }
@media (max-width: 900px) {
  .profil-wrapper { flex-direction: column; gap: 1.2rem; }
  .profil-sidebar { width: 100%; display: flex; overflow-x: auto; border-radius: 8px; box-shadow: none; padding: 0.7rem 0.3rem; }
  .profil-sidebar ul { display: flex; gap: 0.3rem; }
  .profil-sidebar li { min-width: 110px; text-align: center; font-size: 0.97rem; }
  .profil-content { padding: 1.2rem; }
  .profil-card { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* === INFORMASI PAGE === */
.info-section { max-width: 1200px; margin: 2rem auto; padding: 0 2vw; }
.info-intro { margin-bottom: 1.2rem; color: #444; font-size: 1.05rem; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.info-card { background: #4287f5; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.09); padding: 1rem; display: flex; flex-direction: column; align-items: flex-start; transition: transform 0.18s, box-shadow 0.18s; cursor: pointer; }
.info-card img { width: 100%; border-radius: 10px; height: 130px; object-fit: cover; margin-bottom: 0.7rem; }
.info-card .info-date { color: #0066cc; font-size: 0.96rem; margin-bottom: 0.4rem; }
.info-card h3 { font-size: 1.09rem; font-weight: 600; color: #222; }
.info-card.highlight { grid-row: span 2; grid-column: span 2; font-size: 1.1rem; }
.info-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,0.09); }
@media (max-width: 900px) {
  .info-section { padding: 0 1vw; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card.highlight { grid-row: auto; grid-column: auto; }
}

/* === ACARA/KALENDER === */
.calendar-container { display: flex; gap: 2.5rem; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.calendar-box { background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 1.5rem 1.2rem; min-width: 320px; }
.calendar-table { width: 100%; border-collapse: collapse; text-align: center; margin-bottom: 0.5rem; }
.calendar-table th, .calendar-table td { padding: 0.5rem; font-size: 1rem; }
.calendar-table .today { background: #0066cc; color: #fff; border-radius: 50%; }
.calendar-caption { text-align: center; color: #0066cc; font-weight: bold; }
.calendar-list { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.calendar-event { background: #4287f5; border-left: 4px solid #0066cc; padding: 1rem; border-radius: 7px; box-shadow: 0 2px 7px rgba(0,0,0,0.06); font-size: 1rem; }
@media (max-width: 900px) {
  .calendar-container { flex-direction: column; gap: 1.2rem; }
  .calendar-box { width: 100%; min-width: 0; }
}

/* === KONTAK === */
.contact-section { max-width: 1200px; margin: 2rem auto; padding: 0 2vw; }
.contact-grid { display: flex; gap: 2rem; flex-wrap: wrap; }
.contact-info { flex: 1; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-card { background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 1.2rem; margin-bottom: 0.5rem; }
.contact-card h4 { color: #0066cc; margin-bottom: 0.5rem; }
.contact-detail { font-size: 0.99rem; color: #333; }
.contact-form { flex: 2; background: #4287f5; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-form form { display: flex; flex-direction: column; gap: 0.7rem; }
.contact-form input, .contact-form textarea { border: 1px solid #eee; border-radius: 6px; padding: 0.7rem; font-size: 1rem; }
.contact-form textarea { min-height: 80px; resize: vertical; }
.contact-form button { align-self: flex-end; }
.contact-jam, .contact-lokasi { background: #f7f7f7; border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.5rem; }
@media (max-width: 900px) {
  .contact-grid { flex-direction: column; gap: 1.2rem; }
  .contact-form { padding: 1rem; }
}

/* === ANIMASI KARTU & SIDEBAR === */
.slider-card, .artikel-card, .info-card, .calendar-event, .contact-card {
  transition: transform 0.18s, box-shadow 0.18s;
}
.slider-card:hover, .artikel-card:hover, .info-card:hover, .calendar-event:hover, .contact-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.profil-sidebar li { transition: background 0.2s, color 0.2s, transform 0.16s; }
.profil-sidebar li:hover { transform: scale(1.05); }

/* === UTILITIES === */
.mt-5 { margin-top: 3rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.pt-5 { padding-top: 2.5rem !important; }
.pb-3 { padding-bottom: 1.2rem !important; }

/* === RESPONSIVE PATCH: ANTI OVERFLOW DAN MOBILE FIT === */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
.container, .calendar-container, .info-section, .contact-section, .profil-wrapper {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Default desktop styles for section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: #1a5bbf; /* Updated to match the blue color from Artikel section */
    margin: 0;
}

.view-all {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.view-all:hover i {
    transform: translateX(3px);
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Center Galeri Acara section on mobile */
    #galeri-acara .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;
        width: 100%;
    }
    
    #galeri-acara .section-title {
        width: 100%;
        text-align: center;
        margin: 0 auto 10px;
        padding: 0 15px;
        font-size: 1.8rem;
    }
    
    #galeri-acara .view-all {
        margin: 10px auto 0;
        display: inline-flex;
        text-align: center;
        justify-content: center;
    }
    
    .hero { 
        min-height: 60vw; 
        height: 60vw; 
        margin: 0 !important;
  }
  .section-title {
    font-size: 1.3rem !important;
  }
  .navbar-container, .container, .calendar-container, .info-section, .contact-section, .profil-wrapper {
    padding-left: 2vw !important;
    padding-right: 2vw !important;
  }
  .artikel-card, .info-card, .calendar-box, .contact-card, .profil-content {
    padding: 1rem !important;
    font-size: 0.98rem;
  }
  .profil-sidebar li {
    min-width: 80px;
    font-size: 0.9rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 70px 0;
    min-height: 50vh;
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 1.3rem !important;
  }
  .navbar-container, .container, .calendar-container, .info-section, .contact-section, .profil-wrapper {
    padding-left: 2vw !important;
    padding-right: 2vw !important;
  }
  .artikel-card, .info-card, .calendar-box, .contact-card, .profil-content {
    padding: 1rem !important;
    font-size: 0.98rem;
  }
  .profil-sidebar li {
    min-width: 80px;
    font-size: 0.9rem;
  }
}
