:root {
    --primary-purple: #4A148C;
    --primary-light: #7c43bd;
    --accent-orange: #FF6F00;
    --accent-orange-light: #ff8f00;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-light: #fafafa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 30px rgba(0,0,0,0.12);
    --shadow-orange: 0 10px 20px rgba(255, 111, 0, 0.3);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; line-height: 1.7; color: var(--text-dark); background-color: var(--bg-light); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: contain; }

/* Fix for WordPress Admin Bar */
body.logged-in header {
    top: 32px;
}

/* ============================================
   LOGO RESIZE & RESPONSIVE FIXES
   ============================================ */

/* Default (Desktop First) - Standard logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0; /* Prevents logo from shrinking in flex containers */
    max-width: 100%;
}

/* Logo Image Styling */
.logo img {
    display: block;
    height: auto;
    width: auto;
    max-height: 70px; /* Default max height for desktop */
    max-width: 180px; /* Prevents logo from becoming too wide */
    object-fit: contain; /* Maintains aspect ratio without cropping */
}

/* Logo Text Styling (if visible) */
.logo span {
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap; /* Prevents text wrapping on desktop */
}

/* Tablet & Small Desktop (Between 768px and 1024px) */
@media screen and (max-width: 1024px) {
    .logo {
        gap: 8px;
    }
    
    .logo img {
        max-height: 45px;
        max-width: 160px;
    }
    
    .logo span {
        font-size: 1.1rem;
        white-space: nowrap;
    }
}

/* Mobile Landscape & Small Tablets (Between 481px and 768px) */
@media screen and (max-width: 768px) {
    .logo {
        gap: 6px;
    }
    
    .logo img {
        max-height: 38px;
        max-width: 140px;
    }
    
    .logo span {
        font-size: 1rem;
        /* Keep nowrap to avoid broken layout, but if text is long, uncomment below */
        /* white-space: normal;
        line-height: 1.2; */
    }
}

/* Mobile Portrait (Up to 480px) */
@media screen and (max-width: 480px) {
    .logo {
        gap: 5px;
        max-width: calc(100% - 60px); /* Prevents overlapping with hamburger menu */
        overflow: hidden; /* Safety for very long content */
    }
    
    .logo img {
        max-height: 32px;
        max-width: 120px;
    }
    
    .logo span {
        font-size: 0.85rem;
        white-space: normal; /* Allows text to wrap on very small screens */
        line-height: 1.2;
        word-break: break-word;
    }
}

/* Very Small Mobile (Up to 380px) - Extreme Cases */
@media screen and (max-width: 380px) {
    .logo img {
        max-height: 28px;
        max-width: 90px;
    }
    
    .logo span {
        font-size: 0.75rem;
    }
    
    .logo {
        gap: 4px;
    }
}

/* ============================================
   ADJUST HEADER LAYOUT FOR LOGO SPACE
   ============================================ */

/* Ensure header wrapper has enough space */
.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Fix for mobile menu toggle overlap */
@media screen and (max-width: 768px) {
    .hamburger {
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* =========================================
   WHATSAPP BUTTON STYLES
   ========================================= */

/* The Main Button Container */
.whatsapp-link-btn {
    background-color: #25D366; /* Official WhatsApp Green */
    color: #ffffff;
    display: inline-flex;       /* Aligns icon and text side-by-side */
    align-items: center;
    justify-content: center;
    text-decoration: none;      /* Removes underline from link */
    
    /* Shape & Size (Desktop Default) */
    border-radius: 50px;        /* Pill shape */
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    
    /* Spacing from the previous menu item */
    margin-left: 15px;          
    
    /* Smooth Transition */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Hover Effect */
.whatsapp-link-btn:hover {
    background-color: #128C7E; /* Darker Green */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    color: #ffffff; /* Ensure text stays white */
}

/* Icon Styling */
.whatsapp-link-btn i {
    margin-right: 8px; /* Space between icon and text */
    font-size: 18px;
}

/* Optional: Hide text if you want icon only on Desktop */
/* .whatsapp-link-btn span { display: none; } */


/* =========================================
   RESPONSIVE / MOBILE STYLES
   ========================================= */
@media screen and (max-width: 768px) {
    
    .whatsapp-link-btn {
        /* Change to a perfect Circle on Mobile */
        width: 50px;
        height: 50px;
        border-radius: 50%;
        
        /* Remove padding/margin to center it nicely */
        padding: 0;
        margin: 10px auto; /* Center horizontally in mobile menu */
        
        /* Ensure it sits below the menu items if using flex-column */
        display: flex; 
    }

    /* Hide the text label "Chat with us" on mobile */
    .whatsapp-link-btn span {
        display: none;
    }

    /* Center the icon and make it bigger */
    .whatsapp-link-btn i {
        margin-right: 0;
        font-size: 24px;
    }
}
/* ============================================
   FIX ADMIN BAR & LOGGED-IN OVERLAPS
   ============================================ */

/* When admin bar is visible, ensure header does not cover logo on scroll */
body.logged-in #mainHeader.scrolled .logo img {
    max-height: 40px; /* Slightly smaller logo when scrolled & logged in */
    transition: all 0.3s ease;
}

@media screen and (max-width: 782px) {
    body.logged-in #mainHeader.scrolled .logo img {
        max-height: 32px;
    }
}

/* ============================================
   RETINA & HIGH-DPI SCREENS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        /* Ensure crisp rendering on retina displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ============================================
   SAFETY: PREVENT LOGO BREAKING OUT OF HEADER
   ============================================ */
#mainHeader {
    overflow: visible !important; /* Keeps dropdowns visible while containing logo */
}

#mainHeader .container {
    overflow: visible;
}

/* Ensure logo container doesn't overflow on mobile */
@media screen and (max-width: 768px) {
    .logo {
        max-width: 70%;
    }
}

@media screen and (max-width: 782px) {
    body.logged-in header {
        top: 46px;
    }
}

/* Ensure header stays visible when admin bar is present */
body.logged-in .hero {
    min-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.logged-in .hero {
        min-height: calc(100vh - 46px);
    }
}

/* Fix for mobile menu when logged in */
@media screen and (max-width: 782px) {
    body.logged-in .nav-menu {
        top: calc(80px + 46px);
        height: calc(100vh - 80px - 46px);
    }
}

@media screen and (min-width: 783px) {
    body.logged-in .nav-menu {
        top: calc(80px + 32px);
        height: calc(100vh - 80px - 32px);
    }
}

/* Fix for scroll position when clicking anchors with admin bar */
body.logged-in :target {
    scroll-margin-top: 100px;
}

/* Ensure dropdown menus don't get hidden behind admin bar */
body.logged-in .submenu {
    top: calc(100% + 32px);
}

@media screen and (max-width: 782px) {
    body.logged-in .submenu {
        top: auto;
    }
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 80px; transition: height 0.3s ease; }

.logo { display: flex; align-items: center; gap: 15px; font-family: 'Merriweather', serif; font-weight: 700; font-size: 1.4rem; color: var(--primary-purple); }
.logo img { height: 60px; width: auto; }

.nav-menu { display: flex; gap: 30px; align-items: center; }
.nav-item { position: relative; }
.nav-link { font-weight: 500; color: var(--text-dark); transition: var(--transition); padding: 10px 0; cursor: pointer; position: relative; }
.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent-orange); transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover, .nav-link.active { color: var(--accent-orange); }

.submenu {
    position: absolute; top: 100%; left: 0; background: var(--white);
    width: 220px; box-shadow: var(--shadow); border-radius: 8px;
    opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--transition);
}
.nav-item:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a { display: block; padding: 12px 20px; border-bottom: 1px solid #eee; font-size: 0.9rem; transition: var(--transition); }
.submenu li a:hover { background: var(--primary-purple); color: var(--white); padding-left: 25px; }

.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary-purple); }

/* Hero */
.hero {
    height: 100vh; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px; 
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
}

.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.slide.active { opacity: 1; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(74, 20, 140, 0.85), rgba(255, 111, 0, 0.65));
    z-index: -1;
}

.hero-content {
    position: relative; z-index: 1;
    max-width: 800px; padding: 0 20px;
}

.hero-content h1 { 
    font-family: 'Merriweather', serif; font-size: 3.8rem; margin-bottom: 20px; 
    animation: fadeInUp 1s forwards;
}
.hero-content p { 
    font-size: 1.25rem; max-width: 700px; margin: 0 auto 30px; 
    animation: fadeInUp 1s forwards 0.3s;
    opacity: 0;
    transform: translateY(30px);
    animation-fill-mode: forwards;
}

.btn { 
    display: inline-block; 
    background: linear-gradient(45deg, var(--accent-orange), var(--accent-orange-light)); 
    color: var(--white); 
    padding: 14px 35px; border-radius: 50px; font-weight: 600; 
    transition: var(--transition); border: none; cursor: pointer; 
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.4);
}
.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.6); 
}
.btn-secondary { 
    background: transparent; border: 2px solid var(--white); margin-left: 15px; 
}
.btn-secondary:hover { background: var(--white); color: var(--primary-purple); }

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 2;
}
.dot {
    width: 12px; height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.dot.active { background: var(--white); transform: scale(1.2); }

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section-padding { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-family: 'Merriweather', serif; color: var(--primary-purple); font-size: 2.5rem; margin-bottom: 10px; }
.section-title .bar { width: 80px; height: 4px; background: var(--accent-orange); margin: 0 auto; border-radius: 2px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.mission-box { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.mission-box h3 { color: var(--primary-purple); margin-bottom: 10px; font-size: 1.4rem; display: flex; align-items: center; gap: 10px; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.value-card {
    background: rgba(255, 255, 255, 0.9); 
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.value-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-orange));
    transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.value-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.value-card:hover::before { transform: scaleX(1); }
.value-card h4 { color: var(--primary-purple); margin-bottom: 12px; font-size: 1.2rem; }

/* Programs */
.programs { background: var(--white); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { 
    background: var(--white); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: var(--transition); 
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-orange); }
.card-img { height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img img { transform: scale(1.1); }
.card-body { padding: 25px; }
.card-body h3 { color: var(--primary-purple); margin-bottom: 10px; font-size: 1.3rem; }
.card-link { color: var(--accent-orange); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; transition: 0.3s; }
.card-link:hover { gap: 10px; }

/* Social Feed */
.social-feed { background: #f0f2f5; padding: 60px 0; }
.feed-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }
.filter-btn { background: var(--white); border: 1px solid #ddd; padding: 8px 20px; border-radius: 20px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.filter-btn:hover, .filter-btn.active { background: var(--primary-purple); color: var(--white); border-color: var(--primary-purple); }

.feed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }

.fb-post { background: var(--white); border-radius: 12px; overflow: hidden; transition: var(--transition); border: 1px solid rgba(0,0,0,0.05); }
.fb-post:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-5px); }
.fb-header { padding: 15px; display: flex; align-items: center; gap: 10px; }
.fb-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-purple); }
.fb-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.fb-image-container { position: relative; width: 100%; cursor: pointer; overflow: hidden; height: 250px; background: #eee; }
.fb-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.fb-image-container:hover .fb-image { transform: scale(1.05); }
.pinned-badge { position: absolute; top: 15px; right: 15px; background: var(--accent-orange); color: white; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; z-index: 2; }
.fb-stats { padding: 10px 15px; display: flex; justify-content: space-between; color: #666; font-size: 0.85rem; border-bottom: 1px solid #eee; }
.fb-actions { display: flex; padding: 5px; }
.fb-btn { flex: 1; padding: 10px; text-align: center; color: #666; font-weight: 600; cursor: pointer; transition: var(--transition); }
.fb-btn:hover { background: #f2f2f2; color: var(--primary-purple); }

/* Partners */
.partners-section { background: var(--white); padding: 60px 0; }
.partners-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: center; }
.partner-item { width: 150px; text-align: center; }
.partner-logo { width: 100%; height: 80px; object-fit: contain; filter: grayscale(100%) opacity: 0.6; transition: all 0.4s ease; }
.partner-logo:hover { filter: grayscale(0); opacity: 1; transform: scale(1.1); }
.partner-cta { text-align: center; margin-top: 40px; }
.btn-partner { background: transparent; border: 2px solid var(--primary-purple); color: var(--primary-purple); padding: 12px 30px; border-radius: 30px; font-weight: 600; transition: var(--transition); }
.btn-partner:hover { background: var(--primary-purple); color: var(--white); }

/* Chat Widget */
.chat-toggle {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-light));
    color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 24px; cursor: pointer; z-index: 2000; transition: var(--transition);
}
.chat-toggle:hover { transform: scale(1.1); }
.chat-widget {
    position: fixed; bottom: 100px; right: 30px; width: 320px; background: white;
    border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.2); z-index: 2000;
    opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease;
}
.chat-widget.active { opacity: 1; visibility: visible; transform: translateY(0); }
.chat-header { background: var(--primary-purple); color: white; padding: 15px; display: flex; justify-content: space-between; }
.chat-body { height: 300px; padding: 15px; overflow-y: auto; background: #f9f9f9; display: flex; flex-direction: column; gap: 10px; }
.message { max-width: 80%; padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; }
.message.bot { background: #e4e6eb; align-self: flex-start; border-bottom-left-radius: 0; }
.message.user { background: var(--primary-purple); color: white; align-self: flex-end; border-bottom-right-radius: 0; }
.chat-footer { padding: 10px; border-top: 1px solid #eee; display: flex; gap: 10px; }
.chat-footer input { flex: 1; border: 1px solid #ddd; border-radius: 20px; padding: 8px 15px; outline: none; }
.chat-footer button { background: var(--primary-purple); color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; }

/* Lightbox */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 3000; display: none; justify-content: center; align-items: center; }
.lightbox.active { display: flex; }
.lightbox img { max-height: 85vh; max-width: 90vw; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 3rem; cursor: pointer; }
.lightbox-close:hover { color: var(--accent-orange); }

/* Footer */
footer { background: var(--primary-purple); color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 50px; height: 2px; background: var(--accent-orange); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #d1c4e9; transition: var(--transition); }
.footer-links a:hover { color: var(--white); transform: translateX(5px); display: inline-block; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.9rem; }

/* Fade In Sections */
.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 768px) {
    .hero { height: 60vh; min-height: 500px; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 0.9rem; }
    .hamburger { display: block; }
    .nav-menu { position: fixed; top: 80px; left: -100%; width: 100%; height: calc(100vh - 80px); background: var(--white); flex-direction: column; padding: 40px 20px; transition: 0.4s; }
    .nav-menu.active { left: 0; }
    .submenu { position: static; visibility: visible; opacity: 1; box-shadow: none; width: 100%; display: none; background: #f9f9f9; }
    .nav-item:hover .submenu { display: block; }
    .about-grid { grid-template-columns: 1fr; }
    .feed-grid { grid-template-columns: 1fr; }
    .section-padding { padding: 50px 0; }
    .section-title h2 { font-size: 1.8rem; }
    .chat-widget { width: 90%; right: 5%; bottom: 100px; }
}
