/* style.css - புதிய மற்றும் மேம்படுத்தப்பட்ட பாணி */

/* **1. அடிப்படை அமைப்பு, எழுத்துரு மற்றும் வண்ணத் திட்டம்** */
:root {
    /* நீங்கள் வழங்கிய வண்ணத் திட்டம் */
    --primary-dark-teal: #1A3B4A; /* தலைமை நிறம் (Dark Blue/Teal) */
    --accent-red: #E74C3C; /* துணை நிறம் (Red/Accent) */
    --text-dark: #2c3e50;
    --background-light: #F4F4F4; /* <--- இங்கே மாற்றப்பட்டுள்ளது: மென்மையான சாம்பல் நிறம் */
    --shadow-light: 0 6px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.2);
    /* புதிய எழுத்துரு அளவுகள் */
    --fs-h1: 3.2rem;
    --fs-h2: 2.2rem;
    --fs-h3: 1.6rem;
    --fs-body: 1.1rem;
    --fs-nav: 1rem;
}

body {
    /* உள்ளடக்க எழுத்துரு */
    font-family: 'Hind Madurai', sans-serif;
    margin: 0;
    padding: 0;
    /* மேம்படுத்தப்பட்ட அடிப்படை எழுத்துரு அளவு */
    font-size: var(--fs-body); 
    /* பின்னணி நிறம் இங்கே மாறியின் மூலம் தானாகப் புதுப்பிக்கப்படும் */
    background-color: var(--background-light); 
    color: var(--text-dark);
    line-height: 1.7; /* வாசிப்பதற்கு ஏற்றவாறு line-height அதிகரிப்பு */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* மற்ற CSS பாணிகள் அனைத்தும் மாறாமல் அப்படியே இருக்கும்... */
body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* தலைப்புகளுக்கான எழுத்துரு மற்றும் அளவுகள் */
h1, h2, h3 {
    font-family: 'Arima', cursive;
    color: var(--primary-dark-teal);
    text-align: center;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: var(--fs-h1);
    padding-bottom: 10px;
}

h2 {
    font-size: var(--fs-h2);
    color: var(--accent-red); 
}

h3 {
    font-size: var(--fs-h3);
    color: var(--primary-dark-teal);
}

/* **2. தலைப்புப் பட்டை (Header & Navigation) ** */
header {
    background-color: var(--primary-dark-teal);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    min-height: 80px;
}

/* லோகோ பகுதி */
.logo-brand {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-family: 'Arima', cursive;
    font-size: 2em;
    font-weight: 700;
}

.logo-brand img {
    height: 55px;
    margin-right: 12px;
    border-radius: 5px;
}

/* மெனு பட்டியல் */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li a {
    color: #fff !important;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--fs-nav);
    padding: 15px 20px;
    display: block;
    transition: background-color 0.3s ease, border-radius 0.3s ease;
    border-radius: 0;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* **3. மெனு ஐகான் (Hamburger Icon) - புதிதாக சேர்க்கப்பட்டது** */

.menu-icon {
    width: 30px;
    height: 20px;
    position: relative;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
    display: none; /* டெஸ்க்டாப்பில் மறைக்க */
}

.menu-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.menu-icon span:nth-child(1) {
    top: 0px;
}

.menu-icon span:nth-child(2) {
    top: 8px;
}

.menu-icon span:nth-child(3) {
    top: 16px;
}

/* ஐகான் திறக்கும்போது X ஆக மாற்றுவதற்கான அனிமேஷன் */
.menu-icon.open span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.menu-icon.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.menu-icon.open span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}


/* **4. மொபைல் ரெஸ்பான்சிவ் அமைப்பு** */
/* மெனு பிழைகளைச் சரிசெய்வதற்காக இந்த மீடியா வினவலுக்கு வெளியே உள்ள தேவையற்ற '}' நீக்கப்பட்டுள்ளது */

@media (max-width: 900px) { /* இங்கே மீடியா வினவல் 900px ஆக மாற்றப்பட்டுள்ளது */
    /* ஹாம்பர்கர் ஐகானைக் காட்டு */
    .menu-icon {
        display: block;
    }
    
    /* மொபைலில் மெனுவை மறை/காட்டு */
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* header இன் min-height க்கு ஏற்ப மாற்றப்பட்டுள்ளது */
        left: 0;
        background-color: var(--primary-dark-teal);
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }
    
    /* மெனு திறக்கும்போது காட்ட (இது JavaScript ஆல் சேர்க்கப்படும்) */
    nav ul.active {
        display: flex;
        padding-bottom: 10px;
    }
    
    nav ul li {
        text-align: center;
        width: 100%;
    }
    nav ul li a {
        padding: 12px 0;
        font-size: 1.1rem;
    }

    /* தலைவர் செய்திப் பகுதி (Mobile Layout) */
    .leader-message-section {
        flex-direction: column;
        text-align: center;
    }
    .leader-image-wrapper {
        min-width: unset;
        order: -1;
    }
    .leader-text-content {
        min-width: unset;
    }
    .leader-text-content h2 {
        text-align: center;
    }

     /* நிகழ்வுகள் பக்க அமைப்பு: 900px க்கு கீழே இரு பக்கங்களையும் செங்குத்தாக அடுக்குதல் */
    .events-layout {
        flex-direction: column; 
    }

    .events-list-panel, .events-gallery-panel {
        flex: auto;
        min-width: 100%; 
    }
} /* 900px மீடியா வினவல் இங்கே முடிகிறது */


/* தலைவர் செய்தி மற்றும் படம் (Image Left Side) */
.leader-message-section {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    gap: 30px;
    background-color: #f7f7f7;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.leader-image-wrapper {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.leader-image-wrapper img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 50%; 
    border: 6px solid var(--primary-dark-teal);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease;
}

.leader-text-content {
    flex: 3;
    min-width: 350px;
    text-align: left;
}
.leader-text-content h2 {
    text-align: left;
    margin-bottom: 15px;
    color: var(--primary-dark-teal);
    font-size: var(--fs-h2);
}
.leader-text-content .author {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--accent-red);
    font-size: 1.1rem;
}

/* **3. ஹீரோ பகுதி (Hero Section) - Font Size Correction** */
.hero-section {
    background: linear-gradient(rgba(26, 59, 74, 0.6), rgba(26, 59, 74, 0.6)), url('assets/home_banner.png') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 120px 0;
    text-align: center;
    border-bottom-left-radius: 90px;
    border-bottom-right-radius: 90px;
    margin-bottom: 60px;
    animation: fadeIn 1s ease-out;
}
.hero-section h1 {
    font-family: 'Arima', cursive;
    color: #fff;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.8);
    font-size: 4rem;
    font-weight: 800;
    animation: slideIn 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* **4. பொதுவான உள்ளடக்கம் மற்றும் அனிமேஷன்** */
.container {
    max-width: 1200px;
    margin: 10px auto;
    padding: 30px;
}

.content-box {
    opacity: 0;
    animation: fadeIn 1.5s ease-out forwards;
    padding: 35px;
    margin-bottom: 35px;
    border-radius: 12px;
    background-color: #ffffff; /* உள்ளடக்கப் பெட்டியின் நிறம் வெள்ளை, எனவே பின்னணியில் இருந்து தனித்துத் தெரியும் */
    border-left: 6px solid var(--accent-red);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* ஹோவர் அனிமேஷன் - பெட்டிகள் மிதப்பதைப் போல தோன்றும் */
.content-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
}

/* **5. காட்சியகம் (Gallery) - (Events/Gallery pagesக்கு)** */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding-top: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,.2);
    transition: box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    display: block;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ஸ்கேலிங் அனிமேஷன் */
.gallery-item:hover img {
    transform: scale(1.15);
}

/* **6. நிகழ்வுகள் அட்டவணை (Events Table)** - திருத்தப்பட்டது */
table {
    width: 100%; /* <-- இந்த வரி கட்டாயம் இருக்க வேண்டும் */
    table-layout: auto; /* உள்ளடக்கத்திற்கு ஏற்ப அகலத்தை சரிசெய்ய */
    border-collapse: collapse;
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden; 
}
table th, table td {
    padding: 12px 15px; /* <-- உள் இடைவெளியை (Padding) குறைத்தல் */
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}
table th {
    background-color: var(--primary-dark-teal);
    color: white;
    font-weight: 600;
    font-family: 'Hind Madurai', sans-serif;
    letter-spacing: 0.5px;
}
/* அட்டவணை நிரம்பி வழிதலைத் தடுக்கவும், சிறிய திரைகளில் சுழல அனுமதிக்கவும் */
.table-responsive {
    overflow-x: auto; /* கிடைமட்டமாக சுழல அனுமதிக்கும் */
    -webkit-overflow-scrolling: touch; 
}
table {
    width: 100%;
    table-layout: auto; /* உள்ளடக்கத்தின் அளவிற்கு ஏற்ப அகலம் */
    word-break: break-word; /* நீண்ட வார்த்தைகள் தானாக உடைக்கப்படும் */
}
table th, table td {
    padding: 12px 15px; /* உள் இடைவெளியை (Padding) குறைத்தல் */
    /* மற்ற table பாணிகள்... */
}

/* மொபைல் லே-அவுட் */
@media (max-width: 768px) {
    .leader-message-section {
        flex-direction: column;
        text-align: center;
    }
    .leader-image-wrapper {
        order: -1;
    }
}
/* **10. நிகழ்வுகள் பக்க அமைப்பு (Left List & Right Gallery) - திருத்தப்பட்டது** */

.events-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

/* இடது பக்கம்: பட்டியல் */
.events-list-panel {
    flex: 1; /* 1 பங்கு அகலம் */
    min-width: 250px; /* சிக்கல் ஏற்படாத வகையில் min-width குறைக்கப்பட்டுள்ளது */
}

/* வலது பக்கம்: சுழல் காட்சியகம்/விவரம் */
.events-gallery-panel {
    flex: 2; /* 2 பங்கு அகலம் (அகலம் அதிகமாக இருக்கும்) */
    min-width: 350px; /* சிக்கல் ஏற்படாத வகையில் min-width குறைக்கப்பட்டுள்ளது */
    padding: 30px; 
    /* content-box பாணிகள் ஏற்கனவே இதில் பொருந்தும் */
}

/* சுழல் காட்சியகப் பாணி */
.carousel-container {
    padding-top: 10px;
}

.main-image-display {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.main-event-image {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.5s ease;
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 15px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* கட்டைவிரல் படங்களின் பாணி */
.thumbnail-grid {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap; /* சிறிய திரைகளுக்கு */
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 5px;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.thumbnail:hover, .thumbnail.active {
    opacity: 1;
    border-color: var(--accent-red); /* துணை நிறத்தில் சுட்டி காட்ட */
}

/* **11. காட்சியக சிறுபடப் பட்டியல் (Gallery Thumbnail List) - Grid Layout** */

.gallery-grid-simple {
    display: grid;
    /* டெஸ்க்டாப்பில் 3 நிரல்களாகக் காட்டுகிறோம். திரையின் அளவுக்கு ஏற்ப நிரல்களை மாற்றலாம். */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    padding: 20px 0;
}

/* வெள்ளைத் தோட்டைக் கொண்ட சிறுபடப் பிரிவு */
.list-thumbnail-item {
    width: 100%; 
    height: 200px; /* நிலையான உயரம் */
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    
    /* சிறுபடத்திற்கு வெள்ளைத் தோடு (White Border) */
    border: 5px solid #FFFFFF; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.list-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.4s ease;
}

/* ஹோவர் அனிமேஷன் */
.list-thumbnail-item:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}
.list-thumbnail-item:hover img {
    transform: scale(1.05); /* லேசான ஜூம் அனிமேஷன் */
}

/* **12. Modal Window (முன்னோட்டப் பெட்டி) பாணிகள்** */

.modal {
    display: none; /* ஆரம்பத்தில் மறைக்கப்பட்டிருக்கும் */
    position: fixed; /* நிலையான நிலையில் */
    z-index: 2000; /* மற்ற எல்லாவற்றிற்கும் மேலே இருக்க */
    padding-top: 50px; /* மேல் பகுதியில் இருந்து சற்று தள்ளியிருக்க */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; /* தேவைப்பட்டால் சுழல அனுமதிக்கும் */
    background-color: rgb(0,0,0); /* கருப்பு நிறம் */
    background-color: rgba(0,0,0,0.9); /* கருப்பு, சற்றே வெளிப்படையானது */
}

/* Modal உள்ளடக்கப் படம் */
.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px; /* அதிகபட்ச அகலம் */
    max-height: 90vh; /* திரையின் உயரத்திற்கு ஏற்ப */
    animation-name: zoom;
    animation-duration: 0.6s;
    border-radius: 8px;
}

/* மூடும் பொத்தான் */
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001; /* Modal-இன் மேல் இருக்க */
}

.close-btn:hover,
.close-btn:focus {
    color: var(--accent-red);
    text-decoration: none;
    cursor: pointer;
}

/* படம் திரையில் தோன்றுவதற்கான அனிமேஷன் */
@keyframes zoom {
    from {transform: scale(0)} 
    to {transform: scale(1)}
}
/* **13. தொடர்புப் பக்க அமைப்பு (Contact Layout)** */

.contact-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

/* இடது பக்கம்: படிவம் */
.contact-form-panel {
    flex: 2; /* படிவம் அகலமாக இருக்க 2 பங்கு அகலம் */
    min-width: 400px;
    padding: 30px;
}

/* வலது பக்கம்: முகவரி விவரங்கள் மற்றும் வரைபடம் */
.contact-info-panel {
    flex: 1; /* 1 பங்கு அகலம் */
    min-width: 300px;
}

/* படிவக் கூறுகள் */
.simple-form .form-group {
    margin-bottom: 20px;
}

.simple-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark-teal);
}

.simple-form input[type="text"],
.simple-form input[type="email"],
.simple-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box; /* Padding அகலத்தை பாதிக்காது */
    font-size: 1rem;
    font-family: 'Hind Madurai', sans-serif;
}

.simple-form textarea {
    resize: vertical; /* செங்குத்தாக மட்டுமே இழுக்க அனுமதிக்கிறது */
}

/* விவரங்கள் பட்டியல் பாணி */
.contact-info-panel .content-box {
    line-height: 1.6;
}
.contact-info-panel .info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.contact-info-panel .info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* வரைபடத்திற்கான Placeholder */
.map-placeholder #map-iframe-placeholder {
    height: 300px; /* வரைபடத்தின் உயரத்தை அமைக்க */
}

/* மொபைல் ரெஸ்பான்சிவ் அமைப்பு */
@media (max-width: 900px) {
    .contact-layout {
        flex-direction: column; /* செங்குத்தாக அடுக்குதல் */
    }
    .contact-form-panel, .contact-info-panel {
        flex: auto;
        min-width: 100%;
    }
}

/* மொபைல் திரைகளில் 2 நிரல்களாகக் காட்டுகிறோம் */
@media (max-width: 600px) {
    .gallery-grid-simple {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}


/* **7. அடிக்குறிப்பு (Footer)** */
footer {
    background-color: var(--primary-dark-teal);
    color: #fff;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    font-size: 1rem;
    border-top: 6px solid var(--accent-red);
}

/* **8. கீஃப்ரேம்ஸ் (Keyframes) - மேம்பட்ட அனிமேஷன்** */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(70px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}