/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #2e8b57;
    --primary-dark: #1f6b42;
    --primary-light: rgba(46, 139, 87, 0.1);
    --gold-color: #d4af37;
    --light-bg: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

.loading-spinner.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    text-align: center;
}

.spinner-circle {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.spinner-text {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* ===== MAIN CONTENT SPACING ===== */
.main-content {
    margin-top: 80px; /* Adjust based on your header height */
    min-height: calc(100vh - 80px);
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    margin-top: 0; /* Remove margin-top since main-content already has it */
}

/* Rest of your existing styles continue below... */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-urdu {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold-color);
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gold-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: #b8941f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(black);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Sections */
.section-padding {
    padding: 5rem 0;
}

.bg-light {
    background: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;

}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-divider {
    width: 100px;
    height: 3px;
    background: var(--gold-color);
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

/* Introduction */
.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.spiritual-quote {
    font-style: italic;
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-left: 4px solid var(--gold-color);
    padding-left: 2rem;
    margin: 2rem auto;
    max-width: 600px;
}

/* Events */
.events-list {
    display: grid;
    gap: 1.5rem;
}

.event-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-urdu {
        font-size: 1.8rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
    }
}
.footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--gold-color); /* Optional: adds a nice hover effect */
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-main {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.content-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Sidebar Widget */
.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gold-color);
    padding-bottom: 0.5rem;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    padding: 0.75rem 1rem;
    background: var(--light-bg);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-left-color: var(--gold-color);
}

/* Beliefs Grid */
.beliefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.belief-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: var(--transition);
}

.belief-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.belief-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Mission Grid */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.mission-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.mission-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Section Navigation */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.section-nav-link {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.section-nav-link:hover,
.section-nav-link.active {
    background: var(--gold-color);
    color: var(--text-dark);
    border-color: var(--white);
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.content-section .subtitle {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.bio-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.bio-section:last-child {
    border-bottom: none;
}

/* Titles Grid */
.titles-grid {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.titles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.title-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid var(--gold-color);
}

.title-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Hadith Box */
.hadith-box {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--gold-color);
    font-style: italic;
    text-align: center;
    margin: 2rem 0;
}

/* Meaning Sections */
.meaning-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.meaning-section:last-child {
    border-bottom: none;
}

.meaning-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.meaning-section li {
    margin-bottom: 0.5rem;
}

/* Comparison Table */
.comparison-table {
    margin-top: 3rem;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background: var(--primary-color);
    color: var(--white);
}

.comparison-table tr:hover {
    background: var(--light-bg);
}

/* Murshid Bio */
.murshid-bio {
    background: var(--white);
}

.bio-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: start;
}

.bio-image {
    background: var(--light-bg);
    height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gold-color);
}

.image-placeholder {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.bio-intro h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

/* Timeline */
.bio-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.bio-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-year {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.timeline-content {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    flex: 1;
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Accomplishments Grid */
.accomplishments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.accomplishment-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.accomplishment-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Khanqah Locations */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.location-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary-color);
}

.location-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.location-address {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Schedule */
.schedule-list {
    max-width: 600px;
    margin: 0 auto;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.schedule-date {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    margin-right: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.schedule-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.activity-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.activity-item:hover {
    transform: translateY(-5px);
}

.activity-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.activity-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
    }
    
    .bio-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .bio-image {
        height: 300px;
        margin: 0 auto;
        max-width: 300px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-year {
        margin-right: 0;
        margin-bottom: 1rem;
        align-self: flex-start;
    }
    
    .schedule-item {
        flex-direction: column;
        text-align: center;
    }
    
    .schedule-date {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .section-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .section-nav-link {
        width: 200px;
        text-align: center;
    }
}



/* Remove sticky or fixed positioning */
.header, .top-bar {
  position: relative !important;
}

/* Remove any margin or padding that creates space */
.main-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure header doesn’t leave extra space */
.header {
  top: 0;
  z-index: 1;
}

/* Brand container */
.nav-brand .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

/* Logo icon */
.logo-icon {
  font-size: 32px;
  color: white;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Text wrapper */
.logo-text {
  display: flex;
  align-items: center;
  gap: 1.1px;
}

/* English name */
.logo-main {
  font-size: 20px;
  font-weight: 700;
  color: #1e693f;
  margin: 0;
  padding: 0;
}

/* Urdu name */
.logo-urdu {
  font-family: 'Noto Sans Arabic', sans-serif;
  font-size: 18px;
  color: #1e693f;
  margin: 0;
  padding: 0;
}

/* Tagline */
.logo-tagline {
  font-size: 14px;
  color: #555;
  font-style: italic;
  margin: 0;
  padding: 0;
}
.photo-frame {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.photo-frame:hover img {
  transform: scale(1.05);
}
.gallery-btn-container {
  text-align: center;
  margin-top: 5.5rem; /* increased spacing to move button lower */
}

.gallery-btn {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  padding: 0.7rem 1.8rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gallery-btn:hover {
  background: #1b5e20;
  transform: translateY(-2px);
}

.tab-content {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tab-content.active {
  display: block;
  opacity: 1;
}
.tab-btn.active {
  background-color: var(--primary);
  color: #fff;
}

/* Date Display */
.date-display {
    margin: 1.5rem 0;
    text-align: center;
}

.english-date {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.urdu-date {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--gold-color);
}

/* Calligraphy Section */
.calligraphy-container {
    text-align: center;
    padding: 2rem;
}

.urdu-logo .logo-placeholder {
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 2px solid var(--gold-color);
}

.urdu-logo p {
    margin-top: 1rem;
    color: var(--text-light);
    font-style: italic;
}

/* Photos Section */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.photo-placeholder {
    text-align: center;
}

.photo-frame {
    height: 200px;
    background: var(--white);
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Introduction Section */
.section-subtitle {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-style: italic;
    margin-bottom: 1rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.intro-text p {
    margin-bottom: 1.5rem;
}

/* Journey Steps */
.journey-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.step-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

/* Quick Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.link-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.link-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.link-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .journey-step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .step-icon {
        font-size: 2.5rem;
    }
    
    .urdu-logo .logo-placeholder {
        padding: 2rem 1rem;
    }
    
    .urdu-logo span {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-urdu {
        font-size: 1.5rem;
    }
}
/* === SIMPLE AP GALLERY (4 PHOTOS) === */
.ap-gallery-section {
    background: var(--light-bg);
    color: var(--text-dark);
}

.ap-gallery-section .section-title {
    color: var(--primary-color);
}

.ap-gallery-section .section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Simple 2x2 / responsive grid */
.ap-gallery-simple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    margin-top: 25px;
}

.ap-photo-card {
    text-align: center;
}

.ap-photo-frame {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #000;
}

/* Show face nicely: portrait ratio, focus on top/center */
.ap-photo-frame img {
    width: 100%;
    aspect-ratio: 3 / 4;           /* all cards same shape */
    object-fit: cover;
    object-position: center top;   /* keep head/face visible */
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.ap-photo-card:hover .ap-photo-frame img {
    transform: scale(1.03);
    filter: saturate(1.1) contrast(1.05);
}

.ap-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}
