/* ================================================
   CITCD Website - Main Stylesheet
   ================================================ */

/* ------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ------------------------------------------------ */
:root {
    --primary: #5C7C6F;
    --primary-dark: #3D5A4C;
    --secondary: #E8DED1;
    --accent: #C9A962;
    --text: #2D3436;
    --text-light: #636E72;
    --bg: #FDFBF7;
    --white: #FFFFFF;
}

/* ------------------------------------------------
   Base Styles & Reset
   ------------------------------------------------ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text); 
    background: var(--bg); 
    line-height: 1.6; 
}
h1, h2, h3, h4 { 
    font-family: 'Playfair Display', serif; 
    font-weight: 600; 
    line-height: 1.2; 
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

/* ------------------------------------------------
   Header & Navigation
   ------------------------------------------------ */
header { 
    position: sticky; 
    top: 0; 
    background: var(--white); 
    box-shadow: 0 2px 20px rgba(0,0,0,0.06); 
    z-index: 100; 
}
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 0; 
}
.logo { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    text-decoration: none; 
}
.logo img { height: 50px; width: auto; }
.logo-text { 
    font-family: 'Playfair Display', serif; 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--primary-dark); 
}
.logo-text span { color: var(--accent); }

nav { display: flex; gap: 2rem; align-items: center; }
nav a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 500; 
    font-size: 0.95rem; 
    transition: color 0.3s; 
    position: relative; 
}
nav a:hover { color: var(--primary); }
nav a::after { 
    content: ''; 
    position: absolute; 
    bottom: -4px; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background: var(--accent); 
    transition: width 0.3s; 
}
nav a:hover::after { width: 100%; }

.mobile-menu-btn { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* ------------------------------------------------
   Buttons
   ------------------------------------------------ */
.btn { 
    display: inline-block; 
    padding: 0.75rem 1.5rem; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: all 0.3s; 
}
.btn-primary { 
    background: var(--primary); 
    color: var(--white); 
}
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-2px); 
}
.btn-accent { 
    background: var(--accent); 
    color: var(--white); 
}
.btn-accent:hover { background: #b8943f; }

/* ------------------------------------------------
   Hero Section - Three Doors
   ------------------------------------------------ */
.hero { 
    padding: 4rem 0; 
    background: linear-gradient(135deg, var(--bg) 0%, var(--secondary) 100%); 
}
.hero-title { 
    text-align: center; 
    margin-bottom: 3rem; 
}
.hero-title h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    color: var(--primary-dark); 
    margin-bottom: 1rem; 
}
.hero-title p { 
    font-size: 1.1rem; 
    color: var(--text-light); 
    max-width: 600px; 
    margin: 0 auto; 
}

.three-doors { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem; 
}
.door-card { 
    background: var(--white); 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
    transition: transform 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
}
.door-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 60px rgba(0,0,0,0.12); 
}
.door-img { 
    height: 200px; 
    background-size: cover; 
    background-position: center; 
    position: relative; 
}
.door-img::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); 
}
.door-content { 
    padding: 1.5rem; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.door-content h3 { 
    font-size: 1.5rem; 
    color: var(--primary-dark); 
    margin-bottom: 0.5rem; 
}
.door-content p { 
    color: var(--text-light); 
    font-size: 0.95rem; 
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Door Background Images */
.door-school .door-img { 
    background-image: url('../images/abraar-logo.jpg'); 
    background-color: var(--primary); 
}
.door-cemetery .door-img { 
    background-image: url('../images/amc-cemetery.jpg'); 
    background-color: var(--primary-dark); 
}
.door-community .door-img { 
    background-image: url('../images/citcd-slider.jpg'); 
    background-color: var(--secondary); 
}

/* ------------------------------------------------
   Section Base Styles
   ------------------------------------------------ */
section { padding: 5rem 0; }
.section-header { 
    text-align: center; 
    margin-bottom: 3rem; 
}
.section-header h2 { 
    font-size: clamp(1.75rem, 4vw, 2.5rem); 
    color: var(--primary-dark); 
    margin-bottom: 1rem; 
}
.section-header p { 
    color: var(--text-light); 
    max-width: 600px; 
    margin: 0 auto; 
}

/* ------------------------------------------------
   Abraar Academy Section
   ------------------------------------------------ */
#school { background: var(--white); }
.school-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 3rem; 
    align-items: center; 
}
.school-img { 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.1); 
}
.school-img img { 
    width: 100%; 
    height: 400px; 
    object-fit: cover; 
}
.school-content h2 { 
    font-size: 2rem; 
    color: var(--primary-dark); 
    margin-bottom: 1rem; 
}
.school-content > p { 
    color: var(--text-light); 
    margin-bottom: 1.5rem; 
}

.features { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
    margin-bottom: 1.5rem; 
}
.feature { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    padding: 0.75rem; 
    background: var(--secondary); 
    border-radius: 8px; 
}
.feature-icon { 
    width: 40px; 
    height: 40px; 
    background: var(--primary); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--white); 
    font-size: 1.2rem; 
}
.feature span { 
    font-weight: 500; 
    font-size: 0.9rem; 
}

/* ------------------------------------------------
   Cemetery Section
   ------------------------------------------------ */
#cemetery { 
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); 
    color: var(--white); 
    position: relative; 
}
#cemetery .section-header h2, 
#cemetery .section-header p { color: var(--white); }
#cemetery .section-header p { opacity: 0.9; }

.cemetery-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 3rem; 
    align-items: center; 
}
.cemetery-content h3 { 
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
}
.cemetery-content p { 
    opacity: 0.9; 
    margin-bottom: 1.5rem; 
}
.cemetery-features { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    margin-bottom: 2rem; 
}
.cemetery-feature { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}
.cemetery-feature .icon { 
    width: 24px; 
    height: 24px; 
    background: var(--accent); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.75rem; 
}
.cemetery-img { 
    border-radius: 16px; 
    overflow: hidden; 
}
.cemetery-img img { 
    width: 100%; 
    height: 350px; 
    object-fit: cover; 
}

/* Sticky Immediate Need Button - Mobile Only */
.immediate-need-sticky { 
    display: none; 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    background: #8B0000; 
    color: white; 
    text-align: center; 
    padding: 1rem; 
    z-index: 99; 
    font-weight: 600; 
    text-decoration: none; 
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2); 
}

/* ------------------------------------------------
   Community Section
   ------------------------------------------------ */
#community { background: var(--secondary); }
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    margin-top: 3rem; 
}
.stat-card { 
    text-align: center; 
    padding: 2rem; 
    background: var(--white); 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
}
.stat-number { 
    font-family: 'Playfair Display', serif; 
    font-size: 2.5rem; 
    color: var(--primary); 
    font-weight: 700; 
}
.stat-label { 
    color: var(--text-light); 
    font-size: 0.9rem; 
    margin-top: 0.5rem; 
}

/* ------------------------------------------------
   Testimonials Section
   ------------------------------------------------ */
#testimonials { background: var(--white); }
.testimonials-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 2rem; 
}
.testimonial-card { 
    padding: 2rem; 
    background: var(--bg); 
    border-radius: 16px; 
    border-left: 4px solid var(--accent); 
}
.testimonial-quote { 
    font-size: 1.05rem; 
    color: var(--text); 
    margin-bottom: 1.5rem; 
    font-style: italic; 
    line-height: 1.7; 
}
.testimonial-author { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}
.author-avatar { 
    width: 50px; 
    height: 50px; 
    background: var(--primary); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--white); 
    font-weight: 600; 
    font-size: 1.2rem; 
}
.author-info h4 { 
    font-family: 'Inter', sans-serif; 
    font-weight: 600; 
    font-size: 1rem; 
}
.author-info p { 
    font-size: 0.85rem; 
    color: var(--text-light); 
}

/* ------------------------------------------------
   Footer
   ------------------------------------------------ */
footer { 
    background: var(--primary-dark); 
    color: var(--white); 
    padding: 4rem 0 2rem; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    margin-bottom: 3rem; 
}
.footer-col h4 { 
    font-family: 'Inter', sans-serif; 
    font-weight: 600; 
    margin-bottom: 1rem; 
    font-size: 1rem; 
}
.footer-col p, 
.footer-col a { 
    color: rgba(255,255,255,0.8); 
    font-size: 0.9rem; 
    text-decoration: none; 
    display: block; 
    margin-bottom: 0.5rem; 
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom { 
    text-align: center; 
    padding-top: 2rem; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    color: rgba(255,255,255,0.6); 
    font-size: 0.85rem; 
}

/* ------------------------------------------------
   Responsive Design
   ------------------------------------------------ */
@media (max-width: 1024px) {
    .school-grid, 
    .cemetery-grid { grid-template-columns: 1fr; }
    .cemetery-grid { direction: ltr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    nav { display: none; }
    .mobile-menu-btn { display: block; }
    .features { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .immediate-need-sticky { display: block; }
    #cemetery { padding-bottom: 6rem; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------
   Mobile Menu Overlay
   ------------------------------------------------ */
@media (max-width: 768px) {
    nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        z-index: 200;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        animation: slideIn 0.3s ease;
    }
    nav.mobile-open a {
        font-size: 1.25rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--secondary);
    }
    .mobile-menu-btn {
        z-index: 201;
        position: relative;
    }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------
   Scroll Animations
   ------------------------------------------------ */
.animate-target {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-target.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Header scroll effect */
.header-scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

/* ------------------------------------------------
   Lightbox
   ------------------------------------------------ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ------------------------------------------------
   Newsletter Section
   ------------------------------------------------ */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 4rem 0;
    text-align: center;
    color: var(--white);
}
.newsletter-section h2 {
    color: var(--white);
    margin-bottom: 0.5rem;
}
.newsletter-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}
.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}
.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.newsletter-form button:hover {
    background: #b8943f;
}

/* ------------------------------------------------
   Photo Gallery
   ------------------------------------------------ */
.gallery-section {
    padding: 5rem 0;
    background: var(--bg);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}
.gallery-item:hover {
    transform: scale(1.02);
}
.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* ------------------------------------------------
   Social Links
   ------------------------------------------------ */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
    font-size: 1.1rem;
}
.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* ------------------------------------------------
   Page Header (for subpages)
   ------------------------------------------------ */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    color: var(--white);
}
.page-header h1 {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}
.page-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ------------------------------------------------
   Contact Form
   ------------------------------------------------ */
.contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 600px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-weight: 500;
    color: var(--text);
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 1rem;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}
.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Map container */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ------------------------------------------------
   Donate Section
   ------------------------------------------------ */
.donate-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.donate-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}
.donate-card:hover {
    transform: translateY(-5px);
}
.donate-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}
.donate-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}
.donate-amount {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}
