/* Style untuk website SMPIT Al-Hidayah */
:root {
  /* Warna lama:
  --primary-color: #8B4513;
  --secondary-color: #A0522D;
  --accent-color: #D2691E;
  --text-color: #333;
  --light-color: #ffffff;
  --dark-color: #4A3728;
  */
  
  /* Skema warna untuk tema sekolah Islam */
  --primary-color: #0f7f5f;    /* Hijau sebagai warna primer */
  --secondary-color: #f8b400;  /* Kuning/Emas sebagai warna sekunder */
  --accent-color: #1d3557;     /* Biru tua sebagai warna tersier/aksen */
  --text-color: #333333;       /* Abu-abu gelap untuk teks */
  --light-color: #ffffff;      /* Putih */
  --dark-color: #1d3557;       /* Biru tua sebagai warna gelap */
  --success-color: #0f7f5f;    /* Hijau */
  --warning-color: #f8b400;    /* Kuning/Emas */
  --danger-color: #e74c3c;     /* Merah */
  --info-color: #3498db;       /* Biru */
  --light-bg-color: #f8f9fa;   /* Abu-abu sangat terang */
}

/* Tambahkan style untuk hero-modern */
.hero-modern {
  background: var(--primary-color) !important;
  padding: 80px 0;
  color: white;
  text-align: center;
  margin-bottom: 2rem;
}

/* Body dan HTML styling untuk sticky navbar */
html {
  scroll-behavior: smooth;
  margin: 0 !important;
  padding: 0 !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  position: relative;
}

/* Reset semua margin dan padding untuk elemen utama */
* {
  box-sizing: border-box;
}

body > *:first-child {
  margin-top: 0 !important;
}

/* Container untuk sticky navbar */
#app {
  position: relative;
  overflow: visible;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset margin untuk elemen pertama */
#app > *:first-child,
.navbar:first-child {
  margin-top: 0 !important;
}

/* Navbar dengan tema sekolah Islam - Fixed Position */
.navbar,
.navbar-expand-lg {
  background-color: var(--light-color) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1050 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  transition: all 0.3s ease;
  padding: 8px 0 !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: block !important;
  border: none !important;
  border-radius: 0 !important;
  border-top: none !important;
}

/* Tambahkan padding-top pada body untuk mengkompensasi navbar fixed */
body {
  padding-top: 70px !important;
}

/* Media queries untuk responsivitas */
@media (max-width: 991px) {
  body {
    padding-top: 65px !important;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 60px !important;
  }
  
  .navbar {
    padding: 5px 0 !important;
  }
}

.navbar-brand {
  font-weight: bold;
  color: var(--primary-color) !important;
  transition: all 0.3s ease;
}

.nav-link {
  color: var(--primary-color) !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
}

.nav-link.active {
  background-color: var(--primary-color) !important;
  color: var(--light-color) !important;
  border-radius: 4px;
}

/* Card dengan border hijau dan kuning */
.card {
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border-left: 3px solid var(--primary-color);
  border-radius: 8px;
  background-color: var(--light-color);
}

.card:nth-child(even) {
  border-left: 3px solid var(--secondary-color);
}

/* Efek hover-scale untuk kartu galeri */
.hover-scale {
  transition: transform 0.3s ease-in-out;
}

.hover-scale:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Tombol dengan warna tema sekolah Islam */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(15, 127, 95, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #0a6a4e; /* Hijau lebih gelap */
  border-color: #0a6a4e;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(15, 127, 95, 0.3);
}

/* Tombol dengan warna accent */
.btn-accent {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--dark-color);
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(248, 180, 0, 0.2);
  transition: all 0.3s ease;
}

.btn-accent:hover {
  background-color: #e0a500; /* Kuning/Emas lebih gelap */
  border-color: #e0a500;
  color: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(248, 180, 0, 0.3);
}

/* Footer dengan warna dark */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

/* Warna untuk link */
a {
  color: var(--secondary-color);
}

a:hover {
  color: var(--accent-color);
}

/* Kelas baru untuk card-header dengan warna solid hijau */
.gradient-card-header {
  background: var(--primary-color) !important;
  border: none;
  text-align: center;
  padding: 1.5rem;
  color: white;
}

/* Kelas baru untuk rounded-circle dengan warna solid kuning */
.gradient-circle {
  background: var(--secondary-color) !important;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-color);
}

/* Kelas baru untuk teks dengan warna hijau (tema utama) */
.text-theme {
  color: var(--primary-color) !important;
}

/* Kelas baru untuk teks dengan warna kuning (aksen) */
.text-accent {
  color: var(--secondary-color) !important;
}

/* Kelas baru untuk teks dengan warna biru tua */
.text-dark-accent {
  color: var(--accent-color) !important;
}

/* Responsivitas untuk layar yang berbeda */
@media (max-width: 850px) {
    .hero {
        width: 100%;
        height: auto;
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
}

/* Spacing yang lebih konsisten */
.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

.section-lg {
    padding: 6rem 0;
}

.mb-section {
    margin-bottom: 4rem;
}

.mt-section {
    margin-top: 4rem;
}

/* Media queries tambahan untuk responsivitas mobile */
@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 10px 15px;
    }
    
    .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .gradient-card-header {
        padding: 1rem;
    }
    
    .gradient-circle {
        width: 50px;
        height: 50px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .hero-modern {
        padding: 40px 0;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .gradient-circle {
        width: 40px;
        height: 40px;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title h5 {
        font-size: 0.9rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* Shopping Cart Styles */
.shopping-cart-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
}

.shopping-cart {
    background: white;
    width: 400px;
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d6efd;
    color: white;
    border-radius: 10px 10px 0 0;
}

.cart-header h5 {
    margin: 0;
    color: white;
}

.btn-close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.btn-close-cart:hover {
    background: rgba(255,255,255,0.1);
}

.cart-items {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.item-price {
    color: #666;
    font-size: 0.9rem;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 15px;
}

.btn-quantity {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-quantity:hover {
    background: #e9ecef;
}

.quantity {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

.btn-remove {
    background: #dc3545;
    border: none;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #c82333;
}

.item-subtotal {
    font-weight: bold;
    color: var(--primary-color);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.cart-total {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
}

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color, #28a745);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s;
}

.floating-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shopping-cart {
        width: 100%;
        max-width: 100vw;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .floating-cart-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .cart-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}