/* SMA Quranic Science Boarding School - Theme CSS */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

.font-serif {
    font-family: 'Poppins', sans-serif;
}

/* Form Styling - Professional & Readable */
label {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.875rem !important; /* 14px */
    font-weight: 500 !important;
    color: #4b5563 !important; /* Gray 600 */
    text-transform: none !important; /* Disable uppercase */
    letter-spacing: normal !important;
    display: flex;
    align-items: center;
}

input, select, textarea, button {
    font-family: 'Inter', sans-serif !important;
}

/* Prevent iOS auto-zoom on focus by ensuring font-size is at least 16px */
input[type="text"], 
input[type="email"], 
input[type="number"], 
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
select, 
textarea {
    font-size: 16px !important;
}

/* Alert / Info Box Typography */
.alert, .bg-amber-50, .bg-blue-50, .bg-green-50, .bg-red-50 {
    font-family: 'Inter', sans-serif;
}

/* Mega Menu - Professional Grid Layout */
.mega-menu-panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 750px;
    background: #fff;
    border-radius: 0 0 1.5rem 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top: 4px solid #D4AF37;
    z-index: 60;
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
    overflow: hidden;
}

.mega-menu-inner {
    padding: 2rem;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 3rem;
    align-items: start;
}

/* Specific Column Balancing */
.mega-menu-col-profil { grid-column: 1; grid-row: 1; }
.mega-menu-col-direktori { grid-column: 1; grid-row: 2; }
.mega-menu-col-ekstra { grid-column: 2; grid-row: 1 / span 2; }
.mega-menu-col-karir { grid-column: 3; grid-row: 1; }

.mega-menu-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.mega-menu-title-wrapper i {
    color: #047857;
    font-size: 14px;
}

.mega-menu-title {
    font-family: 'Poppins', sans-serif !important;
    color: #064e3b !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    margin: 0 !important;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-menu-link {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #4b5563 !important;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.mega-menu-link:hover {
    color: #047857 !important;
    background-color: #f3f4f6;
    padding-left: 18px; /* Subtle slide effect */
}

.mega-menu-footer {
    background: #f9fafb;
    padding: 12px 2rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mega-menu-note {
    font-size: 10px;
    color: #6b7280;
}

.note-label {
    font-weight: 700;
    color: #064e3b;
}

.school-label {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #9ca3af;
}

/* Standard Submenu Dropdown (e.g. Prestasi) */
.submenu-dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 320px;
    background: #fff;
    border-radius: 0 0 1.25rem 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #D4AF37;
    padding: 1rem;
    z-index: 50;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    transform-origin: top;
    overflow: hidden;
}

.submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background-color: #f9fafb;
    transform: translateX(6px);
}

.submenu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.submenu-text {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.submenu-link:hover .submenu-text {
    color: #D4AF37;
}

/* Sidebar Styling */
.sidebar-widget {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.sidebar-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.sidebar-header-ad {
    background: #fffbeb;
}

.sidebar-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #047857;
}

.sidebar-widget-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 12px;
}

.news-item:hover {
    background-color: #f9fafb;
}

.news-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-thumb img {
    transform: scale(1.1);
}

.news-thumb-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #047857;
    font-size: 20px;
}

.news-info {
    flex: 1;
    min-width: 0;
}

.news-date {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: #9ca3af;
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.news-date i {
    margin-right: 4px;
    opacity: 0.6;
}

.news-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #374151;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: #047857;
}

/* News Feed Grid Cards */
.berita-card {
    background-color: #f9fafb;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.berita-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(4, 120, 87, 0.2);
}

.berita-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.berita-card:hover .berita-img {
    transform: scale(1.1);
}

.berita-date {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background-color: #ffffff;
    padding: 4px 12px;
    border-radius: 9999px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 8px;
    display: inline-block;
}

/* Button & Separator: Baca Berita Lainnya */
.btn-baca-lainnya {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    font-style: normal;
    text-transform: none;
    color: #047857;
    letter-spacing: 0.5px;
    border-radius: 9999px;
    padding: 8px 24px;
    background-color: #ecfdf5;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-baca-lainnya:hover {
    background-color: #047857;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(4, 120, 87, 0.1), 0 4px 6px -2px rgba(4, 120, 87, 0.05);
}

.berita-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #064e3b;
    margin-bottom: 1rem;
    text-transform: none;
    font-style: normal;
}

.berita-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.berita-card:hover .berita-title a {
    color: #047857;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.6);
}

/* Custom Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Swiper Custom */
.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    background-size: cover;
    background-position: center;
}

.hero-swiper .swiper-pagination {
    bottom: 30px;
}

.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    width: 8px;
    height: 8px;
    transition: all 0.4s ease;
    border-radius: 6px;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: #f59e0b;
    width: 36px;
    border-radius: 6px;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(4, 120, 87, 0.85);
    border-color: transparent;
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

/* Mega Menu Advanced Visuals */
#mega-menu-dropdown {
    position: absolute;
    overflow: hidden;
    /* For spotlight */
}

.menu-spotlight {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(4, 120, 87, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    opacity: 0;
}

#mega-menu-dropdown:hover .menu-spotlight {
    opacity: 1;
}

.group\/item {
    z-index: 2;
    position: relative;
}

/* Icon Glow & Bounce */
.icon-wrapper {
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.group\/item:hover .icon-wrapper {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.group\/item:nth-child(even):hover .icon-wrapper {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 0 25px rgba(4, 120, 87, 0.3);
}

/* Text Shimmer */
.item-title {
    background: linear-gradient(90deg, #111827, #111827, #6b7280, #111827, #111827);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.5s ease;
}

.group\/item:hover .item-title {
    background-position: right center;
}

/* Animated Border Glow */
.group\/item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1.5rem;
    /* calc(rounded-3xl - 1px) */
    background: linear-gradient(45deg, transparent, rgba(245, 158, 11, 0.3), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.group\/item:hover::before {
    opacity: 1;
}

/* Mega Menu Micro-interactions */
@keyframes dropdown-item-in {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#mega-menu-dropdown.show-items .group\/item {
    animation: dropdown-item-in 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* Staggered animation delays for the first 6 items */
#mega-menu-dropdown.show-items .group\/item:nth-child(1) {
    animation-delay: 0.1s;
}

#mega-menu-dropdown.show-items .group\/item:nth-child(2) {
    animation-delay: 0.15s;
}

#mega-menu-dropdown.show-items .group\/item:nth-child(3) {
    animation-delay: 0.2s;
}

#mega-menu-dropdown.show-items .group\/item:nth-child(4) {
    animation-delay: 0.25s;
}

#mega-menu-dropdown.show-items .group\/item:nth-child(5) {
    animation-delay: 0.3s;
}

#mega-menu-dropdown.show-items .group\/item:nth-child(6) {
    animation-delay: 0.35s;
}