/* Silambam Premier League - Custom Styles */

/* CSS Variables for Theming */
:root {
    --primary-color: #1b1464;
    --primary-light: #0082F1;
    --primary-accent: #00c8a1;
    --secondary-color: #f8f9fa;
    --text-dark: #212529;
    --text-light: #6c757d;
    --gold-accent: #ffc107;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 76px; /* Account for fixed navbar */
}

/* Navbar Customization */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--gold-accent) !important;
}

.navbar-nav .nav-link.active {
    color: var(--gold-accent) !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gold-accent);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
}

/* Hero Section / Carousel */
.hero-section {
    margin-top: 0;
}

.hero-section .carousel-item img {
    width: 100%;
    height: auto;
    min-height: 350px;
    max-height: 550px;
    object-fit: cover;
    object-position: center;
}

/* Sponsor card layout */
.sponsor-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sponsor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.sponsor-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.sponsor-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.carousel-caption h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 1rem;
}

/* Sponsorship Slider */
.sponsorship-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.sponsor-logo {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.sponsor-logo-small {
    max-height: 150px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Players Section */
.players-section {
    background: var(--white);
}

.player-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.player-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.player-card:hover img {
    transform: scale(1.1);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    transition: transform 0.3s ease;
}

.feature-card:hover i {
    transform: scale(1.2);
}

/* Breadcrumb */
.breadcrumb-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-light);
}

/* Cards */
.card {
    border-radius: 10px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Gallery Cards */
.gallery-card {
    overflow: hidden;
}

.gallery-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

/* News Cards */
.news-card {
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center top;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(0, 130, 241, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--gold-accent) !important;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
}

/* Timeline */
.timeline-item {
    position: relative;
}

.step-number {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Achievement Numbers */
.achievement-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0, 130, 241, 0.1);
}

/* Map Container */
.ratio {
    border-radius: 10px;
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section .carousel-item img {
        min-height: 200px;
        max-height: 300px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    body {
        padding-top: 56px;
    }

    .sponsor-card img {
        height: 140px;
    }

    .player-card img {
        aspect-ratio: 1 / 1;
    }

    .news-card img {
        aspect-ratio: 16 / 9;
    }

    .gallery-card img {
        aspect-ratio: 4 / 3;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Admin Section */
.admin-section {
    border-top: 3px solid var(--primary-color);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* About Hero Section */
.about-hero img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

/* Member Photo Placeholder */
.member-photo {
    font-size: 3rem;
}

/* Badge Customization */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--primary-light);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-light);
}

.pagination .page-link:hover {
    background-color: var(--primary-light);
    color: var(--white);
    border-color: var(--primary-light);
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.welcome-section img,
.heritage-section img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
}

/* Statistics Section */
.statistics-section {
    background: var(--white);
}

.statistics-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.statistics-section .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.statistics-section .display-4 {
    font-size: 3rem;
    font-weight: 700;
}

/* Latest News Section */
.latest-news-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

/* Upcoming Events Section */
.upcoming-events-section {
    background: var(--white);
}

.upcoming-events-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upcoming-events-section .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.upcoming-events-section .card img {
    min-height: 200px;
    object-fit: cover;
    object-position: center;
}

/* Heritage Section */
.heritage-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Partner/Sponsor images in gallery cards - show full logo without cropping */
.gallery-card img[src*="partners"],
.gallery-card img[src*="sponsers"] {
    object-fit: contain !important;
    background: #f8f9fa;
    padding: 1rem;
    aspect-ratio: 4 / 3;
}

/* Contact page sponsor cards */
.sponsors-section .card {
    background: #fff;
    border-radius: 12px;
}

.sponsors-section .card img {
    padding: 1rem;
    max-height: 180px;
    object-fit: contain;
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .statistics-section .display-4 {
        font-size: 2rem;
    }
    
    .cta-section .btn-lg {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .welcome-section h2,
    .heritage-section h2 {
        font-size: 2rem;
    }
}
