/* ==========================================================================
   Website Resmi MTs Sultan Fatah Gaji, Guntur, Demak
   Style Design System (LP Ma'arif NU Green Theme with Dynamic CSS Variables)
   ========================================================================== */

:root {
    --primary-color: #008751;
    --primary-hover: #006633;
    --secondary-color: #d4af37;
    --secondary-hover: #b89628;
    --dark-color: #1a252f;
    --light-bg: #f4f7f6;
    --text-color: #333333;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Islamic Pattern Accent Background */
.bg-islamic-pattern {
    background-color: #ffffff;
    background-image: radial-gradient(var(--primary-color) 0.5px, transparent 0.5px), radial-gradient(var(--secondary-color) 0.5px, #ffffff 0.5px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.98;
}

/* Topbar Header */
.top-bar {
    background: linear-gradient(135deg, var(--dark-color), #0f172a);
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar a:hover {
    color: var(--secondary-color);
}

/* Navbar Branding */
.navbar-madrasah {
    background-color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 12px 0;
    transition: all 0.3s ease;
}

.navbar-brand-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.brand-text p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
    font-weight: 600;
}

.nav-link {
    font-weight: 600;
    color: #334155 !important;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(0, 135, 81, 0.08);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004d2e 100%);
    color: #ffffff;
    padding: 100px 0 120px;
    overflow: hidden;
}

.hero-watermark {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.08;
    width: 550px;
    pointer-events: none;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 35px;
    font-weight: 400;
}

/* Custom Buttons */
.btn-maarif {
    background-color: var(--secondary-color);
    color: #1e293b;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-maarif:hover {
    background-color: var(--secondary-hover);
    color: #0f172a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-outline-maarif {
    background-color: transparent;
    color: #ffffff;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.btn-outline-maarif:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Feature Cards */
.card-madrasah {
    background: #ffffff;
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow);
    transition: all 0.35s ease;
    height: 100%;
    overflow: hidden;
}

.card-madrasah:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 135, 81, 0.15);
}

.card-icon-wrapper {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    background: rgba(0, 135, 81, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
}

/* Headmaster Welcome Card */
.headmaster-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border-left: 6px solid var(--primary-color);
    padding: 40px;
}

.headmaster-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* News & Announcement Section */
.news-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
}

.card-madrasah:hover .news-img {
    transform: scale(1.05);
}

.badge-maarif {
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Footer Section */
.footer-madrasah {
    background: linear-gradient(180deg, #181c1a 0%, #0a0d0c 100%);
    color: #e2e8f0;
    padding: 70px 0 30px;
    border-top: 5px solid var(--secondary-color);
}

.footer-madrasah h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

.footer-madrasah h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.25s ease;
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 50px;
    padding-top: 25px;
    font-size: 0.88rem;
    color: #cbd5e1;
}

/* Navbar Dropdown Enhancements */
@media (min-width: 992px) {
    .navbar-madrasah .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.2s ease-in-out;
    }
}

.navbar-madrasah .dropdown-menu {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px;
    padding: 8px 0;
}

.navbar-madrasah .dropdown-item {
    transition: all 0.2s ease;
    color: #334155;
}

.navbar-madrasah .dropdown-item:hover {
    background-color: rgba(0, 135, 81, 0.08);
    color: var(--primary-color) !important;
    padding-left: 1.25rem !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hover-success {
    transition: color 0.2s ease;
}
.hover-success:hover {
    color: var(--primary-color, #008751) !important;
}

