/**
 * RESPONSIVE.CSS
 * Estilos 100% Responsivos - Mobile First
 * Todas as imagens, textos e layouts adaptados para qualquer dispositivo
 */

/* ============================================ */
/* BASE - Mobile First */
/* ============================================ */

/* Garantir que TODAS as imagens sejam responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy Loading - Performance */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

/* Prevenir overflow horizontal em mobile */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Container responsivo */
.container-custom {
    max-width: 1175px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ============================================ */
/* HERO SLIDER - Responsivo */
/* ============================================ */

#heroSlider {
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0s 0.8s;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease-in-out, visibility 0s 0s;
    z-index: 2;
}

/* Melhorar visibilidade das setas no mobile */
@media (max-width: 1023px) {
    #heroSlider button {
        background-color: rgba(255, 255, 255, 0.9) !important;
        color: #1f2937 !important;
        padding: 0.5rem !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    #heroSlider button:hover {
        background-color: rgba(255, 255, 255, 1) !important;
    }
    
    #heroSlider button svg {
        width: 20px;
        height: 20px;
    }
}

.slide-dot {
    transition: all 0.3s ease;
    width: 0.5rem !important;
    height: 0.5rem !important;
}

.slide-dot.active {
    width: 1rem !important;
    background-color: white;
}

/* Ocultar bolinhas no mobile - apenas setas */
@media (max-width: 1023px) {
    .slide-dot {
        display: none !important;
    }
    
    .general-dot {
        display: none !important;
    }
}

@media (min-width: 640px) {
    .slide-dot {
        width: 0.5rem !important;
        height: 0.5rem !important;
    }
    
    .slide-dot.active {
        width: 1.5rem !important;
    }
}

/* ============================================ */
/* TICKER - Responsivo */
/* ============================================ */

#ticker-container {
    position: relative;
    height: 1.25rem;
}

@media (min-width: 640px) {
    #ticker-container {
        height: 1.5rem;
    }
}

.ticker-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 640px) {
    .ticker-item {
        white-space: normal;
    }
}

.ticker-item.active {
    opacity: 1;
}

/* ============================================ */
/* SLIDER DE COLUNISTAS - Responsivo */
/* ============================================ */

#columnistSlider {
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.columnist-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.columnist-slide {
    flex: 0 0 100%;
    padding: 0 0.75rem;
    min-height: 1px;
}

@media (min-width: 768px) {
    .columnist-slide {
        flex: 0 0 33.333333%;
    }
}

/* Prevenir espaços vazios no slider de colunistas */
.columnist-slide > a {
    display: flex !important;
    min-height: 100px;
}

.columnist-slide img {
    flex-shrink: 0;
}

/* ============================================ */
/* CARDS PEQUENOS - Esportes e Categorias */
/* ============================================ */

/* Layout mobile: 2 cards por linha, fotos quadradas */
@media (max-width: 1023px) {
    /* Cards pequenos de esportes - 2 por linha no mobile */
    .lg\:col-span-5 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .lg\:col-span-5 > a {
        width: 100% !important;
    }
    
    .lg\:col-span-5 .flex {
        flex-direction: column !important;
        height: 100%;
    }
    
    .lg\:col-span-5 img {
        width: 100% !important;
        height: 150px !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
        border-radius: 0.375rem;
    }
    
    .lg\:col-span-5 .p-3 {
        padding: 0.75rem !important;
    }
    
    .lg\:col-span-5 h5 {
        font-size: 0.875rem !important;
        line-height: 1.25rem !important;
    }
    
    /* Cards das outras categorias - 2 por linha no mobile */
    .lg\:w-1\/2 .flex.gap-3,
    .lg\:w-1\/2 .flex.gap-4 {
        flex-direction: column !important;
        margin-bottom: 0 !important;
    }
    
    .lg\:w-1\/2 .flex img {
        width: 100% !important;
        height: 150px !important;
        aspect-ratio: 1 / 1 !important;
        object-fit: cover !important;
        border-radius: 0.375rem;
    }
    
    /* Grid de 2 colunas para cards pequenos */
    .lg\:w-1\/2.flex.flex-col {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin-top: 1rem;
    }
    
    .lg\:w-1\/2.flex.flex-col h5 {
        font-size: 0.875rem !important;
        line-height: 1.25rem !important;
    }
    
    /* Ocultar imagem principal em mobile para dar mais destaque aos cards */
    section .lg\:w-1\/2.h-\\[300px\\] {
        display: none !important;
    }
    
    section .lg\\:flex-row,
    section .lg\\:flex-row-reverse {
        display: block !important;
    }
}

/* ============================================ */
/* SLIDER DE ESPORTES - Responsivo */
/* ============================================ */

.sports-slider-container {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.sports-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.sports-slide {
    flex-shrink: 0;
    min-width: 100%;
    width: 100%;
}

/* Ajuste do slider de esportes no mobile */
@media (max-width: 1023px) {
    .sports-slider-container {
        height: 250px !important;
    }
    
    .sports-slide img {
        object-fit: cover !important;
        height: 100% !important;
    }
}

/* ============================================ */
/* SLIDER GERAL - Responsivo */
/* ============================================ */

.general-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.general-slide.active {
    opacity: 1;
    z-index: 10;
}

/* ============================================ */
/* CARDS E HOVER EFFECTS - Responsivo */
/* ============================================ */

.card-hover img {
    transition: transform 0.5s ease;
}

.card-hover:hover img {
    transform: scale(1.05);
}

/* Desabilitar hover em touch devices */
@media (hover: none) {
    .card-hover:hover img {
        transform: none;
    }
}

/* ============================================ */
/* LINE CLAMP - Truncamento de texto */
/* ============================================ */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================ */
/* LAZY LOADING - Performance */
/* ============================================ */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================ */
/* TOUCH INTERACTIONS - Mobile */
/* ============================================ */

/* Área mínima de toque 48x48px */
button,
a.btn,
.touch-target {
    min-width: 48px;
    min-height: 48px;
}

/* Remover highlight azul no tap (iOS/Android) */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================ */
/* BANNERS RESPONSIVOS */
/* ============================================ */

/* Banner Header - Leaderboard */
.header-banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.header-banner-slide.opacity-100 {
    opacity: 1;
}

/* Garantir que banners não quebrem layout */
.banner-container {
    max-width: 100%;
    overflow: hidden;
}

.banner-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (min-width: 640px) {
    .banner-container img {
        object-fit: cover;
    }
}

/* ============================================ */
/* MEDIA QUERIES - Breakpoints Tailwind */
/* ============================================ */

/* sm: 640px */
@media (min-width: 640px) {
    /* Ajustes para tablets */
}

/* md: 768px */
@media (min-width: 768px) {
    /* Ajustes para tablets landscape */
}

/* lg: 1024px */
@media (min-width: 1024px) {
    /* Ajustes para desktop */
}

/* xl: 1280px */
@media (min-width: 1280px) {
    /* Ajustes para telas grandes */
}

/* ============================================ */
/* ACESSIBILIDADE */
/* ============================================ */

/* Focus visível para navegação por teclado */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Skip to content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0ea5e9;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ============================================ */
/* PRINT STYLES */
/* ============================================ */

@media print {
    .no-print,
    nav,
    footer,
    .banner-container,
    button {
        display: none !important;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}
