/**
 * Estilos Responsivos Adicionais
 * Jornada da Transformação Digital
 */

/* ========================================
   ESTILOS GLOBAIS
======================================== */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ========================================
   HEADER E NAVEGAÇÃO
======================================== */

.site-header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background-color;
}

.site-header a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Menu Mobile */
@media (max-width: 768px) {
    .site-header nav {
        padding: 1rem;
    }
    
    #mobile-menu {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ========================================
   HERO SECTION
======================================== */

.hero-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-bg {
        min-height: calc(100vh - 60px);
        padding-top: 60px;
    }
    
    .hero-bg h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .hero-bg p {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .hero-bg h1 {
        font-size: 2rem !important;
    }
}

/* ========================================
   TIMELINE
======================================== */

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .timeline-container::before {
        left: 30px !important;
    }
    
    .palestrante-card .flex {
        flex-direction: column !important;
        text-align: left !important;
    }
    
    .palestrante-card [class*="md:pl-12"],
    .palestrante-card [class*="md:pr-12"] {
        padding-left: 50px !important;
        padding-right: 0 !important;
    }
}

/* Card do Palestrante */
.palestrante-card {
    position: relative;
    margin-bottom: 3rem;
}

.palestrante-card::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    width: 20px;
    height: 20px;
    background: #00D4FF;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.3);
    z-index: 10;
}

@media (min-width: 769px) {
    .palestrante-card::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ========================================
   GRID DE PALESTRANTES
======================================== */

@media (max-width: 640px) {
    .grid.grid-cols-1.md\:grid-cols-3.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .grid.grid-cols-1.md\:grid-cols-3.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
}

/* Foto do Palestrante */
.palestrante-card img,
[class*="rounded-full"] img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ========================================
   FORMULÁRIO
======================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    font-size: 16px !important; /* Previne zoom no iOS */
}

input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.3);
}

/* Mensagens de erro */
.error-message {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.input-error {
    border-color: #ef4444 !important;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ========================================
   BOTÕES
======================================== */

button,
.btn,
a[class*="bg-cyan"],
a[class*="bg-blue"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

button:active,
.btn:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   ANIMAÇÕES
======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   CONTADOR REGRESSIVO
======================================== */

#countdown {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    #countdown .flex {
        gap: 1rem !important;
    }
    
    #countdown .text-4xl {
        font-size: 2rem !important;
    }
}

/* ========================================
   CARDS DE ESTATÍSTICAS
======================================== */

.counter {
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

/* ========================================
   MAPA
======================================== */

iframe {
    border-radius: 0.5rem;
}

/* ========================================
   FOOTER
======================================== */

footer a:hover {
    color: #00D4FF;
}

/* ========================================
   SCROLL BAR PERSONALIZADA (WEBKIT)
======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1E90FF, #00D4FF);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0047AB, #1E90FF);
}

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

/* Foco visível para navegação por teclado */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid #00D4FF;
    outline-offset: 2px;
}

/* Skip to content */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1rem;
    background: #0047AB;
    color: white;
    text-decoration: none;
}

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

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

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   NOTIFICAÇÕES/TOASTS
======================================== */

.notification {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@media print {
    .site-header,
    .skip-to-content,
    button,
    .btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ========================================
   DARK MODE (OPCIONAL)
======================================== */

@media (prefers-color-scheme: dark) {
    /* Adicione estilos de dark mode se necessário */
}

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

/* GPU acceleration para animações */
.animate-on-scroll,
.palestrante-card,
.site-header {
    will-change: transform, opacity;
}

/* Lazy loading de imagens */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* ========================================
   UTILIDADES
======================================== */

.text-gradient {
    background: linear-gradient(90deg, #00D4FF, #1E90FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-blue {
    background: linear-gradient(135deg, #0047AB 0%, #002855 100%);
}

.bg-gradient-cyan {
    background: linear-gradient(135deg, #1E90FF 0%, #00D4FF 100%);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.shadow-glow-hover:hover {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.7);
}

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

/* Fix para Safari iOS */
@supports (-webkit-touch-callout: none) {
    .hero-bg {
        min-height: -webkit-fill-available;
    }
}

/* Fix para Edge */
@supports (-ms-ime-align: auto) {
    .timeline-container::before {
        transform: translateX(-2px);
    }
}

/* Fix para Firefox */
@-moz-document url-prefix() {
    button {
        padding: 0.75rem 1.5rem;
    }
}

/* Ajuste de espaçamento mobile para logo */
@media (max-width: 768px) {
    .site-header {
        padding: 12px 0;
    }
    
    .site-header .custom-logo {
        max-height: 40px;
        width: auto;
    }
    
    #home {
        padding-top: 100px !important;
    }
    
    .hero-bg {
        min-height: 100vh;
        padding-top: 80px;
    }
}

/* Ajuste espaçamento header mobile com logo */
@media (max-width: 768px) {
    .site-header {
        padding: 12px 0;
    }
    
    .site-header .custom-logo {
        max-height: 40px;
        width: auto;
    }
    
    .hero-bg {
        padding-top: 80px !important;
    }
    
    .hero-bg .container {
        padding-top: 40px;
    }
}
