/* 
    Eshoham Foundation - Modern Royal Spiritual Design System
    Colors: 
    - Navy: #0A1128
    - Gold: #D4AF37
    - Saffron: #FF9933
    - Cream: #FFFDF5
    - Glass: rgba(255, 255, 255, 0.1)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --navy: #0A1128;
    --gold: #FFB74D; /* Lighter saffron-gold from logotr.png */
    --saffron: #FF9800;
    --cream: #FFFDF5;
    --white: #F8F9FA;
    --text-dark: #1A1A1A;
    --text-light: #F8F9FA;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Bona Nova', serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Typography Reset - No Uppercase */
h1, h2, h3, h4, h5, h6, .btn, .nav-links a {
    text-transform: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    color: var(--navy);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.3;
}

h1, h2, h3, h4, h5, h6, .serif {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Layout Padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Glassmorphism & Card Typography Legibility - Royal System */
.glass-card {
    background: rgba(10, 17, 40, 0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(10, 17, 40, 0.1);
    border-radius: 24px;
    padding: 3rem;
    transition: var(--transition);
    color: var(--navy);
}

.glass-card p, .glass-card span, .glass-card li {
    color: rgba(10, 17, 40, 0.85); /* Darker for accessibility on light bg */
    transition: var(--transition);
    line-height: 1.8;
}

.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4 {
    color: var(--navy);
    transition: var(--transition);
    margin-bottom: 1rem;
}

/* Interactive Cards - For modules that need a hover state */
.interactive-card:hover {
    background: var(--navy) !important;
    transform: translateY(-10px);
    border-color: var(--gold);
}

.interactive-card:hover h1, .interactive-card:hover h2, .interactive-card:hover h3, .interactive-card:hover h4 {
    color: var(--gold);
}

.interactive-card:hover p, .interactive-card:hover span, .interactive-card:hover li {
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: var(--transition);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #B8860B);
    color: var(--navy);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-outline {
    border: 2px solid var(--gold);
    color: var(--gold);
    background: transparent;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--navy);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 17, 40, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--gold);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 80px; /* Header Offset */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(10, 17, 40, 0.4) 0%, var(--navy) 100%),
                url('../images/hero_bg.jpg') no-repeat center center/cover;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--gold), var(--saffron));
    -webkit-background-clip: text;
    background-clip: text; /* Added for standard compatibility */
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--white);
    animation: fadeInUp 1.2s ease;
}

/* Core Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.value-item {
    text-align: center;
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

/* Footer */
footer {
    background: #050814;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--white);
}

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

.footer-grid p, .footer-grid a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-grid a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- 100% RESPONSIVE GRID & TABLE FRAMEWORK --- */

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

.resp-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Tablet Optimization (768px - 1100px) */
@media (max-width: 1100px) {
    .container { max-width: 95%; padding: 0 1.5rem; }
    .hero-content h1 { font-size: 3.5rem !important; }
    .nav-links { gap: 1rem; }
    .resp-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; }
}

/* Mobile Optimization (< 1200px) */
@media (max-width: 1200px) {
    section { padding: 4rem 0; }
    
    /* Global Container Padding */
    .container { padding: 0 1.5rem; }

    /* Navigation Refinement - Earlier Toggle switch to prevent cramming */
    #mobile-toggle { display: block !important; }
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: var(--navy); 
        padding: 2.5rem 2rem; 
        border-bottom: 2px solid var(--gold);
        text-align: center;
        gap: 1.8rem;
        z-index: 1001;
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    }
    .nav-links.mobile-active { display: flex !important; }
    
    /* Hero & Text Scaling */
    .hero-content h1 { font-size: 3rem !important; line-height: 1.2; margin-bottom: 1.5rem; }
    .hero-content p { font-size: 1.1rem !important; margin-bottom: 2rem; }
    .serif { font-size: 2.5rem !important; }

    /* Footer Stacking Fix */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2.5rem;
    }
    
    .footer-contact {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Grid & Card Stacking */
    .resp-grid { 
        grid-template-columns: 1fr !important; 
        gap: 2rem; 
    }
    
    /* Universal Mobile Header Center */
    [style*="display: flex; justify-content: space-between; align-items: flex-end"],
    [style*="display: flex; justify-content: space-between; align-items: center"],
    [style*="display: flex; justify-content: space-between; align-items: flex-start"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 2rem;
    }
}

/* Small Phone Optimization (< 480px) */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero-content h1 { font-size: 2rem !important; }
    .serif { font-size: 1.8rem !important; }
    .glass-card { padding: 1.5rem; }
}

/* Global Force No Uppercase */
* {
    text-transform: none !important;
}

/* Global Image Optimization */
img { max-width: 100%; height: auto; display: block; }

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

.fade-in { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

/* Micro-interactions */
.btn:active { transform: scale(0.95); }
.glass-card:hover, .module-card:hover { border-color: var(--gold); }
