/* ============================================================
   common.css — Khanqah Chishtiya Shared Stylesheet
   Style: Neumorphism with Islamic Green & Gold Theme
   ============================================================ */

/* ---------- CSS Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary-green: #1a472a;
    --dark-green: #0d2818;
    --light-green: #2d5a3c;
    --cream-bg: #e8e4de;
    --off-white: #edeae4;
    --gold-accent: #c9a959;
    --light-gold: #e4d4a4;
    --text-dark: #2c2c2c;
    --text-light: #5a5a5a;
    --header-height: 120px;
    --success-green: #2e7d32;
    --error-red: #c62828;
    --warning-orange: #f57c00;

    /* Neumorphism Shadows (light surface) */
    --neu-bg: #e8e4de;
    --neu-shadow-dark: rgba(180, 165, 140, 0.7);
    --neu-shadow-light: rgba(255, 255, 255, 0.85);
    --neu-raised: 6px 6px 14px var(--neu-shadow-dark), -6px -6px 14px var(--neu-shadow-light);
    --neu-inset: inset 4px 4px 10px var(--neu-shadow-dark), inset -4px -4px 10px var(--neu-shadow-light);
    --neu-flat: 3px 3px 8px var(--neu-shadow-dark), -3px -3px 8px var(--neu-shadow-light);

    /* Neumorphism Shadows (dark/green surface) */
    --neu-green-bg: #1a472a;
    --neu-green-dark: rgba(8, 26, 14, 0.8);
    --neu-green-light: rgba(44, 96, 60, 0.6);
    --neu-green-raised: 4px 4px 12px var(--neu-green-dark), -4px -4px 12px var(--neu-green-light);

    --card-shadow: var(--neu-raised);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', serif;
    background-color: var(--neu-bg);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--primary-green);
}

h4 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: var(--primary-green);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Section Title ---------- */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ---------- Neumorphic Card ---------- */
.card,
.neu-card {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.card:hover,
.neu-card:hover {
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
    transform: translateY(-4px);
}

/* Inset variant */
.neu-inset {
    background: var(--neu-bg);
    border-radius: 12px;
    box-shadow: var(--neu-inset);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--neu-bg);
    color: var(--primary-green);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--neu-raised);
    text-decoration: none;
}

.btn:hover {
    box-shadow: var(--neu-inset);
    transform: translateY(1px);
    color: var(--dark-green);
}

.btn:active {
    box-shadow: var(--neu-inset);
    transform: translateY(2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Primary (filled green) button */
.btn-primary {
    background: var(--primary-green);
    color: var(--off-white);
    box-shadow: var(--neu-green-raised);
}

.btn-primary:hover {
    background: var(--dark-green);
    color: var(--light-gold);
    box-shadow: inset 3px 3px 8px var(--neu-green-dark), inset -3px -3px 8px var(--neu-green-light);
    transform: translateY(1px);
}

/* Gold button */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-accent), var(--light-gold));
    color: var(--dark-green);
    box-shadow: 4px 4px 12px rgba(180, 140, 60, 0.4), -3px -3px 10px rgba(255, 240, 180, 0.5);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--light-gold), var(--gold-accent));
    color: var(--dark-green);
    box-shadow: inset 3px 3px 8px rgba(160, 120, 40, 0.4), inset -3px -3px 8px rgba(255, 245, 200, 0.6);
    transform: translateY(1px);
}

.btn-small {
    padding: 8px 18px;
    font-size: 0.85rem;
}

/* Loading spinner on button */
.btn-loading {
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--off-white);
    border-radius: 50%;
    animation: btn-spin 0.8s ease infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Header ---------- */
header {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--primary-green) 100%);
    color: var(--off-white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.header-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--off-white);
    margin: 0 0 14px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.logo h1 span {
    color: var(--light-gold);
    font-weight: 400;
}

/* ---------- Navigation ---------- */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--light-gold);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--gold-accent);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
    border-radius: 1px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* ---------- Page Header (inner pages) ---------- */
.page-header {
    background: linear-gradient(rgba(13, 40, 24, 0.88), rgba(26, 71, 42, 0.92)),
        url('images/building/khanqah001.jpg') center/cover no-repeat;
    padding: 6rem 0 4rem;
    text-align: center;
    color: var(--off-white);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.3) 100%);
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--off-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.page-header p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--light-gold);
    font-style: italic;
}

/* ---------- Hero/Banner sections ---------- */
.donation-hero,
.contact-hero,
.nizam-hero {
    background: linear-gradient(rgba(13, 40, 24, 0.88), rgba(26, 71, 42, 0.92)),
        url('images/building/khanqah007.jpg') center/cover no-repeat;
    padding: 5rem 0;
    text-align: center;
    color: var(--off-white);
}

.donation-hero h1,
.contact-hero h1,
.nizam-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--off-white);
    margin-bottom: 1.2rem;
}

.donation-hero p,
.contact-hero p,
.nizam-hero p {
    font-size: 1.05rem;
    max-width: 750px;
    margin: 0 auto;
    color: var(--light-gold);
    line-height: 1.8;
}

/* ---------- Neumorphic Section Cards ---------- */
.section-card {
    background: var(--neu-bg);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--neu-raised);
}

/* ---------- Quote Box ---------- */
.quote-box {
    background: var(--neu-bg);
    border-left: 4px solid var(--gold-accent);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-light);
    border-radius: 0 12px 12px 0;
    box-shadow: var(--neu-flat);
}

/* ---------- Info Cards ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
    transform: translateY(-4px);
}

.info-card .info-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    color: var(--gold-accent);
    font-size: 1.4rem;
    box-shadow: var(--neu-green-raised);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--primary-green);
}

.info-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- Form Styles ---------- */
.form-card {
    background: var(--neu-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--neu-raised);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--primary-green);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--neu-bg);
    box-shadow: var(--neu-inset);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    box-shadow: var(--neu-inset), 0 0 0 2px var(--gold-accent);
}

.form-control::placeholder {
    color: #aaa;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231a472a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

.form-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

/* ---------- UPI Donation Styles ---------- */
.upi-id-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--neu-bg);
    border-radius: 16px;
    box-shadow: var(--neu-inset);
}

.upi-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.upi-id {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
    margin-bottom: 1rem;
    word-break: break-all;
}

.copy-btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.copy-feedback {
    color: var(--success-green);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 1.2em;
}

/* UPI App Buttons Grid */
.upi-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0;
}

.upi-app-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    background: var(--neu-bg);
    box-shadow: var(--neu-raised);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    font-family: 'Cinzel', serif;
}

.upi-app-btn:hover {
    box-shadow: var(--neu-inset);
    transform: translateY(2px);
}

.upi-app-btn:active {
    box-shadow: var(--neu-inset);
}

.upi-app-btn .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--neu-raised);
}

.upi-app-btn .app-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

.upi-app-btn .app-sub {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* App color icons */
.icon-paytm {
    background: linear-gradient(135deg, #00BAF2, #0080CF);
    color: white;
}

.icon-phonepe {
    background: linear-gradient(135deg, #5f259f, #8A2BE2);
    color: white;
}

.icon-gpay {
    background: linear-gradient(135deg, #4285F4, #34A853);
    color: white;
}

.icon-bhim {
    background: linear-gradient(135deg, #FF6B1A, #FF4500);
    color: white;
}

.icon-upi {
    background: linear-gradient(135deg, #097939, #00A86B);
    color: white;
}

/* Offline donation accordion */
.offline-donation {
    background: var(--neu-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--neu-raised);
    margin-bottom: 2rem;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.8rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.accordion-header h3 {
    font-size: 1.05rem;
    color: var(--primary-green);
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--gold-accent);
}

.accordion-header.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 1.8rem;
}

.accordion-content.active {
    max-height: 800px;
    padding: 1rem 1.8rem 1.8rem;
}

.offline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.offline-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--neu-raised);
}

/* Transparency Note */
.transparency-note {
    background: var(--neu-bg);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--neu-inset);
    font-size: 0.88rem;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.7;
}

.instruction-note {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0.5rem 0 1.5rem;
}

.footer-note {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-style: italic;
    font-size: 1.05rem;
}

/* ---------- Online Donation Section ---------- */
.online-donation {
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Contact Form Specific ---------- */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.info-section {
    margin-top: 4rem;
}

.info-section .section-title {
    text-align: left;
}

.info-section .section-title::after {
    left: 0;
    transform: none;
}

/* ---------- Media Player ---------- */
.main-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    padding: 2rem 0 3rem;
    align-items: start;
}

.player-section {
    background: var(--neu-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--neu-raised);
}

.player-wrapper {
    background: #000;
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
}

.player-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

.video-info {
    padding: 1.8rem;
}

.video-info h2 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--dark-green);
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.video-category {
    background: var(--primary-green);
    color: var(--light-gold);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.video-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--neu-bg);
    border-radius: 10px;
    box-shadow: var(--neu-inset);
}

.navigation-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Related Videos Sidebar */
.related-section {
    background: var(--neu-bg);
    border-radius: 20px;
    box-shadow: var(--neu-raised);
    overflow: hidden;
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

.related-header {
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.related-header h2 {
    font-size: 1rem;
    color: var(--off-white);
    letter-spacing: 0.08em;
}

.related-count {
    background: var(--gold-accent);
    color: var(--dark-green);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.related-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem;
}

.related-list::-webkit-scrollbar {
    width: 4px;
}

.related-list::-webkit-scrollbar-track {
    background: transparent;
}

.related-list::-webkit-scrollbar-thumb {
    background: var(--gold-accent);
    border-radius: 2px;
}

.related-item {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 0.3rem;
}

.related-item:hover,
.related-item.active {
    background: rgba(26, 71, 42, 0.08);
    box-shadow: var(--neu-inset);
}

.related-thumbnail {
    width: 90px;
    height: 60px;
    background: var(--dark-green);
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-gold);
    font-size: 1.2rem;
    box-shadow: var(--neu-flat);
}

.play-icon-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(201, 169, 89, 0.9);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-green);
    font-size: 0.7rem;
}

.related-info h3 {
    font-size: 0.82rem;
    color: var(--primary-green);
    margin-bottom: 0.3rem;
    line-height: 1.3;
    font-family: 'Cinzel', serif;
}

.related-info p {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ---------- Loading / Error / Empty states ---------- */
.loading-container,
.error-container,
.empty-container {
    text-align: center;
    padding: 4rem 1.5rem;
}

.loading-container i,
.error-container i,
.empty-container i {
    font-size: 3rem;
    color: var(--gold-accent);
    margin-bottom: 1.5rem;
    display: block;
}

.loading-container h3,
.error-container h3,
.empty-container h3 {
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.loading-container p,
.error-container p,
.empty-container p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.fa-spin {
    animation: fa-spin 1.5s linear infinite;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---------- Member / Teacher Cards ---------- */
.member-card,
.teacher-card {
    background: var(--neu-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.member-card:hover,
.teacher-card:hover {
    transform: translateY(-6px);
    box-shadow: 10px 10px 24px var(--neu-shadow-dark), -10px -10px 24px var(--neu-shadow-light);
}

.member-img,
.teacher-img,
.teacher-photo {
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-img img,
.teacher-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-img i,
.teacher-img i {
    font-size: 4.5rem;
    color: var(--gold-accent);
    opacity: 0.5;
}

.teacher-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 4rem;
    opacity: 0.5;
}

.member-info,
.teacher-info {
    padding: 1.5rem;
}

.member-info h3,
.teacher-info h3,
.teacher-name {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.member-role,
.teacher-title {
    color: var(--gold-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.teacher-location {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.teacher-role h4 {
    font-size: 0.95rem;
    color: var(--primary-green);
    margin-bottom: 0.3rem;
}

.teacher-role p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.teacher-description p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

/* ---------- Gallery Specific ---------- */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.image-item {
    border-radius: 14px;
    overflow: hidden;
    height: 220px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    box-shadow: var(--neu-raised);
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.06);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(13, 40, 24, 0.9));
    color: var(--off-white);
    padding: 1.2rem;
    transform: translateY(6px);
    transition: transform 0.3s ease;
}

.image-overlay h4 {
    font-size: 0.85rem;
    font-family: 'Cinzel', serif;
}

.image-item:hover .image-overlay {
    transform: translateY(0);
}

.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.video-card {
    background: var(--neu-bg);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--neu-raised);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 10px 10px 24px var(--neu-shadow-dark), -10px -10px 24px var(--neu-shadow-light);
}

.video-thumbnail {
    height: 165px;
    position: relative;
    background: linear-gradient(135deg, var(--dark-green), var(--light-green));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-gold);
    font-size: 1.8rem;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(201, 169, 89, 0.9);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-green);
    font-size: 1.3rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-card:hover .video-play-icon {
    background: var(--gold-accent);
    transform: translate(-50%, -50%) scale(1.12);
}

.video-info {
    padding: 1.2rem;
}

.video-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    color: var(--dark-green);
    font-family: 'Cinzel', serif;
}

.video-info p {
    color: var(--text-light);
    font-size: 0.82rem;
}

.gallery-section {
    padding: 2.5rem 0;
}

.category-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold-accent);
    display: inline-block;
    color: var(--dark-green);
}

/* ---------- Management / Nazim Profile ---------- */
.nazim-section {
    padding: 4rem 0;
}

.nazim-profile {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
}

.nazim-image-container {
    position: sticky;
    top: 140px;
}

.nazim-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.nazim-image:hover {
    transform: scale(1.02);
    box-shadow: 10px 10px 28px var(--neu-shadow-dark), -10px -10px 28px var(--neu-shadow-light);
}

.nazim-details h2 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.nazim-title {
    color: var(--gold-accent);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
}

.nazim-bio {
    color: var(--text-light);
}

.nazim-bio p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    font-size: 1rem;
}

.nazim-bio h3 {
    font-size: 1.2rem;
    margin: 2rem 0 0.8rem;
    color: var(--primary-green);
}

.nazim-bio ul {
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.nazim-bio li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Principles Grid */
.principles-section {
    padding: 4rem 0;
    background: var(--cream-bg);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.principle-card {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.principle-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
}

.principle-card i {
    font-size: 2.2rem;
    color: var(--gold-accent);
    margin-bottom: 1.2rem;
    display: block;
}

.principle-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.principle-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Image Highlight */
.image-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight-img {
    border-radius: 14px;
    overflow: hidden;
    height: 270px;
    position: relative;
    box-shadow: var(--neu-raised);
}

.highlight-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.highlight-img:hover img {
    transform: scale(1.05);
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 40, 24, 0.85);
    color: var(--off-white);
    padding: 0.8rem 1rem;
    text-align: center;
    font-size: 0.88rem;
}

/* ---------- Nizam-e-Khanqah Specific ---------- */
.routine-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.routine-card {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.routine-card:hover {
    transform: translateY(-4px);
}

.routine-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    box-shadow: var(--neu-green-raised);
}

.routine-card h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: var(--primary-green);
}

.routine-card p {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.7;
}

.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.edu-item {
    background: var(--neu-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.edu-item:hover {
    transform: translateY(-3px);
}

.edu-item h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    color: var(--primary-green);
}

.edu-item h4 i {
    color: var(--gold-accent);
}

.edu-item p {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.7;
}

.discipline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.discipline-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--neu-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.discipline-item:hover {
    transform: translateY(-3px);
}

.discipline-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.discipline-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.discipline-content p {
    font-size: 0.87rem;
    color: var(--text-light);
    line-height: 1.6;
}

.spiritual-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.spiritual-highlight {
    background: var(--neu-bg);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--neu-raised);
}

.spiritual-highlight h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
}

.spiritual-highlight p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

.community-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.community-text p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.community-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.community-feature {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
    color: var(--primary-green);
}

.feature-text p {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
}

.closing-note {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--neu-inset);
    margin-bottom: 2rem;
}

.closing-note p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    font-style: italic;
}

.nizam-content {
    padding-bottom: 3rem;
}

.content-section {
    padding: 3rem 0;
}

.intro-section {
    padding: 2rem 0;
}

.intro-text p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

/* ---------- Privacy / Terms ---------- */
.policy-section {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.policy-section:hover {
    transform: translateY(-3px);
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
}

.policy-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.policy-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.policy-header h2 {
    font-size: 1.2rem;
    color: var(--primary-green);
}

.policy-body p,
.policy-body li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.policy-list {
    margin-left: 1.5rem;
}

.policy-list li {
    margin-bottom: 0.5rem;
}

.highlight-box {
    background: var(--neu-bg);
    border-left: 4px solid var(--gold-accent);
    padding: 1rem 1.5rem;
    border-radius: 0 10px 10px 0;
    box-shadow: var(--neu-inset);
    margin-top: 1rem;
}

.highlight-box p {
    font-size: 0.9rem !important;
    color: var(--text-dark) !important;
}

.update-info {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.legal-disclaimer {
    text-align: center;
    padding: 2rem;
    background: var(--neu-bg);
    border-radius: 14px;
    box-shadow: var(--neu-inset);
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.privacy-content,
.terms-content {
    padding-bottom: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Terms accordion */
.terms-accordion {
    margin-bottom: 2rem;
}

.accordion-item {
    background: var(--neu-bg);
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: var(--neu-raised);
    overflow: hidden;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.accordion-title .accordion-icon {
    color: var(--gold-accent);
    font-size: 1.1rem;
}

.accordion-title h3 {
    font-size: 1rem;
    color: var(--primary-green);
}

.accordion-header[data-accordion] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-header[data-accordion]:hover {
    background: rgba(0, 0, 0, 0.03);
}

.accordion-header[data-accordion]>i {
    color: var(--gold-accent);
    transition: transform 0.3s;
}

.accordion-header[data-accordion].active>i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content.active {
    max-height: 1000px;
}

.terms-body {
    padding: 0 1.5rem 1.5rem;
}

.terms-body p,
.terms-body li {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 0.7rem;
}

.terms-body ul {
    margin-left: 1.5rem;
}

.important-note {
    background: var(--neu-bg);
    border-left: 4px solid var(--gold-accent);
    padding: 1rem 1.2rem;
    border-radius: 0 8px 8px 0;
    box-shadow: var(--neu-inset);
    margin-top: 1rem;
}

/* ---------- Admin Dashboard ---------- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--neu-bg);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--neu-raised);
    width: 100%;
    max-width: 480px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-light);
    font-size: 0.88rem;
}

.dashboard-container {
    display: none;
    min-height: 100vh;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: var(--off-white);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title h1 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--off-white);
    margin-bottom: 0.2rem;
}

.header-title p {
    color: var(--light-gold);
    font-size: 0.9rem;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--off-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-main {
    padding: 2.5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--neu-raised);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    color: var(--gold-accent);
    font-size: 1.6rem;
    box-shadow: var(--neu-green-raised);
}

.stat-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 0.4rem;
    font-family: 'Cinzel Decorative', cursive;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.messages-section {
    margin-top: 3rem;
}

.messages-table-container {
    background: var(--neu-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--neu-raised);
    overflow-x: auto;
}

.messages-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.messages-table thead {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: var(--off-white);
}

.messages-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    font-family: 'Cinzel', serif;
}

.messages-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.messages-table tbody tr:hover {
    background: rgba(26, 71, 42, 0.04);
}

.messages-table td {
    padding: 1rem 1.2rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.message-preview {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-date {
    color: var(--text-light);
    font-size: 0.82rem;
    white-space: nowrap;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: var(--neu-bg);
    box-shadow: var(--neu-flat);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.action-btn:hover {
    box-shadow: var(--neu-inset);
}

.action-btn.view:hover {
    color: var(--success-green);
}

.action-btn.delete:hover {
    color: var(--error-red);
}

.no-messages {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-messages i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gold-accent);
    opacity: 0.4;
    display: block;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--neu-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 20px 20px 60px var(--neu-shadow-dark), -20px -20px 60px var(--neu-shadow-light);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    color: var(--off-white);
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--off-white);
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--off-white);
    font-size: 1.4rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-body {
    padding: 2rem;
}

.message-detail-group {
    margin-bottom: 1.5rem;
}

.message-detail-label {
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.message-detail-value {
    background: var(--neu-bg);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    box-shadow: var(--neu-inset);
    color: var(--text-dark);
    font-size: 0.95rem;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 3rem;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 5px solid rgba(26, 71, 42, 0.1);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-danger {
    background: var(--error-red);
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
    color: white;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

/* ---------- Contact specific ---------- */
.contact-hero {
    background: linear-gradient(rgba(13, 40, 24, 0.88), rgba(26, 71, 42, 0.92)),
        url('images/building/khanqah001.jpg') center/cover;
    padding: 5rem 0;
    text-align: center;
    color: var(--off-white);
}

.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--off-white);
    margin-bottom: 1.2rem;
}

.hero-content p {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--light-gold);
    line-height: 1.8;
}

/* ---------- Donation buttons (index page) ---------- */
.donation-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.donation-btn {
    background: var(--neu-bg);
    border: none;
    color: var(--dark-green);
    padding: 1rem 1.8rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--neu-raised);
    font-size: 0.9rem;
}

.donation-btn:hover {
    box-shadow: var(--neu-inset);
    transform: translateY(2px);
}

.donation-btn i {
    font-size: 1.5rem;
    color: var(--gold-accent);
}

/* ---------- Gallery Preview (index) ---------- */
.gallery-item {
    border-radius: 14px;
    overflow: hidden;
    height: 230px;
    position: relative;
    cursor: pointer;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 20px var(--neu-shadow-dark), -8px -8px 20px var(--neu-shadow-light);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(13, 40, 24, 0.9));
    color: var(--off-white);
    padding: 1.2rem;
    transform: translateY(8px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
}

/* ---------- Hero section (index) ---------- */
.hero {
    min-height: calc(100svh - 120px);
    background: linear-gradient(rgba(26, 71, 42, 0.85), rgba(13, 40, 24, 0.92)),
        url('images/building/khanqah007.jpg') center/cover no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: var(--off-white);
    text-align: center;
    padding: 40px 0;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
}

.hero h2 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin-bottom: 1.5rem;
    color: var(--off-white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

.mission-statement {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-style: italic;
    color: var(--light-gold);
    padding: 1rem 2rem;
    border-left: 3px solid var(--gold-accent);
    text-align: left;
    margin: 1.5rem 0 2.5rem;
    border-radius: 0 8px 8px 0;
    background: rgba(255, 255, 255, 0.05);
}

/* Feature cards (index) */
.featured-cards {
    padding: 5rem 0;
    background: var(--cream-bg);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.feature-card i {
    font-size: 2.8rem;
    color: var(--gold-accent);
    margin-bottom: 1.2rem;
    display: block;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.introduction,
.donation {
    padding: 5rem 0;
}

.introduction {
    background: var(--off-white);
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.gallery-preview {
    padding: 5rem 0;
    background: var(--off-white);
}

.donation {
    background: var(--cream-bg);
    text-align: center;
}

.donation-content {
    max-width: 800px;
    margin: 0 auto;
}

.donation-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Teacher approach section */
.approach-section {
    padding: 4rem 0;
    background: var(--cream-bg);
}

.approach-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.approach-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.approach-point {
    background: var(--neu-bg);
    border-radius: 16px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: var(--neu-raised);
    transition: var(--transition);
}

.approach-point:hover {
    transform: translateY(-4px);
}

.approach-point i {
    font-size: 2rem;
    color: var(--gold-accent);
    margin-bottom: 1rem;
    display: block;
}

.approach-point h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.approach-point p {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* Teachers section */
.teachers-section {
    padding: 4rem 0;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.management-section {
    padding: 4rem 0;
}

.management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

.image-highlight-section {
    padding: 4rem 0;
    background: var(--cream-bg);
}

/* ---------- Footer ---------- */
footer {
    background: linear-gradient(135deg, var(--dark-green) 0%, #0a1f10 100%);
    color: var(--off-white);
    padding: 4rem 0 2rem;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3 {
    color: var(--light-gold);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column p {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--off-white);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3), -1px -1px 4px rgba(255, 255, 255, 0.05);
}

.social-icons a:hover {
    background: var(--gold-accent);
    color: var(--dark-green);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.82rem;
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--neu-bg);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--neu-raised);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold-accent);
    color: var(--dark-green);
    box-shadow: var(--neu-inset);
}

/* ---------- Page Banner (used in some pages) ---------- */
.page-banner {
    padding: 6rem 0;
    text-align: center;
    color: var(--off-white);
    position: relative;
}

.page-banner h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    color: var(--off-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.page-banner p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--light-gold);
    font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .related-section {
        position: static;
        max-height: 400px;
    }

    .nazim-profile {
        grid-template-columns: 1fr;
    }

    .nazim-image-container {
        position: static;
        max-width: 340px;
        margin: 0 auto;
    }

    .community-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .offline-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    header {
        height: auto;
        padding: 0.8rem 0;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
    }

    .logo h1 {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.85rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.95rem;
    }

    .page-header {
        padding: 4rem 0 2.5rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .donation-buttons {
        flex-direction: column;
        align-items: center;
    }

    .donation-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .upi-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards-container {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        background-attachment: scroll;
    }

    .image-highlight-section {
        padding: 3rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 14px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 2.5rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    .card,
    .neu-card,
    .section-card {
        padding: 1.5rem;
        border-radius: 14px;
    }

    .upi-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .upi-app-btn {
        padding: 1.2rem 0.8rem;
    }

    .upi-app-btn .app-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .teachers-grid,
    .management-grid {
        grid-template-columns: 1fr 1fr;
    }

    .community-features {
        grid-template-columns: 1fr;
    }

    .message-actions {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    .upi-buttons-grid {
        grid-template-columns: 1fr 1fr;
    }

    .teachers-grid,
    .management-grid {
        grid-template-columns: 1fr;
    }
}