/* 
 * Arena CF - Home Page Styles
 * Estilos adicionais para a página inicial
 */

/* ============================================================================
   FIX OVERFLOW HORIZONTAL
   ============================================================================ */

/* Prevenir scroll horizontal em TODOS os elementos */
* {
    max-width: 100%;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
}

/* Containers */
.container {
    max-width: 100% !important;
    overflow-x: hidden;
}

/* Sections */
section {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Grids */
.grid {
    width: 100%;
    max-width: 100%;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Canvas e Particles */
canvas {
    max-width: 100vw !important;
}

/* ============================================================================
   RESPONSIVIDADE MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    /* Forçar sem overflow */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Container com padding adequado */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100vw !important;
    }
    
    /* Navbar */
    nav {
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    nav .container {
        width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Hero Section */
    #hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-title {
        font-size: 3rem !important;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem !important;
        padding: 0 1rem;
    }
    
    .hero-content {
        width: 100%;
        padding: 0 1rem;
    }
    
    .hero-content .flex {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-content .flex a {
        width: 100%;
        text-align: center;
        max-width: 100%;
    }
    
    /* Stats Section */
    .stat-number {
        font-size: 2.5rem !important;
    }
    
    /* Cards */
    .glass {
        padding: 1.5rem !important;
    }
    
    /* Professor Cards */
    .professor-card-inner {
        height: 300px !important;
    }
    
    /* Plan Cards */
    .plan-card {
        margin-bottom: 1rem;
    }
    
    /* Timeline */
    .timeline-item {
        padding-left: 2rem !important;
    }
    
    /* Form */
    .form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Navigation */
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Swiper */
    .swiper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .swiper-slide {
        max-width: 100% !important;
    }
    
    .swiper-slide img {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Grids responsivos */
    .grid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* ============================================================================
   TABLET
   ============================================================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 5rem !important;
    }
    
    .stat-number {
        font-size: 3rem !important;
    }
}

/* ============================================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none !important;
    }
}

/* GPU Acceleration */
.professor-card-inner,
.plan-card,
.hover-lift {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Lazy load images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */

@media (prefers-color-scheme: light) {
    /* Se o usuário preferir light mode, podemos ajustar */
    /* Por enquanto, mantemos dark mode sempre */
}

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

@media print {
    #three-canvas,
    #particles-js,
    .scroll-indicator,
    nav,
    footer,
    a[href*="whatsapp"] {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .gradient-text {
        -webkit-text-fill-color: black;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0EA5E9;
    outline-offset: 2px;
}

/* Skip to content link */
.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;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================================================
   CUSTOM UTILITIES
   ============================================================================ */

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.backdrop-blur-strong {
    backdrop-filter: blur(20px);
}

.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   FIXES ESPECÍFICOS
   ============================================================================ */

/* Fix para Safari */
@supports (-webkit-appearance: none) {
    .glass {
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Fix para Firefox */
@-moz-document url-prefix() {
    .glass {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* Fix para Edge */
@supports (-ms-ime-align: auto) {
    .glass {
        background: rgba(255, 255, 255, 0.08);
    }
}

