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

/* 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 {
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Desktop - Larger banner height */
@media (min-width: 992px) {
    .hero-section .carousel-item {
        min-height: 700px;
    }
    
    .hero-section .carousel-item img {
        min-height: 700px;
    }
    
    .hero-section .carousel-item[data-video-id] {
        min-height: 700px;
    }
    
    .youtube-video-wrapper,
    .youtube-video-wrapper .youtube-player,
    .youtube-video-wrapper iframe {
        min-height: 700px;
    }
}

@media (min-width: 1200px) {
    .hero-section .carousel-item {
        min-height: 800px;
    }
    
    .hero-section .carousel-item img {
        min-height: 800px;
    }
    
    .hero-section .carousel-item[data-video-id] {
        min-height: 800px;
    }
    
    .youtube-video-wrapper,
    .youtube-video-wrapper .youtube-player,
    .youtube-video-wrapper iframe {
        min-height: 800px;
    }
}

/* YouTube Video Wrapper */
.youtube-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.youtube-video-wrapper .youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.youtube-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
    display: block;
}

/* Block YouTube overlay UI elements (Watch later, Share buttons) */
.youtube-overlay-block {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    pointer-events: none; /* Allow clicks to pass through to video, but block UI overlays */
    background: transparent;
    cursor: default;
}

/* Ensure carousel items with videos have proper height */
.hero-section .carousel-item[data-video-id] {
    min-height: 600px;
}


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

/* Quick Links Section - What Are You Looking For? */
.quick-links-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.quick-link-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg) !important;
}

.quick-link-card .card-body {
    padding: 2rem 1.5rem;
}

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

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

.quick-link-card .card-title {
    color: var(--text-dark);
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.quick-link-card:hover .card-title {
    color: var(--primary-color);
}

/* Points Table Section */
.points-table-section {
    background: var(--white);
}

.points-table-section .table {
    margin-bottom: 0;
}

.points-table-section .table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
}

.points-table-section .table tbody tr {
    transition: background-color 0.2s ease;
}

.points-table-section .table tbody tr:hover {
    background-color: rgba(0, 130, 241, 0.05);
}

.points-table-section .table tbody td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.points-table-section .table tbody tr:first-child {
    background-color: rgba(255, 193, 7, 0.1);
    font-weight: 600;
}

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

/* Mobile-First Responsive Adjustments */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    body {
        font-size: 14px;
    }
    
    h1, .display-1, .display-2, .display-3, .display-4, .display-5 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    h2, .display-6 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4, h5 {
        font-size: 1.1rem !important;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero-section {
        margin-top: 56px; /* Account for fixed navbar */
    }
    
    .hero-section .carousel-item {
        min-height: 300px;
    }
    
    .hero-section .carousel-item img {
        min-height: 300px;
    }
    
    .hero-section .carousel-item[data-video-id] {
        min-height: 300px;
    }
    
    .youtube-video-wrapper,
    .youtube-video-wrapper .youtube-player,
    .youtube-video-wrapper iframe {
        min-height: 300px;
    }
    
    .carousel-caption {
        padding: 1rem !important;
        bottom: 5% !important;
        left: 5% !important;
        right: 5% !important;
    }
    
    .carousel-caption h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem;
    }
    
    /* Carousel Controls */
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0 !important;
    }
    
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .sponsor-card {
        padding: 1rem;
    }
    
    .sponsor-card img {
        height: 120px;
    }
    
    /* Quick Links */
    .quick-link-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    
    .quick-link-card i {
        font-size: 2rem !important;
    }
    
    /* Points Table */
    .points-table-section .table {
        font-size: 0.75rem;
    }
    
    .points-table-section .table thead th {
        font-size: 0.7rem;
        padding: 0.5rem 0.25rem;
    }
    
    .points-table-section .table tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-height: 44px; /* Touch-friendly */
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        min-height: 44px;
    }
    
    /* Statistics */
    .statistics-section .display-4 {
        font-size: 1.75rem !important;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Page Headers */
    .page-header {
        padding: 2rem 0 !important;
    }
    
    .page-header h1 {
        font-size: 1.75rem !important;
    }
    
    /* Welcome Section */
    .welcome-section h2,
    .heritage-section h2 {
        font-size: 1.5rem !important;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 2rem 0 !important;
    }
    
    .cta-section h2 {
        font-size: 1.5rem !important;
    }
    
    .cta-section .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Container Padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section .carousel-item {
        min-height: 350px;
    }
    
    .hero-section .carousel-item img,
    .youtube-video-wrapper,
    .youtube-video-wrapper iframe {
        min-height: 350px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .statistics-section .display-4 {
        font-size: 2.25rem;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section .carousel-item {
        min-height: 450px;
    }
    
    .hero-section .carousel-item img,
    .youtube-video-wrapper,
    .youtube-video-wrapper iframe {
        min-height: 450px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .sponsor-card img {
        height: 160px;
    }
    
    .statistics-section .display-4 {
        font-size: 2.5rem;
    }
}

/* Standard Mobile (768px and down) */
@media (max-width: 768px) {
    .hero-section .carousel-item {
        min-height: 400px;
    }
    
    .hero-section .carousel-item img {
        min-height: 400px;
        height: auto;
    }
    
    .hero-section .carousel-item[data-video-id] {
        min-height: 400px;
    }
    
    .youtube-video-wrapper {
        min-height: 400px;
        height: 100%;
    }
    
    .youtube-video-wrapper .youtube-player,
    .youtube-video-wrapper iframe {
        min-height: 400px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .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;
    }
    
    /* Table Responsive */
    .table-responsive {
        border: none;
    }
    
    .points-table-section .table {
        font-size: 0.85rem;
    }
    
    /* Navigation Improvements */
    .navbar-collapse {
        background: rgba(27, 20, 100, 0.98);
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .dropdown-menu {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.9);
        padding: 0.75rem 1rem;
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }
    
    /* Better spacing for mobile */
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Grid improvements */
    .row.g-4 {
        --bs-gutter-y: 1.5rem;
        --bs-gutter-x: 1rem;
    }
    
    /* Text alignment */
    .text-center-mobile {
        text-align: center;
    }
    
    /* Image optimization */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Form improvements */
    .form-label {
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
    
    /* Card improvements */
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Footer improvements */
    .footer h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer ul {
        margin-bottom: 1.5rem;
    }
}

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

/* Additional Mobile Optimizations */

/* Touch-friendly elements */
a, button, .btn, .nav-link, .dropdown-item {
    -webkit-tap-highlight-color: rgba(0, 130, 241, 0.2);
    touch-action: manipulation;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Better scrolling on mobile */
body {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Improve table readability on mobile */
@media (max-width: 768px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Stack table columns on very small screens */
    @media (max-width: 400px) {
        .points-table-section .table thead th,
        .points-table-section .table tbody td {
            font-size: 0.7rem;
            padding: 0.4rem 0.2rem;
        }
    }
}

/* Mobile navigation improvements */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-nav {
        padding-top: 0.5rem;
    }
    
    .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: rgba(255, 255, 255, 0.1);
        border: none;
        box-shadow: none;
    }
    
    .dropdown-item {
        padding-left: 2rem;
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Improve carousel on mobile */
@media (max-width: 768px) {
    .carousel-indicators {
        margin-bottom: 0.5rem;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.7;
    }
    
    .carousel-control-prev:focus,
    .carousel-control-next:focus {
        opacity: 1;
    }
}

/* Better form inputs on mobile */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    textarea {
        min-height: 120px;
    }
}

/* Improve card layouts on mobile */
@media (max-width: 768px) {
    .card-deck,
    .card-group {
        display: block;
    }
    
    .card-deck .card,
    .card-group .card {
        margin-bottom: 1rem;
    }
    
    /* Stack cards vertically on mobile */
    .row .col-md-4,
    .row .col-md-6,
    .row .col-lg-3,
    .row .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Better spacing for mobile sections */
@media (max-width: 768px) {
    .quick-links-section .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .quick-links-section .col-lg-3,
    .quick-links-section .col-md-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Improve breadcrumb on mobile */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    .breadcrumb-item {
        padding: 0.25rem 0.5rem;
    }
}

/* Better image handling */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .img-fluid {
        max-width: 100%;
        height: auto;
    }
}

/* Improve modal on mobile */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Better button groups on mobile */
@media (max-width: 768px) {
    .btn-group,
    .btn-group-vertical {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn,
    .btn-group-vertical .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        border-radius: 0.375rem !important;
    }
    
    .btn-group .btn:last-child,
    .btn-group-vertical .btn:last-child {
        margin-bottom: 0;
    }
}

/* Improve list spacing on mobile */
@media (max-width: 768px) {
    ul.list-unstyled li {
        margin-bottom: 0.5rem;
    }
    
    .footer ul.list-unstyled li {
        margin-bottom: 0.75rem;
    }
}

/* Better pagination on mobile */
@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Improve donation form on mobile */
@media (max-width: 768px) {
    .donation-section .card-body {
        padding: 1.5rem !important;
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group-text {
        min-width: 44px;
    }
    
    .d-flex.gap-2 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .d-flex.gap-2 .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
    }
}
