:root {
    --brand-red: #D32F2F;
    --brand-red-dark: #B71C1C;
    --brand-gold: #FFC107;
    --text-dark: #212529;
    --text-muted: #6C757D;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --footer-dark: #1F2937;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

a {
    color: var(--brand-red);
    text-decoration: none;
}

a:hover {
    color: var(--brand-red-dark);
}

/* Top bar */
.top-bar {
    font-size: 0.85rem;
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.ticker {
    display: inline-block;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-block;
    padding-right: 4rem;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.top-bar .social-link {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    margin-right: 0.35rem;
}

.min-width-0 {
    min-width: 0;
}

/* Header */
.main-header {
    z-index: 1030;
}

.navbar-brand .brand-title {
    font-size: 1.5rem;
    color: var(--brand-red);
    letter-spacing: 0.8px;
}

.navbar-brand .brand-subtitle {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-top: -0.15rem;
}

.navbar-brand .brand-text {
    line-height: 1.2;
}

.navbar-brand img {
    object-fit: contain;
    transition: width 0.25s ease, height 0.25s ease;
}

.main-header.scrolled .navbar-brand img {
    width: 55px;
    height: 55px;
}

.main-header.scrolled .navbar {
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
    transition: padding 0.25s ease;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.6rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-red) !important;
}

.dropdown-menu {
    border: none;
    border-top: 3px solid var(--brand-red);
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    font-weight: 500;
    padding: 0.5rem 1.25rem;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--bg-light);
    color: var(--brand-red);
}

.btn-brand {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-brand:hover {
    background-color: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
    color: var(--white);
}

.btn-outline-brand {
    border-color: var(--brand-red);
    color: var(--brand-red);
    font-weight: 600;
}

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

/* Hero */
.hero-section {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    background-color: var(--footer-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(31,41,55,0.92) 0%, rgba(31,41,55,0.7) 60%, rgba(31,41,55,0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-badge {
    display: inline-block;
    background: var(--brand-red);
    color: var(--white);
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Section titles */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2.5rem;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--brand-red);
    border-radius: 2px;
}

.section-title.left::after {
    left: 0;
    transform: none;
}

.section-subtitle {
    color: var(--text-muted);
    margin-top: -2rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border-radius: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.card-img-top {
    object-fit: cover;
    height: 220px;
    width: 100%;
}

.card-title {
    font-weight: 700;
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-red);
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* News list */
.news-list .news-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 0;
}

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

.news-date {
    font-size: 0.8rem;
    color: var(--brand-red);
    font-weight: 600;
    text-transform: uppercase;
}

/* Event cards */
.event-card {
    border-left: 4px solid var(--brand-red);
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.event-date {
    font-size: 0.85rem;
    color: var(--brand-red);
    font-weight: 700;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.event-venue {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tables */
.table-rsss thead {
    background: var(--brand-red);
    color: var(--white);
}

.table-rsss th {
    font-weight: 600;
    border: none;
}

.table-rsss td, .table-rsss th {
    padding: 1rem;
    vertical-align: middle;
}

.table-rsss tbody tr:nth-child(even) {
    background: var(--bg-light);
}

/* Athlete / committee cards */
.person-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    height: 100%;
}

.person-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--bg-light);
}

.person-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.person-designation {
    color: var(--brand-red);
    font-weight: 600;
    font-size: 0.95rem;
}

.watermark-logo {
    opacity: 0.35;
    filter: grayscale(40%);
}

/* Contact */
.contact-info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.contact-info-card h5 {
    color: var(--brand-red);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--brand-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-form-card {
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-form-card .form-control:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.15);
}

.contact-map-card iframe {
    display: block;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Footer */
.site-footer {
    background-color: var(--footer-dark) !important;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--brand-red);
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    transition: color 0.2s, padding 0.2s;
    display: inline-block;
}

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

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s, padding 0.2s;
    display: inline-block;
}

.quick-links a:hover {
    color: var(--brand-red);
    padding-left: 4px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.social-link:hover {
    background: var(--brand-red);
    color: var(--white);
}

/* Page banner */
.page-banner {
    background: linear-gradient(135deg, var(--footer-dark) 0%, var(--brand-red-dark) 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-banner h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-banner p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--bg-light);
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--brand-red);
}

/* Message pages */
.message-signature {
    border-top: 2px solid var(--brand-red);
    padding-top: 1rem;
    margin-top: 2rem;
}

/* Affiliation strip */
.affiliation-strip {
    background: var(--white);
    padding: 2.5rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.affiliation-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.affiliation-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Map placeholder */
.map-embed {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 0.75rem;
}

/* Utility */
.bg-light-gray {
    background-color: var(--bg-light);
}

.text-brand {
    color: var(--brand-red) !important;
}

.bg-brand {
    background-color: var(--brand-red) !important;
}

.border-brand {
    border-color: var(--brand-red) !important;
}

/* Admin - kept minimal here */
.admin-body {
    background-color: var(--bg-light);
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .ticker-wrap {
        max-width: 100%;
    }
    .navbar-collapse {
        padding-top: 1rem;
    }
    .dropdown-menu {
        border: none;
        padding-left: 1rem;
        box-shadow: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 480px;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .stat-number {
        font-size: 2rem;
    }
    .page-banner h1 {
        font-size: 1.75rem;
    }
}

/* Championship cards */
.championship-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    background: var(--white);
}

.championship-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
}

.championship-card .card-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.championship-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.championship-card:hover .card-img-top {
    transform: scale(1.07);
}

.championship-card .date-badge {
    display: inline-block;
    background: var(--brand-red);
    color: var(--white);
    padding: 0.35rem 0.85rem;
    padding-left: 1.25rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.championship-card .card-body {
    padding: 1.25rem;
}

.championship-card .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.championship-card .event-venue {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.championship-card .btn-outline-brand {
    border-radius: 2rem;
    padding: 0.35rem 1rem;
}

/* Pagination */
.pagination .page-link {
    color: var(--brand-red);
    border-color: var(--brand-red);
}
.pagination .page-link:hover,
.pagination .page-item.active .page-link {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
}
.pagination .page-item.active .page-link:hover {
    background-color: var(--brand-red-dark);
    border-color: var(--brand-red-dark);
}

/* Past Championships one-card-at-a-time slider */
.past-slider {
    position: relative;
    padding: 0 2.5rem;
}
.past-slider-track {
    transition: transform 0.5s ease;
    will-change: transform;
}
.past-slider-item {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 0.5rem;
}
.past-slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}
.past-slider-control.prev { left: 0; }
.past-slider-control.next { right: 0; }
@media (min-width: 768px) {
    .past-slider {
        padding: 0 3rem;
    }
    .past-slider-item {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
    .past-slider-control {
        width: 2.5rem;
        height: 2.5rem;
    }
}
