/* ==========================================================================
   SRI SAI TRUST - LANDING PAGE MASTER CSS (SECURE & OPTIMIZED)
   ========================================================================== */

/* --- Global Resets & Theme Variables --- */
:root {
    /* NATURE LIGHT MODE THEME */
    --bg-color-main: #F0F4EF; /* Soft, calming pale green background */
    --header-bg: #FFFFFF; /* Clean white header */
    --text-main: #2A3439; /* Deep grey-green for high contrast & readability */
    --text-muted: #4A5D23; /* Muted olive for secondary text (Cookie Policy text) */
    --text-spiritual: #1A531C; /* Strong forest green for spiritual headings */
    --accent-color: #2E8B57; /* Sea green for accents, icons, and borders */
    --card-bg: #FFFFFF; /* Solid white for cards/modals to pop */
    --border-color: #DCE8DB; /* Very light green for subtle borders */
    
    /* Buttons & Inputs */
    --btn-primary-bg: #1A531C; 
    --btn-primary-text: #FFFFFF;
    --btn-secondary-bg: #2E8B57; 
    --btn-secondary-text: #FFFFFF;
    --modal-overlay-bg: rgba(26, 83, 28, 0.85); /* Deep green tinted overlay */
    --modal-bg: #FFFFFF;
    --divine-color: rgba(255, 215, 0); 
    --input-bg: #F9FCF9;
    --input-border: #C8D8C8;
    --input-text: #2A3439;
    --bg-image: url('../images/bg-light.jpg');
}

body.dark-mode {
    /* DARK MODE THEME (Preserved & Enhanced) */
    --bg-color-main: #181a1f; 
    --header-bg: #111111;
    --text-main: #e0e0e0;
    --text-muted: #aaaaaa; /* Ensured visibility in dark mode */
    --text-spiritual: #dca0a0; 
    --accent-color: #ffb45c; /* Original Saffron accent */
    --card-bg: #1a1a1a; /* Dark card background */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Buttons & Inputs */
    --btn-primary-bg: #4da6ff; 
    --btn-primary-text: #1a1a1a;
    --btn-secondary-bg: #dca0a0; 
    --btn-secondary-text: #1a1a1a;
    --modal-overlay-bg: rgba(0, 0, 0, 0.95);
    --modal-bg: #222222;
    --divine-color: rgba(255, 215, 0);
    --input-bg: #2a2a2a;
    --input-border: #444444;
    --input-text: #e0e0e0;
    --bg-image: url('../images/bg-dark.jpg');
}
/* Base Styles */
body {
    margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; 
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color-main); color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
}

a { text-decoration: none; color: inherit; }

/* Fixed Header */
.fixed-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    background-color: var(--header-bg); display: flex; align-items: center;
    justify-content: space-between; padding: 0 4vw; box-sizing: border-box;
    z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo-dark { display: none; }
.logo-light { display: block; height: 50px; width: auto; }
body.dark-mode .logo-light { display: none; }
body.dark-mode .logo-dark { display: block; height: 50px; width: auto; }

.header-right { display: flex; align-items: center; gap: 20px; }

/* Buttons */
.btn {
    padding: 12px 24px; font-size: 0.95rem; font-weight: 600; border: none;
    border-radius: 5px; cursor: pointer; transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-primary { background-color: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-secondary { background-color: var(--btn-secondary-bg); color: var(--btn-secondary-text); }
.btn-success { background-color: #28a745; color: #fff; }
.btn-danger { background-color: #dc3545; color: #fff; }
.full-width { width: 100%; margin-top: 10px; }

/* Theme Toggle */
.theme-toggle { background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; padding: 0; }
.theme-toggle .fa-moon { display: block; }
.theme-toggle .fa-sun { display: none; }
body.dark-mode .theme-toggle .fa-moon { display: none; }
body.dark-mode .theme-toggle .fa-sun { display: block; color: #fdd835; }

/* --- Full Screen Landing Container --- */
.landing-container {
    width: 100vw; height: calc(100vh - 70px); position: fixed; top: 70px; left: 0;
    background-image: var(--bg-image); background-size: cover;
    background-position: center; background-repeat: no-repeat;
    z-index: 5; transition: background-image 0.4s ease;
}

.side-elements-container { width: 100%; height: 100%; position: relative; z-index: 50; }

/* Text Block - Top Left */
.text-content-block.top-corner-left {
    position: absolute;
    top: 110px; 
    left: 3vw; 
    width: 30%; 
    min-width: 300px;
    max-width: 400px;
    padding: 20px; 
    background-color: rgba(0, 0, 0, 0.6); 
    border-radius: 8px;
    backdrop-filter: blur(8px); 
    text-align: center;
}
.main-sentence {
    font-size: 1.55rem; 
    font-family: 'Acme', sans-serif; 
    color: #ffffff; 
    align:'center'
    line-height: 1.6;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}


/* Proceed Button - Bottom Right */
.action-block.bottom-right {
    position: absolute;
    bottom: 80px; 
    right: 4vw; 
}
.proceed-btn { padding: 15px 40px; font-size: 1.15rem; box-shadow: 0 4px 15px rgba(0,0,0,0.4); }


/* Divine Energy Spark */

.divine-energy-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; z-index: 10; }
.divine-spark {
    position: absolute; top: -20vh; left: 50vw; transform: translateX(-50%);
    width: 30px; height: 30px; border-radius: 50%; 
    background: radial-gradient(circle, #ffffff 10%, var(--divine-color) 40%, transparent 70%);
    box-shadow: 0 0 50px 20px var(--divine-color);
    animation: divineSparkFall 9s infinite cubic-bezier(0.25, 0.1, 0.25, 1);
    filter: blur(18px);
    
}
@keyframes divineSparkFall {
    0% { top: -30vh; transform: translateX(-50%) scale(1); opacity: 0; }
    25% { opacity: 0.95; }
    75% { opacity: 0.8; }
    100% { top: 110vh; transform: translateX(-30%) scale(9); opacity: 0; }
}


/* Modal Styles */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--modal-overlay-bg); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { background-color: var(--modal-bg); padding: 30px; border-radius: 12px; max-width: 450px; width: 90%; text-align: left; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; color: var(--text-main); transition: color 0.3s; }
.close-modal:hover { color: var(--text-spiritual); }

.modal-title { font-family: 'Libre Baskerville', serif; color: var(--text-spiritual); margin-top: 0; margin-bottom: 5px; text-align: center; font-size: 1.8rem; }
.modal-subtitle { font-size: 0.9rem; color: var(--text-main); margin-bottom: 20px; opacity: 0.8; text-align: center; }

.form-group input { width: 100%; padding: 12px 15px; font-family: 'Inter', sans-serif; font-size: 1rem; color: var(--input-text); background-color: var(--input-bg); border: 1px solid var(--input-border); border-radius: 5px; box-sizing: border-box; transition: border-color 0.3s ease; margin-bottom: 15px; }
.form-group input:focus { outline: none; border-color: var(--text-spiritual); }

/* ========================================= */
/* MOBILE RESPONSIVENESS FIXES               */
/* ========================================= */
@media (max-width: 768px) {
	.landing-container {
        	background-size: contain; 
        	background-position: top center; 
   	 }



    /* 1. Fix the Header Overlap */
    .fixed-header {
        padding: 0 15px; /* Reduce side padding to give elements room */
    }
    
    .trust-logo {
        height: 35px !important; /* Scale the logo down slightly */
    }
    
    .header-right {
        gap: 10px; /* Reduce the gap between the button and the theme toggle */
    }
    
    .donate-btn {
        padding: 8px 12px !important; /* Make the button more compact */
        font-size: 0.85rem !important;
    }

    /* 2. Fix the Proceed Button Visibility */
    .action-block.bottom-right {
        bottom: 90px !important; /* Lift it high enough to clear mobile browser bars */
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important; /* Perfectly center it */
        width: 100%;
        text-align: center;
        z-index: 100; /* Ensure it stays above the background */
    }
    
    /* 3. Ensure the Rainbow Text fits nicely */
    .text-content-block.top-corner-left {
        top: 35%; /* Push it down slightly from the header */
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        text-align: center;
    }
    
    .main-sentence {
        font-size: 1.25rem !important; /* Scale text for mobile readability */
    }

/* ========================================= */
    /* 4. DONATION MODAL MOBILE FIXES            */
    /* ========================================= */
    
    .modal-content {
        width: 95% !important;
        padding: 20px 15px !important; /* Reduces thick desktop padding to give inputs more room */
        max-height: 90vh; /* CRITICAL: Prevents the modal from being taller than the phone screen */
        overflow-y: auto; /* Allows the user to scroll down INSIDE the modal if they have a tiny screen */
        margin-top: 10px;
    }

    .modal-title {
        font-size: 1.4rem !important; /* Scales down the header */
    }

    .modal-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 15px !important;
    }

    .close-modal {
        top: 8px !important;
        right: 15px !important;
        font-size: 1.8rem !important;
    }

    .form-group input {
        padding: 10px 12px !important; /* Slimmer input fields for mobile */
        margin-bottom: 10px !important;
    }

    /* Shrink the QR code slightly so the Verify buttons are visible without scrolling */
    .qr-code-image {
        max-width: 160px !important; 
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }

    .verification-box {
        padding: 15px 10px !important;
    }

    /* Stack the Success/Fail buttons neatly if the screen is too narrow */
    #failMsg div {
        flex-direction: column; 
    }
    
    #failMsg button {
        width: 100%;
        margin-bottom: 10px;
    }
}





/* --- RAINBOW TEXT EFFECT --- */
.color-text-flow span {
  -webkit-animation-name: color-text-flow-keys; animation-name: color-text-flow-keys;
  -webkit-animation-duration: 50s; animation-duration: 50s;
  -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite;
  -webkit-animation-direction: alternate; animation-direction: alternate;
  -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards;
  display: inline-block; /* Essential for span animations to fire properly */
}
@keyframes color-text-flow-keys {
  0% {color: #d65c97;} 5% {color: #5cd666;} 10% {color: #a55cd6;} 15% {color: #5c7cd6;}
  20% {color: #d65c7a;} 25% {color: #81d65c;} 30% {color: #835cd6;} 35% {color: #685cd6;}
  40% {color: #5c9dd6;} 45% {color: #5cd670;} 50% {color: #d6625c;} 55% {color: #d6835c;}
  60% {color: #d6605c;} 65% {color: #be5cd6;} 70% {color: #5c8dd6;} 75% {color: #95d65c;}
  80% {color: #d69d5c;} 85% {color: #d65c81;} 90% {color: #5cd666;} 95% {color: #d67e5c;}
  100% {color: #64d65c;}
}



/* --- Enterprise Cookie Banner Styles --- */
.cookie-consent-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 850px;
    background: var(--card-bg, #1a1a1a); /* Seamlessly adapts to your dark/light mode */
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-left: 4px solid var(--accent-color, #ffb45c);
    border-radius: 12px;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    flex-wrap: wrap;
    gap: 20px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1 1 400px;
}

.cookie-icon i {
    font-size: 2.2rem;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Smooth Slide-up Animation */
@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cookie-consent-banner {
        bottom: 15px;
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}






/* --- Inner Page Hero --- */
.inner-hero {
    margin-top: 70px; padding: 60px 20px; text-align: center;
    background-image: var(--bg-image); background-size: cover;
    background-position: center; color: white;
}

/* --- Content & Cards --- */
.content-section { padding: 60px 10%; line-height: 1.8; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--modal-bg); padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); text-align: center; }

/* --- Footer --- */
.site-footer { background: #111; color: #ccc; padding: 50px 10% 20px; }