/* Fuente personalizada MMA Champ */
@font-face {
    font-family: 'MMA Champ';
    src: url('../assets/fonts/mma-champ.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Estilos específicos para Machacacachas */
.hero-machaca {
    background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-secondary));
    position: relative;
    overflow: hidden;
}

.hero-machaca::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(231, 190, 190, 0.2);
    z-index: 1;
}

.hero-machaca .hero-content {
    position: relative;
    z-index: 2;
}

.machaca-title {
    font-family: 'MMA Champ', 'Bebas Neue', 'Oswald', sans-serif;
    font-weight: normal;
    font-size: clamp(3rem, 8vw, 5rem);
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    color: var(--cycling-light);
}

.machaca-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Estilos para los logos laterales watermark de Machacacachas */
.machaca-logo-left {
    animation: fadeInFromLeft 2s ease-out 1s both, breatheLeft 6s ease-in-out infinite;
}

.machaca-logo-right {
    animation: fadeInFromRight 2s ease-out 1.2s both, breatheRight 6s ease-in-out infinite;
}

.machaca-logo-watermark-side {
    width: 400px;
    height: auto;
    filter: grayscale(30%) brightness(1.1);
    transition: all 0.3s ease;
}

/* Animación de respiración sutil para el logo izquierdo */
@keyframes breatheLeft {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(-2deg);
        opacity: 0.12;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.03) rotate(-1deg);
        opacity: 0.2;
    }
}

/* Animación de respiración sutil para el logo derecho */
@keyframes breatheRight {
    0%, 100% {
        transform: translate(50%, -50%) scale(1) rotate(2deg);
        opacity: 0.12;
    }
    50% {
        transform: translate(50%, -50%) scale(1.03) rotate(1deg);
        opacity: 0.2;
    }
}

/* Animación de entrada desde la izquierda */
@keyframes fadeInFromLeft {
    0% {
        transform: translate(-150%, -50%) scale(0.8) rotate(-5deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(-2deg);
        opacity: 0.12;
    }
}

/* Animación de entrada desde la derecha */
@keyframes fadeInFromRight {
    0% {
        transform: translate(150%, -50%) scale(0.8) rotate(5deg);
        opacity: 0;
    }
    100% {
        transform: translate(50%, -50%) scale(1) rotate(2deg);
        opacity: 0.12;
    }
}

/* Mejora del texto superpuesto */
.hero-machaca .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-machaca .machaca-title {
    position: relative;
    z-index: 4;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
}

.hero-machaca .machaca-subtitle {
    position: relative;
    z-index: 4;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8);
}

.hero-machaca .hero-subtitle {
    position: relative;
    z-index: 4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Responsivo para los logos laterales */
@media (max-width: 1200px) {
    .machaca-logo-watermark-side {
        width: 350px;
    }
    
    .machaca-logo-left {
        left: 10%;
    }
    
    .machaca-logo-right {
        right: 10%;
    }
}

@media (max-width: 1024px) {
    .machaca-logo-watermark-side {
        width: 300px;
    }
    
    .machaca-logo-left {
        left: 8%;
        opacity: 0.08;
    }
    
    .machaca-logo-right {
        right: 8%;
        opacity: 0.08;
    }
}

/* Ocultar logos en tablet y móvil */
@media (max-width: 768px) {
    .machaca-logo-left,
    .machaca-logo-right {
        display: none !important;
    }
}

.tabs-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin: 3rem 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tabs-nav {
    display: flex;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    position: relative;
    padding: 0;
}

.tab-button {
    flex: 1;
    padding: 1.25rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-size: 0.875rem;
    position: relative;
    text-align: center;
    min-width: 0;
}

.tab-button:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #1e40af;
    transform: translateY(-1px);
}

.tab-button.active {
    background: white;
    color: #1e40af;
    border-bottom-color: #2563eb;
    box-shadow: 0 -2px 0 0 white, 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.tab-content {
    padding: 2.5rem;
    display: none;
    background: #fafafa;
    min-height: 400px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Estilos del carrusel */
.carousel-slide img {
    transition: transform 0.3s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

.carousel-container:hover .carousel-control {
    opacity: 1;
}

.carousel-control {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.carousel-control:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.recorridos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.recorrido-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: white;
}

.recorrido-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.recorrido-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.recorrido-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recorrido-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.1);
}

.recorrido-card:hover::before {
    opacity: 1;
}

.recorrido-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.recorrido-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-box {
    text-align: center;
    padding: 1.25rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

.stat-box:hover::before {
    transform: scaleX(1);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.recorrido-description {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.warning-box {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
}

.warning-box svg {
    color: #fbbf24;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.warning-box span {
    color: rgb(0, 0, 0);
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--cycling-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--cycling-dark);
    border-bottom: 2px solid var(--cycling-accent);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--cycling-accent);
}

.data-table tr:hover {
    background: var(--cycling-light);
}

.presidente-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid #dc2626;
    margin: 2rem 0;
}

.presidente-header {
    text-align: center;
    margin-bottom: 2rem;
}

.presidente-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.presidente-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
}

.presidente-content p {
    margin-bottom: 1.5rem;
    color: var(--cycling-muted);
    line-height: 1.7;
}

.presidente-signature {
    font-weight: 600;
    color: var(--cycling-dark);
    text-align: right;
    margin-top: 2rem;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-icon {
    color: #f59e0b;
    margin-top: 0.25rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--cycling-blue);
}

.info-card h4 {
    font-weight: 600;
    color: var(--cycling-dark);
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--cycling-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Estilos para el formulario de newsletter */
.newsletter-section {
    background: linear-gradient(135deg, #dc2626, #ea580c, #d97706);
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    margin: 2rem 0;
    box-shadow: 0 25px 50px -12px rgba(220, 38, 38, 0.25);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1px);
}

.newsletter-section .cta-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.newsletter-section .cta-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.newsletter-form {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
}

.newsletter-input {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
    padding: 1.5rem 2rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15), 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.newsletter-btn {
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
    border: none;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.newsletter-btn:hover {
    background: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    color: #b91c1c;
}

.newsletter-btn:active {
    transform: translateY(-1px) scale(1.01);
}

@media (max-width: 768px) {
    .newsletter-section {
        padding: 3rem 2rem;
        margin: 1.5rem 0;
    }

    .newsletter-section .cta-title {
        font-size: 2rem;
    }

    .newsletter-section .cta-description {
        font-size: 1.125rem;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }
    
    .newsletter-input {
        min-width: auto;
        max-width: none;
        padding: 1.25rem 1.5rem;
    }

    .newsletter-btn {
        padding: 1.25rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 1024px) {
    .recorridos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .tabs-container {
        margin: 2rem 0;
        border-radius: 0.5rem;
    }
    
    .tabs-nav {
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .tab-button {
        flex: 1;
        padding: 1rem 0.75rem;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .tab-content {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .recorrido-card {
        padding: 1.5rem;
    }
    
    .recorrido-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-box {
        padding: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .tab-button {
        font-size: 0.75rem;
        padding: 0.875rem 0.5rem;
    }
    
    .recorrido-title {
        font-size: 1.125rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
}

/* Responsive para el carrusel de imágenes */
@media (max-width: 768px) {
    .machaca-carousel {
        max-width: 95% !important;
        margin: 0 auto !important;
    }
    
    .swiper-slide > div {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .swiper-slide > div {
        height: 250px !important;
    }
    
    .machaca-carousel {
        border-radius: 0.5rem !important;
    }
}

/* Estilos responsive para el aftermovie */
@media (max-width: 768px) {
    .aftermovie-container {
        margin: 0 1rem !important;
        padding: 1.5rem !important;
        max-width: 400px !important;
    }
    
    .video-wrapper {
        padding-bottom: 177.78% !important; /* Mantener aspect ratio vertical */
    }
    
    .video-stats {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .video-stats .stat-item {
        padding: 0.5rem;
        background: var(--cycling-light);
        border-radius: 0.5rem;
    }
}

@media (max-width: 480px) {
    .aftermovie-container {
        margin: 0 0.5rem !important;
        padding: 1rem !important;
        max-width: 320px !important;
    }
    
    .video-wrapper {
        padding-bottom: 177.78% !important; /* Mantener aspect ratio vertical */
    }
    
    .section-header h2 {
        font-size: 2rem !important;
    }
    
    .section-header p {
        font-size: 1rem !important;
    }
}

/* Estilos para el hero con carrusel */
.hero-machaca {
    position: relative;
    min-height: 80vh;
    overflow: hidden;
}

.hero-swiper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide > div {
    width: 100%;
    height: 100%;
}

/* Controles del carrusel del hero */
.hero-machaca .swiper-button-next,
.hero-machaca .swiper-button-prev {
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.hero-machaca .swiper-button-next:hover,
.hero-machaca .swiper-button-prev:hover {
    opacity: 1;
}

.hero-machaca .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.7);
    opacity: 0.7;
}

.hero-machaca .swiper-pagination-bullet-active {
    background: white;
    opacity: 1;
}

/* Responsive para el hero con carrusel */
@media (max-width: 768px) {
    .hero-machaca {
        min-height: 60vh;
    }
    
    .hero-machaca .swiper-button-next,
    .hero-machaca .swiper-button-prev {
        display: none;
    }
    
    .hero-machaca .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-machaca .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-machaca {
        min-height: 50vh;
    }
    
    .hero-machaca .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-machaca .hero-content p {
        font-size: 0.9rem;
    }
}