/* ==========================================================================
   SRI SAI TRUST - LANDING PAGE MASTER CSS (SECURE & OPTIMIZED)
   ========================================================================== */

/* --- Global Resets & Theme Variables --- */
:root {
    --bg-color-main: #f4eee6; 
    --header-bg: #ffffff;
    --text-main: #333333;
    --text-spiritual: #7c2d2d; 
    --btn-primary-bg: #003366; 
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #7c2d2d; 
    --btn-secondary-text: #ffffff;
    --modal-overlay-bg: rgba(0, 0, 0, 0.85);
    --modal-bg: #ffffff;
    --divine-color: #fdd835; 
    --input-bg: #f9f9f9;
    --input-border: #cccccc;
    --input-text: #333333;
    --bg-image: url('images/bg-light.jpg');
}

body.dark-mode {
    --bg-color-main: #181a1f; 
    --header-bg: #111111;
    --text-main: #e0e0e0;
    --text-spiritual: #dca0a0; 
    --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: #fffac0; 
    --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%; filter: blur(2px);
    background: radial-gradient(circle, #ffffff 10%, var(--divine-color) 40%, transparent 70%);
    box-shadow: 0 0 50px 20px var(--divine-color);
    animation: divineSparkFall 6s infinite cubic-bezier(0.25, 0.1, 0.25, 1);
}
@keyframes divineSparkFall {
    0% { top: -10vh; transform: translateX(-50%) scale(1); opacity: 0; }
    15% { opacity: 0.95; }
    85% { opacity: 0.8; }
    100% { top: 110vh; transform: translateX(-50%) scale(15); 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 (PERFECT SCALING) --- */
@media (max-width: 768px) {
    .landing-container {
        background-size: contain; 
        background-position: top center; 
    }

    .text-content-block.top-corner-left {
        top: 50%; 
        left: 50%;
        transform: translate(-50%, -30%);
        width: 90%;
        text-align: center;
        padding: 15px;
    }
    .main-sentence { font-size: 1.3rem; text-align: center; }

    .action-block.bottom-right {
        bottom: 5%; 
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        text-align: center;
    }
}

/* --- 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;}
}








/* --- 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; }