/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Montserrat:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-color: #d9232d;
    --secondary-color: #fbb03b;
    --dark-blue: #212f3c; 
    --text-dark: #333333;
    --text-light: #555555;
    --bg-light: #ffffff;
    --bg-grey: #f8f9fa;
    --border-color: #e0e0e0;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --container-width: 1200px;
    --header-height: 70px;
}

/* --- General Styles & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevents horizontal scroll */
}

/* --- Preloader Style --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    visibility: visible;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #a11a21;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.5rem; text-align: center; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 3rem;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.75rem auto 0;
}

section {
    padding: 80px 0;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-primary);
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-image: linear-gradient(45deg, #a11a21 0%, #d9232d 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    background-image: linear-gradient(45deg, #d9232d 0%, #a11a21 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #f9a01b;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Language Toggle Switch --- */
.lang-switch {
    display: flex;
    align-items: center;
    padding: 0 15px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    font-family: var(--font-primary);
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    z-index: 2;
}
.lang-text-en, .lang-text-hi {
    font-size: 11px;
    font-weight: bold;
    color: white;
    transition: opacity 0.4s ease;
}
.lang-text-hi {
    opacity: 0.5;
}
.lang-text-en {
    opacity: 1;
}
input:checked + .slider {
    background-color: var(--primary-color);
}
input:checked + .slider:before {
    transform: translateX(30px);
}
input:checked + .slider .lang-text-en {
    opacity: 0.5;
}
input:checked + .slider .lang-text-hi {
    opacity: 1;
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}


/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 95%; 
    max-width: 1300px; 
    height: var(--header-height);
    z-index: 1000;
    border-radius: 12px; 
    
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
}

.logo span {
    font-family: var(--font-secondary);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    font-family: var(--font-primary);
    padding: 5px 0;
    position: relative;
    font-size: 1rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links .mobile-donate-link {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 5px;
    transition: all 0.3s ease;
}

main {
    padding-top: calc(var(--header-height) + 40px); 
}

/* --- Scroll Animation --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Home Page Styles --- */
.hero {
    background-color: var(--bg-grey);
    padding: 80px 0;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}
.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}
.hero-text p {
    font-size: 1.1rem;
    margin: 1.5rem 0 2rem;
}
.hero-image img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.vision-section .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.vision-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.vision-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.vision-section.in-view .vision-item:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.vision-section.in-view .vision-item:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.vision-section.in-view .vision-item:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.vision-item .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}
.vision-item:hover .icon {
    transform: scale(1.1) rotate(10deg);
}
.vision-item .icon.yellow {
    background-color: var(--secondary-color);
}

/* --- About Page Styles --- */
.about-mission {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.about-mission ul {
    list-style: none;
    margin-top: 1.5rem;
}
.about-mission li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-mission i {
    color: var(--primary-color);
    font-size: 1.2rem;
}
.team-member {
    text-align: center;
}
.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 5px solid var(--border-color);
}
.team-member.founder img {
    width: 200px;
    height: 200px;
    border-color: var(--primary-color);
}
.trustee-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Courses Page Styles --- */
.courses-container-new {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
.course-card-new {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    border: 1px solid var(--primary-color); 
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card-new:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-8px);
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.course-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 1.5rem 0;
}
.course-details-grid ul {
    list-style: none;
    padding: 0;
}
.course-details-grid li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.course-details-grid i {
    color: var(--primary-color);
    margin-right: 8px;
    width: 20px;
    text-align: center;
}
.course-footer-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.course-fee .original-fee {
    text-decoration: line-through;
    color: var(--text-light);
    margin-right: 10px;
    font-size: 1.2rem;
}
.course-fee .free-text {
    color: #28a745;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-secondary);
}

/* --- Admission Page Styles --- */
.admission-form {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 35, 45, 0.2);
}
.terms-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.terms-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}
.terms-group label {
    margin: 0;
    font-weight: 500;
}
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}
.info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}
.info-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.info-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 300px;
    margin: 1rem auto 0;
}
.info-card li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: start;
    gap: 10px;
}
.info-card li i {
    color: var(--primary-color);
    margin-top: 5px;
}
.batch-date {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* --- Contact Page Styles --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: start;
}
.contact-info-item {
    display: flex;
    align-items: start;
    gap: 20px;
    margin-bottom: 2rem;
}
.contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}
.contact-icon.yellow {
    background-color: var(--secondary-color);
}
.contact-text strong {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-dark);
}

/* --- Join Us Page Styles --- */
.volunteer-item {
    display: flex;
    align-items: start;
    gap: 20px;
    text-align: left;
    margin-bottom: 2rem;
}
.volunteer-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.volunteer-icon.red {
    background: linear-gradient(135deg, var(--primary-color), #ff4d5a);
    box-shadow: 0 4px 15px rgba(217, 35, 45, 0.3);
}
.volunteer-icon.yellow {
    background: linear-gradient(135deg, var(--secondary-color), #fdd835);
    box-shadow: 0 4px 15px rgba(251, 176, 59, 0.3);
}
.volunteer-item:hover .volunteer-icon {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.volunteer-text h4 {
    margin-bottom: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
}

/* --- Donate Page Styles --- */
.donate-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}
.donation-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}
.amount-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.amount-btn {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}
.amount-btn:hover {
    background-color: var(--bg-grey);
    border-color: var(--text-dark);
}
.amount-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.amount-btn.custom {
    border-style: dashed;
}
.selected-amount {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}
.custom-amount-wrapper {
    display: none;
    margin-top: 1rem;
}
.payment-methods {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 1rem;
}
.payment-method {
    border-bottom: 1px solid var(--border-color);
}
.payment-method:last-child {
    border-bottom: none;
}
.payment-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
}
.payment-method-header span {
    font-weight: 600;
}
.payment-method-header i {
    margin-right: 10px;
    color: var(--primary-color);
}
.payment-method-details {
    padding: 0 1.5rem 1.5rem;
    display: none; /* Hidden by default */
}
.impact-item, .tax-benefits {
    display: flex;
    align-items: start;
    gap: 20px;
    margin-bottom: 2rem;
}
.impact-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
}
.impact-icon.red {
    background: linear-gradient(135deg, var(--primary-color), #ff4d5a);
}
.impact-icon.yellow {
    background: linear-gradient(135deg, var(--secondary-color), #fdd835);
}
.impact-text h4 {
    margin-bottom: 0.25rem;
    font-family: var(--font-primary);
    font-weight: 600;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.visible .modal {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.modal-header h2 {
    text-align: left;
}
.close-button {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-light);
}
.modal-body h4 {
    margin-top: 1.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-blue);
    color: #f1f1f1;
    padding: 40px 0 20px; 
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px; 
}
.footer-col h4 {
    color: white;
    font-family: var(--font-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transition: width 0.3s ease;
}
.footer-col:hover h4::after {
    width: 100%;
}
.footer-col p {
    color: #ccc;
    margin-bottom: 1rem;
}
.footer-socials {
    display: flex;
    gap: 15px;
}
.social-icon-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.social-icon-wrapper .tooltip {
    position: absolute;
    top: 120%;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease;
}
.social-icon-wrapper:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: 130%;
}
.footer-socials a {
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
}
.footer-socials a:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-3px);
}
.footer-links li {
    list-style: none;
    margin-bottom: 12px;
}
.footer-links a {
    color: #ccc;
    transition: color 0.3s ease, padding-left 0.3s ease;
}
.footer-links a:hover {
    color: white;
    padding-left: 5px;
}
.footer-contact li {
    display: flex;
    align-items: start;
    gap: 15px;
}
.footer-contact li i {
    flex-shrink: 0;
    margin-top: 5px;
    font-size: 1rem;
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}
.footer-contact li a {
    padding-left: 0;
    display: flex;
    align-items: start;
    gap: 15px;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #4a627a;
    font-size: 0.9rem;
    color: #ccc;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(var(--header-height) + 10px); /* Adjusted for floating header */
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding: 20px;
        gap: 20px;
        border-radius: 12px;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links .mobile-donate-link {
        display: block;
    }
    .hamburger {
        display: flex;
    }
    .main-nav .btn-secondary {
        display: none;
    }
    .hero-content, 
    .about-mission, 
    .trustee-grid, 
    .course-card-new, 
    .info-grid, 
    .contact-grid, 
    .donate-grid,
    .vision-section .grid {
        grid-template-columns: 1fr;
    }
    .hero-text h1 {
        font-size: 2.5rem;
        overflow-wrap: break-word; 
    }
    .logo span {
        font-size: 1.3rem;
    }
    .course-card-new {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col:hover h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-contact li {
        justify-content: center;
    }
    .footer-contact li a {
        justify-content: center;
    }
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
