/* ============================================
   DUEBALL FEDERATION OF INDIA
   Custom Styles (Bootstrap 5 Supplement)
   ============================================ */

:root {
    --dfi-primary: #039be5;
    --dfi-primary-light: #4fc3f7;
    --dfi-primary-dark: #0288d1;
    --dfi-primary-gradient: linear-gradient(
        135deg,
        #4fc3f7 0%,
        #039be5 50%,
        #0277bd 100%
    );
    --dfi-secondary: #198754;
    --dfi-warning: #ffc107;
    --dfi-dark: #212529;
    --dfi-darker: #1a1d20;
    --dfi-accent: #fd7e14;

    /* Bootstrap overrides */
    --bs-primary: #0288d1;
    --bs-primary-rgb: 2, 136, 209;
    --bs-link-color: #0277bd;
    --bs-link-hover-color: #01579b;
    --bs-link-color-rgb: 2, 119, 189;
    --bs-link-hover-color-rgb: 1, 87, 155;
}

body {
    font-family: "Open Sans", sans-serif;
    color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", sans-serif;
}

/* ============ BOOTSTRAP PRIMARY GRADIENT OVERRIDES ============ */
.bg-primary,
.navbar.bg-primary {
    background: var(--dfi-primary-gradient) !important;
}
.badge.bg-primary {
    background: var(--dfi-primary-gradient) !important;
}
.text-bg-primary {
    background: var(--dfi-primary-gradient) !important;
}
.btn-primary {
    background: var(--dfi-primary-gradient);
    border-color: var(--dfi-primary-dark);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 136, 209, 0.35);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(135deg, #039be5 0%, #0288d1 50%, #01579b 100%);
    border-color: var(--dfi-primary-dark);
    color: #fff;
}
.btn-primary:disabled,
.btn-primary.disabled {
    background: #81d4fa;
    border-color: #81d4fa;
}
.btn-outline-primary {
    color: var(--dfi-primary-dark);
    border-color: var(--dfi-primary-dark);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: var(--dfi-primary-gradient);
    border-color: var(--dfi-primary-dark);
    color: #fff;
}
.btn-check:checked + .btn-outline-primary {
    background: var(--dfi-primary-gradient);
    border-color: var(--dfi-primary-dark);
    color: #fff;
}
.text-primary {
    color: var(--dfi-primary-dark) !important;
}
.link-primary {
    color: var(--bs-link-color) !important;
}
.link-primary:hover {
    color: var(--bs-link-hover-color) !important;
}
.border-primary {
    border-color: var(--dfi-primary-dark) !important;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--dfi-primary);
    box-shadow: 0 0 0 0.2rem rgba(2, 136, 209, 0.25);
}
.form-check-input:checked {
    background-color: var(--dfi-primary-dark);
    border-color: var(--dfi-primary-dark);
}
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--dfi-primary-dark);
}
.page-link {
    color: var(--bs-link-color);
}
.page-link:hover {
    color: var(--bs-link-hover-color);
}
.page-item.active .page-link {
    background-color: var(--dfi-primary-dark);
    border-color: var(--dfi-primary-dark);
}
.pagination .page-item.active .page-link {
    background: var(--dfi-primary-gradient);
    border-color: var(--dfi-primary-dark);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--dfi-primary-dark);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(2, 136, 209, 0.25);
}
a.btn-primary,
a.bg-primary {
    color: #fff;
}

/* ============ TOP BAR ============ */
.dfi-topbar {
    font-size: 0.85rem;
}
.dfi-topbar a:hover {
    color: var(--dfi-warning) !important;
}

/* ============ NAVBAR ============ */
.navbar {
    padding: 0.6rem 0;
}
.navbar-brand {
    font-family: "Poppins", sans-serif;
    font-size: 1.1rem;
}
.navbar .nav-link {
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--dfi-warning) !important;
}

/* ============ HERO SECTION ============ */
.dfi-hero {
    background: var(--dfi-primary-gradient);
    background-image: url("../img/banner2.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}
.dfi-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.dfi-hero .container {
    position: relative;
    z-index: 1;
}
.dfi-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}
.dfi-hero .lead {
    font-size: 1.15rem;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

/* ============ PAGE BANNER ============ */
.dfi-page-banner {
    background: var(--dfi-primary-gradient);
    color: #fff;
    padding: 4rem 0 2.5rem;
}
.dfi-page-banner h1 {
    font-weight: 700;
    font-size: 2.2rem;
}
.dfi-page-banner .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}
.dfi-page-banner .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.dfi-page-banner .breadcrumb-item.active {
    color: #fff;
}
.dfi-page-banner .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ============ SECTION STYLES ============ */
.dfi-section {
    padding: 4rem 0;
}
.dfi-section-alt {
    background-color: #f8f9fa;
}
.dfi-section-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.dfi-section-subtitle {
    color: #6c757d;
    font-size: 1.05rem;
}
.dfi-accent-bar {
    border-radius: 2px;
    margin: 0.75rem 0 1.5rem;
}
.dfi-accent-bar.center {
    margin-left: auto;
    margin-right: auto;
}

/* ============ STAT COUNTER ============ */
.dfi-stats {
    background: var(--dfi-primary-gradient);
    color: #fff;
    padding: 3.5rem 0;
}
.dfi-stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dfi-warning);
}
.dfi-stat-item p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0;
}

/* ============ CARDS ============ */
.dfi-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
    overflow: hidden;
}
.dfi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
.dfi-card-img-top {
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}
.dfi-card .card-title {
    font-weight: 600;
}
.dfi-card .badge {
    font-size: 0.72rem;
    font-weight: 500;
}

/* Event Card Date Badge */
.dfi-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--dfi-warning);
    color: var(--dfi-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
}

/* ============ PLAYER / OFFICIAL CARDS ============ */
.dfi-player-card {
    text-align: center;
    padding: 1.5rem;
}
.dfi-player-card .player-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--dfi-primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
}
.dfi-player-card h5 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.dfi-player-card .text-muted {
    font-size: 0.9rem;
}

/* ============ TABLE STYLES ============ */
.dfi-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}
.dfi-table thead {
    background: var(--dfi-primary-gradient);
    color: #fff;
}
.dfi-table thead th {
    border: none;
    font-weight: 600;
    padding: 0.85rem 1rem;
}
.dfi-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}
.dfi-table tbody tr:hover {
    background-color: rgba(2, 136, 209, 0.08);
}

/* ============ GALLERY ============ */
.dfi-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}
.dfi-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s;
}
.dfi-gallery-item:hover img {
    transform: scale(1.08);
}
.dfi-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.dfi-gallery-item:hover .dfi-gallery-overlay {
    opacity: 1;
}

/* ============ DOWNLOAD CARDS ============ */
.dfi-download-card {
    border-left: 4px solid var(--dfi-primary);
    transition: background 0.2s;
}
.dfi-download-card:hover {
    background-color: rgba(2, 136, 209, 0.08);
}

/* ============ CTA SECTION ============ */
.dfi-cta {
    background: var(--dfi-primary-gradient);
    color: #fff;
    padding: 4rem 0;
}
.dfi-cta h2 {
    font-weight: 700;
}

/* ============ VALUE CARDS ============ */
.dfi-value-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
}
.dfi-value-card:hover {
    transform: translateY(-3px);
}
.dfi-value-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(2, 136, 209, 0.15);
    color: var(--dfi-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* ============ FORM STYLES ============ */
.dfi-form .form-control:focus,
.dfi-form .form-select:focus {
    border-color: var(--dfi-primary);
    box-shadow: 0 0 0 0.2rem rgba(2, 136, 209, 0.25);
}

/* ============ CONTACT INFO ============ */
.dfi-contact-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
}
.dfi-contact-info .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(2, 136, 209, 0.15);
    color: var(--dfi-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============ NEWS CARD ============ */
.dfi-news-card .card-img-top {
    height: 220px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

/* ============ FILTER BUTTONS ============ */
.dfi-filter-btn {
    border-radius: 20px;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.dfi-filter-btn.active,
.dfi-filter-btn:hover {
    background: var(--dfi-primary-gradient);
    color: #fff;
    border-color: var(--dfi-primary-dark);
}

/* ============ MESSAGE BLOCK ============ */
.dfi-message-block {
    position: relative;
    padding-left: 1.5rem;
    border-left: 4px solid var(--dfi-warning);
}
.dfi-message-block .signature {
    font-style: italic;
    font-weight: 600;
    color: var(--dfi-primary);
    margin-top: 1.5rem;
}

/* ============ COMMITTEE CARD ============ */
.dfi-committee-card {
    text-align: center;
    padding: 1.5rem;
}
.dfi-committee-card .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--dfi-primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* ============ BACK TO TOP ============ */
.dfi-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--dfi-primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.dfi-back-to-top.show {
    opacity: 1;
    visibility: visible;
}
.dfi-back-to-top:hover {
    background: var(--dfi-primary-dark);
    transform: translateY(-3px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
    .dfi-hero h1 {
        font-size: 2rem;
    }
    .dfi-hero {
        padding: 4rem 0 3rem;
    }
    .dfi-page-banner {
        padding: 3rem 0 2rem;
    }
    .dfi-page-banner h1 {
        font-size: 1.8rem;
    }
    .dfi-stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .dfi-hero {
        background-attachment: scroll;
        padding: 5rem 0 4rem;
    }
    .dfi-hero h1 {
        font-size: 1.6rem;
    }
    .dfi-hero .lead {
        font-size: 1rem;
    }
    .dfi-stat-item h3 {
        font-size: 1.8rem;
    }
}
