/* ========================================
   CSS Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-color: #0ea5e9;
    --primary-dark: #0369a1;
    --primary-light: #7dd3fc;

    /* Accent Colors */
    --accent-color: #f59e0b;
    --accent-dark: #b45309;
    --accent-light: #fde68a;

    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray: #64748b;
    --dark-gray: #334155;
    --black: #0f172a;

    /* Gradient Colors */
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
    --gradient-accent: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --gradient-gold: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-tamil: 'Anek Tamil', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

body[lang="ta"],
body[lang="ta"] * {
    font-family: var(--font-tamil);
    line-height: 1.85;
    /* Tamil scripts need more breathing room vertically */
    letter-spacing: 0.2px;
    /* Slight tracking for legibility */
}

/* Ensure headings have proper weight and tracking in Tamil */
body[lang="ta"] h1,
body[lang="ta"] h2,
body[lang="ta"] h3,
body[lang="ta"] h4,
body[lang="ta"] h5,
body[lang="ta"] h6 {
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

body[lang="ta"] .lead,
body[lang="ta"] p {
    font-weight: 400;
    margin-bottom: 1.25rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: none !important;
}

.top-bar {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 50px;
    opacity: 1;
    overflow: hidden;
}

.header.scrolled .top-bar {
    max-height: 0;
    padding: 0;
    opacity: 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.contact-info {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.contact-info a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info a:hover {
    opacity: 0.8;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-toggle a {
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.language-toggle a.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.language-toggle a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar {
    padding: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    box-shadow: 0 10px 40px -10px rgba(14, 165, 233, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    gap: 0.5rem;
    max-width: 100%;
    /* overflow: hidden; removed for mobile menu */
}

.header.scrolled .navbar-content {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.3);
    border-color: rgba(255, 255, 255, 0.9);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    max-width: 100%;
}

.logo img {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(14, 165, 233, 0.15));
    transition: var(--transition-normal);
}

.logo:hover img {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--dark-gray);
    font-weight: 700;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    overflow: hidden;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-dark);
    background: rgba(14, 165, 233, 0.08);
    /* Blue highlight */
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1438032005730-c779502fac39?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
    overflow: hidden;
    padding: 180px 0 var(--spacing-xxl);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, rgba(2, 132, 199, 0.9), rgba(15, 23, 42, 0.8));
    mix-blend-mode: multiply;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cg fill=\"%23ffffff\" fill-opacity=\"0.05\" fill-rule=\"evenodd\"%3E%3Ccircle cx=\"3\" cy=\"3\" r=\"3\"/%3E%3Ccircle cx=\"13\" cy=\"13\" r=\"3\"/%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 3.5rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(3, 105, 161, 0.4);
    background: linear-gradient(135deg, #ffffff, #e0f2fe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero .cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    transition: all 0.3s ease;
    border-radius: 50px;
    opacity: 0;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.2);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Section Styles
   ======================================== */
.section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 600px;
    margin: var(--spacing-md) auto 0;
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.15);
    border-color: transparent;
}

.card:hover::before {
    opacity: 0.03;
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-icon {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.3);
}

.card h3 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-dark);
}

.card p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.service-times li,
.contact-details li,
.quick-links li {
    margin-bottom: var(--spacing-xs);
    color: rgba(255, 255, 255, 0.8);
}

.service-times li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: var(--spacing-sm);
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.contact-details i {
    color: var(--accent-color);
    margin-top: 0.25rem;
}

.quick-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.quick-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 15px);
        left: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.8);
        display: none !important;
        z-index: 1001;
        /* Ensure on top over hero */
    }

    .nav-menu.active {
        display: flex !important;
    }

    .navbar-content {
        padding: 0.5rem 0.75rem;
    }

    .logo a {
        font-size: 1.1rem;
        gap: 0.4rem;
    }

    .logo img {
        height: 38px;
    }

    .live-btn {
        padding: 0.4rem 0.6rem !important;
    }

    .live-text {
        display: none !important;
    }

    .nav-right {
        gap: 0.5rem !important;
    }

    .mobile-menu-toggle {
        font-size: 1.3rem;
        margin-left: 0.2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .logo-text {
        white-space: normal;
        line-height: 1.1;
        font-size: 0.8rem;
        max-width: 100px;
        display: inline-block;
    }

    .logo img {
        height: 28px;
    }

    .navbar-content {
        padding: 0.35rem 0.5rem;
        gap: 0.2rem;
    }

    .nav-right {
        gap: 0.25rem !important;
    }

    .mobile-menu-toggle {
        font-size: 1.2rem;
        padding: 0 0.2rem;
    }

    .live-btn {
        padding: 0.3rem 0.5rem !important;
    }

    .top-bar-content {
        justify-content: center;
        gap: 0.2rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}