:root {
    --color-saffron: #FF9933;
    --color-temple-red: #B22222;
    --color-gold: #FFD700;
    --color-stone: #4A4A4A;
    --color-off-white: #FCF8F2;
    --color-dark: #222;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-off-white);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container stays within viewport */
}

/* Header & Navigation */
header {
    background-color: #fff;
    border-bottom: 5px solid var(--color-temple-red);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.logo-link {
    display: block;
}

.logo img {
    height: 80px;
    margin-right: 15px;
}

.site-title a {
    text-decoration: none;
}

.site-title h1 {
    font-family: var(--font-heading);
    color: var(--color-temple-red);
    font-size: 1.8rem;
    margin: 0;
}

.site-title p {
    font-size: 0.9rem;
    color: var(--color-stone);
    font-weight: 500;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--color-temple-red);
    border-radius: 2px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--color-temple-red);
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping for mobile */
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 4px solid var(--color-gold);
}

.hero-text {
    flex: 1;
}

.hero-text .thirukkural {
    font-family: var(--font-heading);
    color: var(--color-temple-red);
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.thirukkural span {
    display: block;
    white-space: nowrap;
}

.thirukkural .line-2 {
    padding-left: 2rem;
}

@media (max-width: 600px) {
    .hero-text .thirukkural {
        font-size: 1.4rem;
    }
    .thirukkural .line-2 {
        padding-left: 1rem;
    }
}

.translation {
    font-style: italic;
    color: var(--color-stone);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid var(--color-saffron);
}

.description {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.cta {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--color-saffron);
    color: #fff;
}

.btn-primary:hover {
    background-color: #e68a00;
}

.btn-secondary {
    border: 2px solid var(--color-temple-red);
    color: var(--color-temple-red);
}

.btn-secondary:hover {
    background-color: var(--color-temple-red);
    color: #fff;
}

/* Mission Section */
.mission {
    padding: 80px 0;
    text-align: center;
    background-color: var(--color-temple-red);
    color: #fff;
}

.mission h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.mission p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Page Headers */
.page-header {
    background-color: var(--color-saffron);
    padding: 60px 0;
    text-align: center;
    color: #fff;
    border-bottom: 5px solid var(--color-gold);
}

.page-header h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
}

.translation-header {
    font-style: italic;
    opacity: 0.9;
    font-size: 1rem;
    margin-top: 10px;
}

/* Contact Page */
.contact-container {
    display: flex;
    gap: 50px;
}

.contact-form-section {
    flex: 2;
}

.contact-form-section h3 {
    font-family: var(--font-heading);
    color: var(--color-temple-red);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
}

.contact-info-sidebar {
    flex: 1;
}

.info-card {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-top: 4px solid var(--color-saffron);
}

.info-card h4 {
    color: var(--color-temple-red);
    margin-bottom: 15px;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
    background-color: #fff;
}

.text-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.text-content p {
    margin-bottom: 20px;
}

.invocation {
    text-align: center;
    font-weight: bold;
    color: var(--color-temple-red);
    font-size: 1.4rem;
    margin-bottom: 30px !important;
}

.text-content h3 {
    font-family: var(--font-heading);
    color: var(--color-temple-red);
    font-size: 1.8rem;
    margin: 40px 0 20px;
}

.mission-list {
    margin: 0 0 30px 20px;
}

.mission-list li {
    margin-bottom: 10px;
    list-style-type: square;
    color: var(--color-stone);
}

.cta-center {
    text-align: center;
    margin-top: 50px;
}

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

.blog-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border-bottom: 4px solid var(--color-gold);
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-info {
    padding: 20px;
}

.blog-info h3 {
    font-family: var(--font-heading);
    color: var(--color-temple-red);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.blog-info p {
    font-size: 0.95rem;
    color: var(--color-stone);
    margin-bottom: 20px;
}

.read-more {
    color: var(--color-saffron);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.read-more.disabled {
    color: #999;
    pointer-events: none;
}

/* Donation Page */
.donation-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.donation-text {
    flex: 2;
}

.donation-sidebar {
    flex: 1;
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
    border-top: 5px solid var(--color-saffron);
}

.charity-info h4 {
    color: var(--color-temple-red);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.charity-info hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

.method-card {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--color-off-white);
    border: 2px dashed var(--color-gold);
    text-align: center;
}

.bank-details {
    text-align: left;
}

.bank-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-top: 15px;
    border: 1px solid #eee;
}

.bank-info p {
    margin-bottom: 5px;
    font-size: 1rem;
}

.security-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff5f5;
    border-left: 4px solid var(--color-temple-red);
    font-size: 0.9rem;
    color: #444;
}

.security-note strong {
    color: var(--color-temple-red);
}

.btn-paypal img {
    max-width: 200px;
    margin-top: 20px;
}

/* Events Section */
.events-list {
    max-width: 800px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 5px solid var(--color-temple-red);
}

.event-date {
    background-color: var(--color-off-white);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.event-date .day {
    font-weight: bold;
    color: var(--color-temple-red);
    font-size: 1.2rem;
}

.event-date .month {
    font-weight: bold;
    color: var(--color-saffron);
}

.event-details h3 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    margin-bottom: 10px;
}

.location {
    margin-top: 15px;
    color: var(--color-stone);
    font-size: 0.9rem;
}

/* Blog Post Detail */
.blog-post .post-image {
    margin-bottom: 30px;
    text-align: center;
}

.blog-post .post-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.upadesam {
    background-color: #fff9f0;
    padding: 30px;
    border-left: 5px solid var(--color-saffron);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-temple-red);
    margin: 40px 0;
    line-height: 2;
    text-align: center;
}

/* Footer */
footer {
    background-color: #333;
    color: #eee;
    padding: 60px 0 20px;
    border-top: 10px solid var(--color-gold);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 100px;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.footer-links h4, .footer-contact h4 {
    color: var(--color-saffron);
    font-family: var(--font-heading);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 15px;
}

.footer-donate h4 {
    color: var(--color-saffron);
    font-family: var(--font-heading);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.paypal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.paypal-btn img {
    max-width: 120px;
}

.paypal-logo-btn {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    max-width: 180px;
}

.paypal-logo-btn img {
    max-width: 100%;
}

.footer-bank-details {
    margin-top: 20px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #ccc;
}

.footer-bank-details p {
    margin-bottom: 5px;
}

.footer-bank-details strong {
    color: var(--color-saffron);
}

.footer-contact p i {
    color: var(--color-saffron);
    margin-right: 10px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-saffron);
}

.social-links i {
    font-size: 1.2rem;
    width: 25px; /* Ensures icons align vertically */
    text-align: center;
}

.social-notice {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
}

.social-notice a {
    color: #fff;
    text-decoration: none;
    background-color: rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 5px;
    transition: background 0.3s;
}

.social-notice a:hover {
    background-color: var(--color-gold);
    color: var(--color-temple-red);
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        border-bottom: 5px solid var(--color-gold);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 15px 20px;
        width: 100%;
    }

    .hero-container, .donation-container, .contact-container {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo img {
        margin: 0 auto 20px;
    }

    .paypal-buttons {
        align-items: center;
    }

    .hero-text h2 {
        font-size: 1.5rem;
    }

    .site-title h1 {
        font-size: 1.4rem;
    }

    .logo img {
        height: 60px;
    }
}
