/* Ananthapura Temple Website - Main Stylesheet */

/* CSS Variables */
:root {
    --color-primary: #8B4513;
    --color-secondary: #DAA520;
    --color-accent: #B8860B;
    --color-gold: #FFD700;
    --color-maroon: #800000;
    --color-cream: #FFFDD0;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #FFFFFF;
    --color-bg-light: #F9F7F4;
    --color-border: #E0D5C7;
    
    --font-primary: 'Anek Malayalam','Lora', serif;
    --font-malayalam: 'Noto Sans Malayalam','Anek Malayalam', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

body[lang="ml"] {
    font-family: var(--font-malayalam);
}

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

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

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language Bar */
.lang-bar {
    background-color: var(--color-primary);
    padding: 8px 0;
    color: white;
}

.lang-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.lang-switcher a {
    color: rgba(255,255,255,0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

/* Header */
.site-header {
    background-color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

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

.logo-img {
    width: 60px;
    height: 60px;
}

.temple-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-maroon);
    margin: 0;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-secondary);
}

.btn-donate {
    background-color: var(--color-secondary);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 25px;
    border: none !important;
}

.btn-donate:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

/* Flash Messages */
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    position: relative;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
}

.flash-close:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background-color: var(--color-primary);
}

.hero-slide {
    position: relative;
    height: 100%;
    display: none;
}

.hero-slide.active {
    display: block;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Ensure image doesn't break layout on small images */
@supports (object-fit: cover) {
    .hero-slide img {
        font-family: 'object-fit: cover;'; /* Fallback for older browsers */
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-tagline {
    font-size: 24px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-cream);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* Quick Info Section */
.quick-info {
    background-color: white;
    padding: 60px 0;
    margin-top: -80px;
    position: relative;
    z-index: 100;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    background-color: var(--color-bg-light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.info-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 20px;
}

.info-card p {
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.info-link {
    color: var(--color-secondary);
    font-weight: 600;
}

.info-link:hover {
    color: var(--color-accent);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--color-maroon);
    margin-bottom: 15px;
}

.section-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--color-secondary), var(--color-accent));
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* About Section */
.about-section {
    background-color: var(--color-bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--color-text-light);
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.event-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-image {
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.event-card:hover .event-image img {
    transform: scale(1.1);
}

.event-content {
    padding: 25px;
    position: relative;
}

.event-date {
    position: absolute;
    top: -30px;
    right: 20px;
    background-color: var(--color-secondary);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.event-date .day {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.event-date .month {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
}

.event-content h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
}

.event-content p {
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.event-link {
    color: var(--color-secondary);
    font-weight: 600;
}

.event-link:hover {
    color: var(--color-accent);
}

/* Gallery Section */
.gallery-section {
    background-color: var(--color-bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(139, 69, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-icon {
    font-size: 48px;
    color: white;
}

/* Sponsors Section */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    align-items: center;
}

.sponsor-item {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.sponsor-item:hover {
    box-shadow: var(--shadow-md);
}

.sponsor-item img {
    max-height: 80px;
    margin: 0 auto 15px;
}

.sponsor-level {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 10px;
}

.sponsor-platinum .sponsor-level {
    background-color: #E5E4E2;
    color: #333;
}

.sponsor-gold .sponsor-level {
    background-color: var(--color-gold);
    color: #333;
}

.sponsor-silver .sponsor-level {
    background-color: #C0C0C0;
    color: #333;
}

.sponsor-bronze .sponsor-level {
    background-color: #CD7F32;
    color: white;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-maroon), var(--color-primary));
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--color-gold);
}

.footer-links li {
    margin-bottom: 10px;
}

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

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info li {
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
}

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

.footer-bottom a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: white;
        box-shadow: var(--shadow-lg);
        padding: 20px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-tagline {
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .hero {
        height: 400px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}