:root {
   --color-primary: #0f172a;
   --color-secondary: #1e293b;
   --color-accent: #3b82f6;
   --color-highlight: #f59e0b;
   --color-light: #f8fafc;
}

body {
   font-family: 'Poppins', sans-serif;
   background-color: var(--color-light);
   color: var(--color-secondary);
}

.text-primary-custom {
   color: var(--color-primary) !important;
}

.text-accent {
   color: var(--color-accent) !important;
}

.bg-primary-custom {
   background-color: var(--color-primary) !important;
}

.bg-highlight {
   background-color: var(--color-highlight) !important;
}

.btn-highlight {
   background-color: var(--color-highlight);
   color: #fff;
   font-weight: 600;
   transition: all 0.3s ease;
}

.btn-highlight:hover {
   background-color: #d97706;
   color: #fff;
   transform: translateY(-2px);
}

.navbar-custom {
   background-color: rgba(255, 255, 255, 0.98);
   backdrop-filter: blur(10px);
}

.nav-link {
   font-weight: 500;
   color: var(--color-secondary) !important;
   position: relative;
}

.nav-link:hover,
.nav-link.active {
   color: var(--color-accent) !important;
}

.nav-link:not(.dropdown-toggle)::before {
   /*content: '';*/
   position: absolute;
   width: 0;
   height: 2px;
   bottom: 0;
   left: 50%;
   background-color: var(--color-accent);
   transition: all 0.3s ease;
   transform: translateX(-50%);
}

.nav-link:not(.dropdown-toggle):hover::before,
.nav-link:not(.dropdown-toggle).active::before {
   width: 80%;
}

@media (min-width: 1200px) {
   .nav-item.dropdown:hover .dropdown-menu {
      display: block;
      animation: fadeDropdown 0.3s ease forwards;
      margin-top: 0;
   }
}

@keyframes fadeDropdown {
   from {
      opacity: 0;
      transform: translateY(10px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.dropdown-menu {
   min-width: 200px;
}

.carousel {
   position: relative;
   z-index: 1;
}

.carousel-item {
   height: 500px;
   background-color: #000;
   position: relative;
}

.carousel-item img {
   width: 100%;
   height: 500px;
   object-fit: cover;
   object-position: center;
   opacity: 1;
}

.carousel-caption {
   position: absolute;
   top: auto !important;
   right: 0;
   bottom: 10px !important;
   left: 0;
   padding: 30px 0 20px;
   text-align: left;
   display: block !important;
   background: transparent;
   pointer-events: none;
   z-index: 2;
}

.carousel-caption p,
.carousel-caption h1 {
   text-shadow:
   -2px -2px 0 #000,
   2px -2px 0 #000,
   -2px  2px 0 #000,
   2px  2px 0 #000,
   0 4px 8px rgba(0, 0, 0, 0.9);
}

.carousel-control-prev,
.carousel-control-next {
   position: absolute;
   top: 0;
   bottom: 0;
   width: 10%;
   z-index: 20 !important;
   opacity: 1;
   pointer-events: auto !important;
}

.carousel-control-prev {
   left: 0;
}

.carousel-control-next {
   right: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
   position: relative;
   z-index: 21;
   pointer-events: none;
}

.carousel-indicators {
   position: absolute;
   bottom: 10px !important;
   left: 0;
   right: 0;
   margin: 0 !important;
   padding: 0;
   z-index: 30 !important;
   pointer-events: auto !important;
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 5px;
}

.carousel-indicators button {
   width: 35px;
   height: 4px;
   margin: 0;
   padding: 0;
   border: 0;
   border-radius: 10px;
   background-color: #fff;
   opacity: 0.5;
   cursor: pointer;
   transition:
      width 0.3s ease,
      opacity 0.3s ease,
      background-color 0.3s ease;
   pointer-events: auto !important;
}

.carousel-indicators button.active {
   width: 50px;
   opacity: 1;
   background-color: var(--color-highlight);
}

@media (max-width: 768px) {
   .carousel-item {
      height: 420px;
   }

   .carousel-item img {
      height: 420px;
   }

   .carousel-caption {
      bottom: 45px !important;
      padding: 25px 20px 15px;
   }

   .carousel-caption p {
      font-size: 0.95rem !important;
      margin-bottom: 1rem !important;
   }

   .carousel-caption h1 {
      font-size: 2rem;
   }

   .carousel-caption .badge {
      font-size: 0.8rem !important;
   }

   .carousel-indicators {
      bottom: 5px !important;
      gap: 3px;
   }

   .carousel-indicators button {
      width: 20px;
      height: 3px;
   }

   .carousel-indicators button.active {
      width: 30px;
   }
}

.hover-card {
   transition:
      transform 0.3s ease,
      box-shadow 0.3s ease;
}

.hover-card:hover {
   transform: translateY(-10px);
   box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

#widgetPPDB {
   position: fixed;
   top: 75%;
   right: 20px;
   transform: translateY(-50%);
   z-index: 1050;
   width: 260px;
   animation: float 3s ease-in-out infinite;
}

@keyframes float {
   0% {
      transform: translateY(calc(-50% - 5px));
   }

   50% {
      transform: translateY(calc(-50% + 5px));
   }

   100% {
      transform: translateY(calc(-50% - 5px));
   }
}

.icon-box {
   width: 60px;
   height: 60px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 15px;
   background: rgba(59, 130, 246, 0.1);
   color: var(--color-accent);
   font-size: 1.5rem;
   margin-bottom: 1rem;
}

/* ================= NAVBAR MOBILE ================= */
@media (max-width: 767.98px) {

    /* Sembunyikan logo */
    .school-logo {
        display: none !important;
    }

    /* Identitas sekolah tetap tampil */
    .school-identity {
        display: block !important;
        margin-left: 0 !important;
        line-height: 1.3;
    }

    /* Ukuran tulisan identitas */
    .school-identity span {
        font-size: 14px !important;
        line-height: 1.35;
    }

    /* Nama sekolah lebih besar dan tebal */
    .school-identity h1 {
        font-size: 16px !important;
        line-height: 1.25;
        font-weight: 700 !important;
    }

    /* Brand menggunakan ruang yang tersedia */
    .navbar-brand {
        max-width: calc(100% - 60px);
        margin-right: 0 !important;
    }

    /* Tombol hamburger */
    .navbar-toggler {
        margin-left: auto;
        padding: 8px;
    }

    .navbar-toggler i {
        font-size: 1.8rem !important;
    }

    /* Menu navbar mobile */
    .navbar-nav .nav-link {
        font-size: 16px !important;
        font-weight: 600;
        padding: 13px 15px !important;
    }

    /* Dropdown */
    .navbar-nav .dropdown-item {
        font-size: 15px !important;
        padding: 11px 15px !important;
    }
}

@media (max-width: 400px) {
    .school-identity span {
        font-size: 12px !important;
    }

    .school-identity h1 {
        font-size: 14px !important;
    }
}

/* =========================================================
   GALERI
========================================================= */

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

.gallery-image {
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.08);
}


/* Overlay */

.gallery-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.45);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;

    transition: all 0.3s ease;
}

.gallery-overlay i {
    width: 50px;
    height: 50px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    color: var(--color-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    transform: scale(0.7);

    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}


/* =========================================================
   MODAL GALERI
========================================================= */

/* =========================================================
   FULLSCREEN GALLERY
========================================================= */

.gallery-fullscreen-modal {
    background: rgba(0, 0, 0, 0.88);
}

.gallery-fullscreen-modal .modal-dialog {
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
}

.gallery-fullscreen-modal .modal-content {
    width: 100%;
    height: 100%;

    background: transparent !important;

    border: none !important;
    border-radius: 0 !important;

    box-shadow: none !important;
}

.gallery-fullscreen-modal .modal-body {
    position: relative;

    width: 100%;
    height: 100%;

    padding: 0;

    background: transparent !important;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-image-wrapper {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 70px 100px 100px;
}

#galleryModalImage {
    display: block;

    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;

    border-radius: 4px;

    box-shadow:
        0 10px 50px rgba(0, 0, 0, 0.45);
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.gallery-close {
    position: absolute;

    top: 20px;
    right: 25px;

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.55);

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;

    cursor: pointer;

    z-index: 20;

    transition: all 0.25s ease;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #111;

    transform: rotate(90deg);
}


/* =========================================================
   PREVIOUS / NEXT
========================================================= */

.gallery-control {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    width: 55px;
    height: 55px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.55);

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;

    cursor: pointer;

    z-index: 20;

    transition: all 0.25s ease;
}

.gallery-control:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #111;
}

.gallery-control-prev {
    left: 25px;
}

.gallery-control-next {
    right: 25px;
}


/* =========================================================
   INFO / TITLE
========================================================= */

.gallery-info {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 35px 20px 20px;

    text-align: center;

    color: white;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0)
    );

    pointer-events: none;

    z-index: 10;
}

.gallery-title {
    font-size: 18px;
    font-weight: 600;

    text-shadow:
        2px 2px 3px rgba(0, 0, 0, 0.9);
}

.gallery-counter {
    margin-top: 4px;

    font-size: 13px;

    color: rgba(255, 255, 255, 0.7);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .gallery-image-wrapper {
        padding: 70px 55px 90px;
    }

    .gallery-close {
        top: 15px;
        right: 15px;

        width: 42px;
        height: 42px;

        font-size: 17px;
    }

    .gallery-control {
        width: 42px;
        height: 42px;

        font-size: 14px;
    }

    .gallery-control-prev {
        left: 10px;
    }

    .gallery-control-next {
        right: 10px;
    }

    .gallery-title {
        font-size: 15px;
    }

    .gallery-counter {
        font-size: 12px;
    }

}



/* =========================================================
   BUTTON PREV / NEXT
========================================================= */

.gallery-control {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    width: 50px;
    height: 50px;

    border: 0;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.55);

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 5;

    transition: all 0.3s ease;
}

.gallery-control:hover {
    background: var(--color-primary);
}

.gallery-control-prev {
    left: 20px;
}

.gallery-control-next {
    right: 20px;
}


/* =========================================================
   CAPTION
========================================================= */

.gallery-caption {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 35px 25px 20px;

    color: white;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0)
    );

    text-align: center;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .gallery-image {
        height: 160px !important;
    }

    .gallery-control {
        width: 40px;
        height: 40px;

        font-size: 14px;
    }

    .gallery-control-prev {
        left: 10px;
    }

    .gallery-control-next {
        right: 10px;
    }

    .gallery-caption {
        padding: 30px 15px 15px;
    }

    .gallery-caption h5 {
        font-size: 15px;
    }

}

/* Submenu normal */
.navbar-nav .dropdown-menu {
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Item submenu normal */
.navbar-nav .dropdown-menu .dropdown-item {
    color: var(--color-secondary) !important;
    background-color: transparent !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Saat hover */
.navbar-nav .dropdown-menu .dropdown-item:hover {
    background-color: #0061FF !important;
    color: #ffffff !important;
}

/* =========================================================
   MAP LOKASI SEKOLAH
========================================================= */

.map-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .map-wrapper {
        height: 300px;
    }
}

