/* 
    SKÅNE TAMIL SANGAM - GLOBAL STYLESHEET
    Refined Premium Design System
*/

:root {
    /* Refined Color Palette */
    --primary: #0056b3;
    --primary-dark: #003d80;
    --primary-light: #e6f0ff;
    --secondary: #ffc107;
    --secondary-light: #fff3cd;

    --background: #fdfaf6;
    --surface: #ffffff;
    --surface-alt: #f1f7ff;
    --surface-glass: rgba(255, 255, 255, 0.7);

    --foreground: #1c1c1e;
    --muted: #636366;
    --border: rgba(0, 0, 0, 0.1);
    --border-light: rgba(255, 255, 255, 0.3);

    /* Shadow System */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -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.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-main: 'League Spartan', system-ui, sans-serif;

    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --container-width: 1200px;
    --header-height: 130px;

    /* 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);
}

/* --- Base Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.7;
    overflow-x: hidden;
}

p {
    margin-bottom: 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
}

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

section {
    scroll-margin-top: var(--header-height);
}

/* --- Navigation --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    height: 90px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
}

.nav-brand img {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-normal);
}

.navbar.scrolled .nav-brand img {
    height: 70px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-en {
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.brand-ta {
    font-size: 0.8rem;
    color: var(--muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-weight: 700;
    font-size: 1rem;
    color: var(--foreground);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--foreground);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    line-height: 1;
}

.mobile-menu-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-normal);
    gap: 0.5rem;
    white-space: nowrap;
    font-family: var(--font-main);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.25);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
}

.btn-secondary:hover {
    background-color: #e6af06;
    transform: translateY(-2px);
}

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

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

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

.btn-ghost:hover {
    text-decoration: underline;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 12rem 0 10rem;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Hero Slider Styles */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 43, 92, 0.55), rgba(0, 43, 92, 0.75));
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.page-hero {
    padding: 6rem 0 1rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 3.5rem;
    color: var(--primary);
}

.page-hero p {
    font-size: 1.4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--muted);
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--primary-dark);
    color: white;
}

.stat-item {
    padding: 3rem 2rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.04);
    transform: rotate(15deg);
    pointer-events: none;
}

.cta-banner h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-banner p {
    font-size: 1.25rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* --- Section Styling --- */
.section {
    padding: 3rem 0;
}

.bg-warm {
    background-color: #fdfaf6;
}

.bg-surface {
    background-color: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--primary);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0.5rem auto 0;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    gap: 2.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 86, 179, 0.3);
}

.card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card-content {
    padding: 2.5rem;
    flex-grow: 1;
}

.card-tag {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--foreground);
    line-height: 1.2;
}

/* --- Team Cards --- */
.team-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.team-avatar {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
}

.team-info {
    padding: 1.75rem;
}

.team-name {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--foreground);
}

.team-role {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

/* --- Text Utilities --- */
.text-muted {
    color: var(--muted);
}

.text-primary {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

.shadow-premium {
    box-shadow: var(--shadow-premium);
}

/* --- Animation Classes --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Registration & Form Cards --- */
.registration-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 4rem;
    color: var(--foreground);
    max-width: 900px;
    margin: 4rem auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

.form-container {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--background);
    color: var(--foreground);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    background: white;
}

/* --- Alert/Status Messages --- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    margin-top: 1.5rem;
    text-align: center;
}

.alert-success {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.alert-error {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}

/* --- Registration Lookup UI --- */
.lookup-section {
    background: var(--surface-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
    border-left: 6px solid var(--primary);
}

.modify-alert {
    background: var(--secondary-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
    text-align: center;
    border: 1px solid var(--secondary);
    color: #856404;
    font-weight: 600;
}

.guest-counts {
    background: rgba(0, 0, 0, 0.02);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
}

.guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.required-star {
    color: #ff4d4f;
    margin-left: 4px;
    font-weight: 800;
}

/* --- Footer --- */
.footer {
    background: var(--foreground);
    padding: 5rem 0 2.5rem;
    border-top: 1px solid var(--border);
    color: rgba(255, 255, 255, 0.85);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.8;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

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

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- Mobile Menu --- */
#mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--surface);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 999;
}

#mobile-menu.active {
    display: flex;
}

/* --- Admin Layout --- */
.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.admin-hub-card {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition-normal);
}

.admin-hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.admin-hub-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.admin-hub-card .title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--surface);
        padding: 0.5rem 0;
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        gap: 0;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links li:last-child {
        border-bottom: none;
        padding: 0.75rem 1.5rem;
    }

    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
    }

    .nav-link::after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .navbar {
        height: 70px;
    }

    .cta-banner h2 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .page-hero h1 {
        font-size: 2.5rem;
    }

    .registration-card {
        padding: 2.5rem 1.5rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}