/* ============================================
   RESPONSIVE MEDIA QUERIES FOR BETCONTROL
   Fixed for Custom Navbar Structure
   ============================================ */

/* ============================================
   NAVBAR MOBILE TOGGLE STYLES
   ============================================ */
.navbar-toggle {
    display: none;
    width: 30px;
    height: 25px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.navbar-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #1e3a5f;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transition: .25s ease-in-out;
}

.navbar-toggle span:nth-child(1) {
    top: 0px;
}

.navbar-toggle span:nth-child(2) {
    top: 10px;
}

.navbar-toggle span:nth-child(3) {
    top: 20px;
}

.navbar-toggle.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.navbar-toggle.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* ============================================
   HEADER & NAVBAR BASE STYLES
   ============================================ */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-sticky {
    width: 100%;
}

/* ============================================
   LARGE DEVICES (1200px and up)
   ============================================ */
@media (min-width: 1200px) {
    .container-fluid {
        padding-left: 5%;
        padding-right: 5%;
    }
}

/* ============================================
   MEDIUM DEVICES (992px to 1199px)
   ============================================ */
@media (max-width: 1199px) {
    .hero-section .section-title h1 {
        font-size: 3rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   TABLET & MOBILE (991px and below)
   ============================================ */
@media (max-width: 991px) {
    /* Show mobile toggle */
    .navbar-toggle {
        display: block;
    }

    /* Hide desktop menu by default */
    .main-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        padding-top: 80px;
        z-index: 999;
    }

    .main-menu.active {
        right: 0;
    }

    /* Menu overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    .menu-overlay.active {
        display: block;
    }

    /* Menu items */
    .nav-menu-wrapper {
        width: 100%;
        padding: 0 1.5rem;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item .nav-link {
        padding: 1rem 0;
        display: block;
        color: #1e3a5f;
        font-weight: 500;
    }

    /* Submenu styles */
    .nav-item.submenu > ul {
        display: none;
        padding-left: 1rem;
        background: #f8f9fa;
        margin-top: 0.5rem;
        border-radius: 8px;
    }

    .nav-item.submenu.active > ul {
        display: block;
    }

    .nav-item.submenu > .nav-link::after {
        content: '\f107';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        float: right;
        transition: transform 0.3s;
    }

    .nav-item.submenu.active > .nav-link::after {
        transform: rotate(180deg);
    }

    /* Header buttons */
    .header-btn {
        flex-direction: column !important;
        width: 100%;
        padding: 1rem 1.5rem;
        gap: 0.75rem !important;
    }

    .header-btn1,
    .header-btn2 {
        width: 100% !important;
        margin: 0 !important;
    }

    /* Hero section */
    .hero-section {
        margin-top: 80px !important;
        padding: 2rem 0;
    }

    .hero-section .section-title h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-section .section-title p {
        font-size: 0.95rem;
    }

    .hero-section .section-title p br {
        display: none;
    }

    /* Hero buttons */
    .hero-section .d-flex.gap-4 {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 0 1rem;
    }

    .hero-section .btn1,
    .hero-section .btn2 {
        width: 100%;
        white-space: normal;
    }

    /* Stats section */
    .hero-stats .d-flex {
        flex-wrap: wrap;
        gap: 2rem !important;
        padding: 0 1rem;
    }

    .hero-stats .d-flex > div {
        flex: 0 0 calc(50% - 1rem);
        text-align: center;
    }

    /* For section */
    .for-section {
        padding: 3rem 0;
    }

    .for-section .section-title {
        font-size: 2rem;
    }

    /* Feature cards */
    .feature-card {
        margin-bottom: 1.5rem;
    }

    /* Testimonial */
    .testimonial-section {
        padding: 3rem 0;
    }

    .testimonial-text {
        font-size: 1.2rem;
    }

    /* CTA section */
    .cta-section {
        padding: 3rem 0;
    }

    .cta-title {
        font-size: 2rem;
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .footer .col-lg-4,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }

    .footer-brand {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* ============================================
   MOBILE DEVICES (767px and below)
   ============================================ */
@media (max-width: 767px) {
    /* Navbar */
    .navbar-brand img {
        width: 120px;
        height: auto;
    }

    .main-menu {
        width: 250px;
    }

    /* Hero section */
    .hero-section {
        margin-top: 70px !important;
        padding: 1.5rem 0;
    }

    .hero-header {
        margin-bottom: 1.5rem !important;
    }

    .hero-icon i {
        font-size: 1rem;
    }

    .hero-header .text-muted {
        font-size: 0.85rem;
    }

    .hero-section .section-title h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-section .section-title h1 span {
        display: inline;
    }

    .hero-section .section-title p {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    /* Hero buttons */
    .hero-section .btn1,
    .hero-section .btn2 {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Stats section */
    .hero-stats {
        padding: 2rem 0;
    }

    .hero-stats .d-flex {
        gap: 1.5rem !important;
    }

    .hero-stats .d-flex > div {
        flex: 0 0 calc(50% - 0.75rem);
    }

    .hero-stats img {
        width: 40px;
        height: 40px;
    }

    .hero-stats span {
        font-size: 1.5rem;
    }

    .hero-stats .d-flex > div > div:last-child {
        font-size: 0.85rem;
    }

    /* For section */
    .for-section {
        padding: 2.5rem 0;
    }

    .section-label {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .for-option {
        padding: 1rem;
    }

    .for-option-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .bettor-card {
        padding: 1.5rem;
    }

    /* Features section */
    .features-section {
        padding: 2.5rem 0;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .feature-text {
        font-size: 0.85rem;
    }

    /* Testimonial */
    .testimonial-section {
        padding: 2.5rem 0;
    }

    .stars {
        font-size: 1.2rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .author-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* How it works */
    .how-it-works-section {
        padding: 2.5rem 0;
    }

    .step-card {
        margin-bottom: 2rem;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-text {
        font-size: 0.85rem;
    }

    /* CTA section */
    .cta-section {
        padding: 2.5rem 0;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-text {
        font-size: 0.9rem;
    }

    .btn-cta-green {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-brand img {
        width: 130px;
    }

    .footer-text {
        font-size: 0.85rem;
    }

    .footer-title {
        font-size: 1rem;
        margin-top: 1.5rem;
    }

    .footer-links {
        font-size: 0.85rem;
    }

    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.5rem;
        margin-top: 2rem;
    }
}

/* ============================================
   SMALL MOBILE (575px and below)
   ============================================ */
@media (max-width: 575px) {
    /* Container padding */
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Navbar */
    .navbar-brand img {
        width: 110px;
    }

    .main-menu {
        width: 220px;
    }

    /* Hero section */
    .hero-section {
        margin-top: 65px !important;
        padding: 1.5rem 0;
    }

    .hero-section .section-title h1 {
        font-size: 1.65rem;
        line-height: 1.3;
    }

    .hero-section .section-title h1 br {
        display: none;
    }

    .hero-section .section-title p {
        font-size: 0.85rem;
    }

    /* Hero buttons */
    .hero-section .d-flex.gap-4 {
        padding: 0;
    }

    .hero-section .btn1,
    .hero-section .btn2 {
        padding: 0.85rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Stats section */
    .hero-stats .d-flex {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats .d-flex > div {
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px;
    }

    .hero-stats img {
        width: 35px;
        height: 35px;
    }

    .hero-stats span {
        font-size: 1.3rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    /* For section */
    .for-option {
        padding: 0.9rem;
    }

    .bettor-card {
        padding: 1.25rem;
    }

    .bettor-title {
        font-size: 1.2rem;
    }

    .btn-success-custom {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Features */
    .feature-card {
        padding: 1.25rem;
    }

    .feature-title {
        font-size: 1rem;
    }

    .feature-text {
        font-size: 0.8rem;
    }

    /* Testimonial */
    .testimonial-text {
        font-size: 0.95rem;
    }

    /* Steps */
    .step-title {
        font-size: 1rem;
    }

    .step-text {
        font-size: 0.8rem;
    }

    /* CTA */
    .cta-title {
        font-size: 1.5rem;
    }

    .cta-text {
        font-size: 0.85rem;
    }

    .btn-cta-green {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-brand img {
        width: 120px;
    }

    .footer-text {
        font-size: 0.8rem;
    }

    .footer-title {
        font-size: 0.95rem;
    }

    .footer-links {
        font-size: 0.8rem;
    }

    .social-links a {
        width: 34px;
        height: 34px;
    }

    .footer-bottom {
        font-size: 0.75rem;
    }
}

/* ============================================
   EXTRA SMALL (400px and below)
   ============================================ */
@media (max-width: 400px) {
    .hero-section .section-title h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .hero-stats span {
        font-size: 1.2rem;
    }

    .cta-title {
        font-size: 1.35rem;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-width: 991px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 0;
    }

    .main-menu {
        max-height: 100vh;
        overflow-y: auto;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
@media (max-width: 767px) {
    .text-center-mobile {
        text-align: center !important;
    }

    .d-block-mobile {
        display: block !important;
    }

    .w-100-mobile {
        width: 100% !important;
    }
}

/* ============================================
   PREVENT HORIZONTAL SCROLL
   ============================================ */
@media (max-width: 991px) {
    body {
        overflow-x: hidden;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Responsive for Bettors page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .why-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-login {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
