@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Martel+Sans:wght@300&display=swap');

/* CSS Custom Properties for consistency */
:root {
    --primary-dark: #343a40;
    --font-primary: 'Hind Siliguri', sans-serif;
    --mobile-breakpoint: 768px;
    --navbar-height: 66px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-primary);
}

/* Page wrapper for sticky footer */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content grows to fill available space */
.main-content {
    flex: 1 0 auto;
    padding-top: var(--navbar-height);
}

/* Special layout for centered content pages (404, reset password, etc.) */
.centered-content {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--navbar-height) 15px 30px;
    min-height: calc(100vh - var(--navbar-height) - 100px);
}

/* Footer styling */
footer {
    flex-shrink: 0;
    background-color: var(--primary-dark);
    color: white;
    font-family: var(--font-primary);
}

/* Adjust padding only if NOT on home.php */
body:not(.home) #formbody {
    padding-top: var(--navbar-height);
}

#previewcont {
    max-width: 700px;
    margin: 30px auto;
}


/* Slider Styles */
.c-item {
    height: 70vh;
    min-height: 600px;
}

.c-item picture {
    display: block;
    height: 100%;
}

.c-img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    width: 100%;
}

/* ===== MOBILE RESPONSIVE STYLES (768px and below) ===== */
@media (max-width: 768px) {
    /* Hero carousel adjustments */
    .c-item {
        height: 60vh;
        min-height: 500px;
    }

    /* Table and form adjustments */
    .table th,
    .table td {
        font-size: 15px;
        padding: 8px;
    }
    
    label {
        font-size: 15px;
    }
    
    .dropdown-menu {
        width: 100%;
    }

}

/* Forms: ensure labels are bold and required-star is shown */
label { font-weight: 700; font-size: 15px; }
label.star::after { content: "*"; color: red; margin-left: 3px; }

/* Counter Animation Styles */
.counter {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

/* Print styles removed project-wide. */

.note {
    font-size: 12px;
}

/* Team card hover effect */
.team-card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.team-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15) !important;
}

.team-card-hover img {
    transition: transform 0.3s ease;
}

.team-card-hover:hover img {
    transform: scale(1.05);
}

/* Teams carousel: show 1 item on small screens, 3 on md+ */
@media (max-width: 767.98px) {
    #teamsCarousel .carousel-item .col-team:not(:first-child) {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #teamsCarousel .carousel-item .col-team {
        display: block !important;
    }
}

/* Sponsors carousel: 1 on small, 3 on md+ */
@media (max-width: 767.98px) {
    #sponsorsCarousel .carousel-item .col-sponsor:not(:first-child) {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #sponsorsCarousel .carousel-item .col-sponsor {
        display: block !important;
    }
}

/* Make carousel arrows grey for better visibility on light backgrounds */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.25rem;
    height: 2.25rem;
    background-size: 100% 100%;
    filter: none !important; /* defeat Bootstrap filters that keep icons white */
}

.carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") !important;
}

.carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

/* Sponsor logos: adjust height here (keeps aspect ratio) */
.sponsor-logo {
    height: 100px; /* tweak: 70–100px are common */
    width: auto;
    max-width: 100%;
}

/* Make teams and sponsors carousel arrows grey via Bootstrap CSS variables */
#teamsCarousel,
#sponsorsCarousel {
    --bs-carousel-control-prev-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
    --bs-carousel-control-next-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%236c757d' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Hard override to ensure grey icons on Teams & Sponsors only */
#teamsCarousel .carousel-control-prev-icon,
#sponsorsCarousel .carousel-control-prev-icon {
    background-image: var(--bs-carousel-control-prev-icon-bg) !important;
    filter: none !important;
}

#teamsCarousel .carousel-control-next-icon,
#sponsorsCarousel .carousel-control-next-icon {
    background-image: var(--bs-carousel-control-next-icon-bg) !important;
    filter: none !important;
}

/* About Tournament Section - Trophy Image Styles */
.about-trophy-img {
    z-index: 1;
    position: relative;
}

.about-trophy-bg-circle {
    width: 150px;
    height: 150px;
    bottom: -20px;
    left: -20px;
    z-index: 0;
    opacity: 0.2;
}

/* Gallery Image Styles */
.gallery-img-home {
    width: 100%;
    height: 200px; /* Fixed height for all gallery images */
    object-fit: cover; /* This ensures images cover the area without distortion */
}

/* Make gallery images responsive on mobile */
@media (max-width: var(--mobile-breakpoint)) {
    .gallery-img-home {
        height: 180px;
    }
}

/* Rules page overlay background styles */
.rules-overlay-bg {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.rules-overlay-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23000" opacity="0.08"/><circle cx="75" cy="75" r="1" fill="%23000" opacity="0.06"/><circle cx="50" cy="10" r="0.5" fill="%23000" opacity="0.07"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    background-color: rgba(0, 0, 0, 0.2);
    opacity: 0.5;
    z-index: 1;
}

.rules-overlay-content {
    position: relative;
    z-index: 2;
}

.rules-title {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    font-weight: bold;
    margin-bottom: 0;
}

.rules-subtitle {
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Broadcast Partner Section Styles */
.broadcast-logo {
    height: 110px; /* Adjust size as needed */
    width: auto;
    max-width: 100%;
    transition: all 0.3s ease;
    filter: grayscale(20%);
}

.broadcast-logo:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Responsive adjustments for broadcast section */
@media (max-width: 768px) {
    .broadcast-logo {
        height: 100px;
    }
}