/* ==============================================
   MOBILE MENU HAMBURGER
   ============================================== */

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-main);
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* Mobile menu styles */
@media (max-width: 768px) {

    /* Fix navbar padding on mobile */
    .nav-container {
        padding: 0 1rem !important;
        height: 60px !important;
        /* Compact navbar */
    }

    .logo {
        height: auto !important;
        font-size: 1.8rem !important;
    }

    .logo img {
        height: 40px !important;
        margin-right: 10px !important;
    }

    .logo span {
        font-size: 1.6rem !important;
        padding-top: 0 !important;
    }

    .hamburger {
        display: flex !important;
        margin-right: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-left: 1px solid rgba(255, 102, 0, 0.3);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Stagger animation for menu items */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li a:hover {
        color: var(--color-primary);
        padding-left: 10px;
    }

    .nav-links li a.active {
        color: var(--color-primary);
        border-left: 3px solid var(--color-primary);
        padding-left: 10px;
    }

    /* Make buttons inside nav look correct on mobile */
    .nav-links li button {
        display: block;
        width: 100%;
        text-align: left;
        background: none;
        color: var(--color-text-main);
        border: none;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        cursor: pointer;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-family: var(--font-heading);
        text-transform: uppercase;
    }

    /* Style for Dashboard "Hola, User" text */
    .nav-links li span.text-secondary {
        display: block;
        font-size: 1.2rem;
        padding: 1rem 0;
        color: var(--color-secondary);
        font-weight: 600;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li button:hover {
        color: var(--color-primary);
        padding-left: 10px;
    }

    /* Make "Zona Socios" or specific btn class items full width/centered */
    .nav-links li a.btn,
    .nav-links li button.btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem !important;
        margin-top: 1rem;
        font-size: 1rem;
        border: 1px solid var(--color-text-main);
        border-radius: 4px;
    }

    /* Fix grid layouts for mobile - put images below text */
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Reverse order so image goes below text */
    .grid-2 .image-box {
        order: 2;
    }

    .grid-2>div:first-child {
        order: 1;
    }

    /* ==============================================
       RESPONSIVE TYPOGRAPHY FOR MOBILE
       ============================================== */

    /* Logo size */
    .logo {
        font-size: 2.2rem !important;
        /* Compact logo */
    }

    /* Hero titles */
    .hero-title {
        font-size: 2.4rem !important;
        line-height: 1;
        margin-bottom: 1rem !important;
        margin-top: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.4;
        margin-bottom: 1.5rem !important;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        gap: 0.6rem !important;
        padding: 0;
        margin: 2.5rem 0 0 0 !important;
    }

    .hero-actions .btn {
        flex: 1 !important;
        max-width: 150px !important;
        font-size: 0.85rem !important;
        padding: 0.7rem 0.4rem !important;
        white-space: nowrap !important;
    }

    .btn-racing {
        clip-path: polygon(5% 0, 100% 0, 100% 85%, 95% 100%, 0 100%, 0 15%) !important;
    }

    /* Section headers */
    .section-header,
    .section {
        padding: 2.5rem 0 !important;
        /* Reduced padding from 4rem */
    }

    .section-header h2 {
        font-size: 1.8rem !important;
    }

    .section-header h3 {
        font-size: 1.6rem !important;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    /* Body text */
    body {
        font-size: 0.9rem;
    }

    /* Lead text (descriptive paragraphs) */
    .lead-text {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* About section list items */
    .about-list li {
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .about-list .icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.5rem !important;
    }

    .about-list h4 {
        font-size: 1rem !important;
    }

    .about-list p {
        font-size: 0.85rem !important;
    }

    /* General paragraph text */
    p {
        font-size: 0.9rem;
    }

    /* Buttons - More compact for mobile */
    .btn {
        font-size: 1rem !important;
        padding: 0.5rem 1.2rem !important;
        height: auto !important;
        min-height: 44px;
        /* Minimum touch target size */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-lg {
        font-size: 1.1rem !important;
        padding: 0.7rem 1.8rem !important;
        min-height: 50px;
    }

    /* ==============================================
       RESPONSIVE IMAGES AND MEDIA
       ============================================== */

    /* Hero sections - Better Vertical Spacing */
    .hero {
        min-height: 500px !important;
        height: 68vh !important;
        padding-top: 110px !important;
        display: flex !important;
        align-items: center !important;
        text-align: center !important;
    }

    .hero-content {
        width: 100%;
        padding: 0 1rem;
    }

    /* All images scale properly */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Image boxes */
    .image-box {
        min-height: 200px !important;
    }

    /* Media grid for videos */
    .media-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* YouTube iframe containers */
    .media-thumbnail {
        min-height: 180px !important;
    }

    /* Benefits Grid - 2 columns on mobile to use space better */
    .benefits-grid,
    .partners-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .benefit-card,
    .partner-card {
        padding: 1rem 0.6rem !important;
    }

    .benefit-icon {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .benefit-title {
        font-size: 1rem !important;
    }

    .benefit-desc {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    /* Partners Section - 2 columns */
    #partners-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .partner-card h3 {
        font-size: 1.1rem !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Calendar & Event Cards - Ultra Compact */
    .calendar-grid {
        gap: 0.6rem !important;
    }

    .event-card {
        flex-direction: row !important;
        /* Keep horizontal to save height */
        gap: 1rem !important;
        padding: 0.6rem !important;
        align-items: center !important;
        border-radius: 8px !important;
    }

    .event-date {
        min-width: 45px !important;
    }

    .event-date .day {
        font-size: 1.5rem !important;
    }

    .event-date .month {
        font-size: 0.8rem !important;
    }

    .event-info h3 {
        font-size: 1rem !important;
        margin-bottom: 2px !important;
    }

    .event-info p {
        font-size: 0.75rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: var(--color-text-muted);
    }

    .btn-icon {
        font-size: 1rem !important;
        margin-left: auto;
    }

    /* Club/Member Events - Compact */
    .member-card {
        min-height: auto !important;
    }

    .member-card>div:first-child {
        height: 100px !important;
        /* Tiny image to save space */
    }

    .member-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
    }

    .member-card p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.8rem !important;
        margin-bottom: 0.8rem !important;
    }

    /* Stat card - Compact for mobile */
    .stat-card {
        position: absolute !important;
        bottom: -10px !important;
        right: 0 !important;
        padding: 0.8rem !important;
        max-width: 130px;
        z-index: 5;
    }

    .stat-number {
        font-size: 1.4rem !important;
    }

    .stat-label {
        font-size: 0.6rem !important;
    }

    /* Admin Tabs Responsive - Scroll horizontally */
    .admin-tabs {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.4rem;
        margin-bottom: 1.5rem;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        flex-direction: row !important;
        /* Force row on mobile */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
        border-bottom: 2px solid transparent !important;
        border-left: none !important;
        text-align: center !important;
    }

    .tab-btn.active {
        border-bottom-color: var(--color-primary) !important;
        background: rgba(255, 102, 0, 0.1) !important;
    }

    /* CTA sections */
    .cta-content h2 {
        font-size: 1.8rem !important;
    }

    /* Pricing Card - Ultra Compact Redesign */
    .pricing-hero-card {
        padding: 1rem !important;
        margin-top: 1.2rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
    }

    .pricing-hero-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 0.15rem !important;
        letter-spacing: 1px !important;
    }

    .pricing-amount {
        font-size: 2.5rem !important;
        margin: 0.15rem 0 !important;
        line-height: 1 !important;
    }

    .includes-badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
        margin-bottom: 1rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .pricing-hero-card .btn-lg {
        width: 100% !important;
        max-width: none !important;
        font-size: 1.1rem !important;
        padding: 0.6rem !important;
        min-height: 44px !important;
    }

    .steps-container {
        grid-template-columns: 1fr !important;
        gap: 0.6rem !important;
        margin-top: 1.2rem !important;
        padding-top: 0.8rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .step-item {
        padding-left: 0 !important;
        border-left: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        padding-bottom: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.8rem !important;
        text-align: left !important;
    }

    .step-item:last-child {
        border-bottom: none !important;
    }

    .step-number {
        font-size: 1.1rem !important;
        margin-bottom: 0 !important;
        min-width: 25px !important;
        height: auto !important;
    }

    .step-item p {
        font-size: 0.8rem !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    /* Reducción Extra y Ocultar Pasos */
    .pricing-hero-card {
        padding: 1rem !important;
        margin-top: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .pricing-amount {
        font-size: 2.8rem !important;
        margin: 0.2rem 0 !important;
    }

    .includes-badge {
        font-size: 0.65rem !important;
        margin-bottom: 1.2rem !important;
        background: rgba(255, 102, 0, 0.1) !important;
    }

    .steps-container {
        display: none !important;
    }
}

/* Mobile menu overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile menu overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Fix for the badge in Somos Endureros */
.growing-badge {
    padding: 0.8rem 1.2rem !important;
    bottom: -10px !important;
    right: -5px !important;
    position: absolute !important;
}

.growing-badge h4 {
    font-size: 1.2rem !important;
}

.growing-badge p {
    font-size: 0.6rem !important;
    letter-spacing: 1px !important;
}