* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: none !important;
    box-shadow: none !important;
}

:root {
    --primary-color: #800020; 
    --primary-light: #a8324a;
    --primary-dark: #600018;
    --secondary-color: #d4af37; 
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-marathi: 'Noto Sans Devanagari', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    padding-top: 80px; 
    display: block; /* REVERTED: Let .content-wrapper handle the flex layout */
}

body.marathi {
    font-family: var(--font-marathi);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
    outline: none !important;
}

a:hover {
    color: var(--primary-light);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    font-family: inherit;
    outline: none !important; 
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}


.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-light);
    z-index: 99999 !important; /* Forced to the absolute front */
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    z-index: 9;
    outline: none !important;
}

.navbar-logo {
    height: 200px;
    width: auto;
    z-index: 9;
}


.logo img{
    height: 52px;
    width: 52px;
}

.brand-text{
    font-size: 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}


.nav-link {
    margin: 0 15px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
    

    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none; 
}


.nav-link:hover, 
.nav-link:focus, 
.nav-link:active, 
.nav-link:visited, 
.nav-link.active {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important; 
    color: var(--primary-color); 
}


.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}


.language-toggle {
    margin-left: 10px;
}

.lang-btn {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    width: 70px;
    height: 40px;
    transition: var(--transition);
    outline: none !important; 
    -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
    background-color: var(--bg-gray);
}

.lang-text, .lang-text-hide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.lang-text-hide {
    display: none;
    opacity: 0;
}

body.marathi .lang-text {
    display: none;
    opacity: 0;
}

body.marathi .lang-text-hide {
    display: inline;
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

/* Guarantees main content stays on top of the footer */
.hero, .features, .upcoming-events, .page-header, .container {
    position: relative;
    z-index: 2 !important; 
}


.footer {
    background-color: var(--primary-dark);
    color: var(--text-white);
    padding: 60px 0 30px;
    width: 100%;
    position: relative; 
    z-index: 1; 
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-white);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.page-header {
    padding: 60px 0;
    background-color: var(--bg-light);
    text-align: center;
}

.page-title {
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 1.2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-modal:hover {
    color: var(--text-dark);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: #1a472a;
    color: white;
    padding: 8px;
    z-index: 100;
    text-decoration: none;
}

.skip-to-main:focus {
    top: 0;
}

article.event-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

[itemprop] {
}

.form-success {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10000 !important;
    background: linear-gradient(135deg, #800020, #a00030) !important;
    color: white !important;
    padding: 2.5rem !important;
    border-radius: 15px !important;
    box-shadow: 0 20px 50px rgba(128, 0, 32, 0.4) !important;
    text-align: center !important;
    animation: fadeInScale 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    max-width: 500px !important;
    width: 90% !important;
    border: 3px solid rgba(255, 255, 255, 0.2) !important;
    opacity: 0;
    transition: opacity 0.3s ease !important;
}

.form-success.show {
    opacity: 1 !important;
}

.form-success h3 {
    font-size: 1.8rem !important;
    margin-bottom: 1rem !important;
    color: white !important;
    font-weight: 700 !important;
}

.form-success p {
    font-size: 1.1rem !important;
    margin-bottom: 1.5rem !important;
    opacity: 0.9 !important;
    line-height: 1.6 !important;
}

.form-success i {
    font-size: 3.5rem !important;
    margin-bottom: 1.5rem !important;
    color: #d4a76a !important;
    display: block !important;
}



/* =========================================
   Developer Section Styles
   ========================================= */
.developer-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nirvaa-logo {
    max-width: 180px; /* Adjust based on your actual logo dimensions */
    height: auto;
    display: block;
}

.developer-address {
    font-style: normal;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.6;
}

.developer-contact {
    margin-top: 8px;
}

.developer-contact a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.developer-contact a:hover {
    color: var(--secondary-color);
}

.developer-contact .divider {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for developer section */
@media (max-width: 576px) {
    .developer-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .developer-contact .divider {
        display: none;
    }
}


@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1); 
    }
}

button[type="submit"] {
    position: relative;
    overflow: hidden;
    outline: none !important;
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.error-message {
    color: #e74c3c !important;
    font-size: 0.85rem !important;
    margin-top: 0.5rem !important;
    display: none;
    background: rgba(231, 76, 60, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

input.error, textarea.error, select.error {
    border-color: #e74c3c !important;
    background-color: rgba(231, 76, 60, 0.05) !important;
}

input.valid, textarea.valid, select.valid {
    border-color: #2ecc71 !important;
}

@media (max-width: 768px) {
    .form-success {
        padding: 1.5rem !important;
        width: 95% !important;
    }
    
    .form-success h3 {
        font-size: 1.5rem !important;
    }
    
    .form-success p {
        font-size: 1rem !important;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .navbar .container {
        position: relative;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: var(--shadow);
        display: none;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        margin: 10px 0;
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .language-toggle {
        margin: 15px 0 0;
    }
    
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title, .page-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media print {
    .navbar, .footer, .btn, .mobile-menu-btn, .language-toggle {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .container {
        max-width: 100%;
    }
    
    a {
        color: var(--text-dark);
        text-decoration: none;
    }
}

@media (max-width: 768px) {
    /* =========================================
       1. General Mobile Resets
       ========================================= */
    body {
        padding-top: 70px;
    }

    /* =========================================
       2. Navbar & Header (FIXED TITLE & LOGO)
       ========================================= */
    .navbar {
        padding: 10px 0; 
    }

    .navbar .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        max-width: 80%; /* Ensures logo area doesn't push the menu button off screen */
        gap: 8px;
    }

    .logo img {
        height: 38px; 
        width: 38px;
        flex-shrink: 0; /* Prevents the image from squishing */
    }

    .brand-text {
        font-size: 2rem; /* Slightly smaller to fit */
        white-space: normal; /* Allows text to wrap to a second line instead of hiding */
        line-height: 1.2;
        color: var(--primary-color);
    }

    .mobile-menu-btn {
        display: block;
        padding: 5px 0 5px 15px; 
        font-size: 1.4rem;
    }

    /* =========================================
       3. Smooth Animated Dropdown Menu
       ========================================= */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 0; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Target the list items to ensure full width */
    .nav-menu li {
        width: 100%;
    }

    /* Full-width Touch Targets for Links */
    .nav-link {
        margin: 0;
        display: block;
        width: 100%;
        padding: 15px 20px; 
        border-bottom: 1px solid #f5f5f5 !important; 
        text-align: left;
        transition: padding 0.3s ease, background-color 0.3s ease;
    }
    
    .nav-link.active::after {
        display: none; 
    }
    
    .nav-link:hover, 
    .nav-link:active,
    .nav-link.active {
        background-color: #fdfbf7 !important; 
        color: var(--primary-color);
        padding-left: 25px; 
    }
    
    /* =========================================
       4. Language Toggle Fix
       ========================================= */
    .nav-menu li:last-child {
        padding: 15px 20px; /* Aligns the button container with the links */
        border-bottom: none;
    }

    .lang-btn {
        width: 120px; /* Fixed width */
        margin: 0; /* Resets any centered margins */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* =========================================
       5. Modals & Forms
       ========================================= */
    .modal-content {
        padding: 30px 20px;
        width: 95%;
    }

    .form-success {
        padding: 1.5rem !important;
        width: 95% !important;
    }
    
    .form-success h3 {
        font-size: 1.5rem !important;
    }
    
    .form-success p {
        font-size: 1rem !important;
    }

    /* =========================================
       6. Enhanced Mobile Footer
       ========================================= */
    .footer {
        padding: 40px 0 20px; 
    }

    .footer-content {
        gap: 30px; 
        text-align: center; 
    }

    .footer-title {
        margin-bottom: 15px;
    }

    .footer-links li {
        margin-bottom: 12px; 
    }

    .footer-links a {
        display: inline-block;
        padding: 8px 10px; 
    }

    .footer-links a:hover {
        padding-left: 10px; 
        color: var(--secondary-color); 
    }

    .social-icons {
        justify-content: center; 
        margin-top: 10px;
    }

    .footer-bottom {
        padding-top: 20px;
        margin-top: 10px;
    }
}

/* Extra small devices check */
@media (max-width: 380px) {
    .brand-text {
        font-size: 0.85rem; /* Scales down one more step for very narrow phones like iPhone SE */
    }
}