/* Variáveis de cor seguindo o design especificado */
:root {
    --bg-primary: #151b2a; /* Azul quase preto */
    --text-primary: #E2E8F0; /* Cinza muito claro */
    --text-secondary: #94A3B8; /* Cinza médio */
    --card-bg: #151B2B; /* Azul-escuro secundário */
    --border-color: #334155; /* Cinza muito escuro */
    --accent-gradient-start: #1E293B; /* Azul profundo */
    --accent-gradient-end: #475569; /* Cinza azulado */
    --accent-color: #DD4F51; /* Cor primária do site */

    /* Responsive breakpoints */
    --mobile-breakpoint: 480px;
    --tablet-breakpoint: 768px;
    --desktop-breakpoint: 1024px;
    --ultra-wide-breakpoint: 1920px;

    /* Responsive spacing */
    --spacing-xs: clamp(4px, 2px, 8px);
    --spacing-sm: clamp(8px, 4px, 16px);
    --spacing-md: clamp(16px, 8px, 24px);
    --spacing-lg: clamp(24px, 16px, 32px);
    --spacing-xl: clamp(32px, 24px, 48px);

    /* Responsive typography */
    --font-size-xs: clamp(0.75rem, 0.625rem, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.75rem, 1rem);
    --font-size-base: clamp(1rem, 0.875rem, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1rem, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.125rem, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 1.25rem, 2rem);
    --font-size-3xl: clamp(1.875rem, 1.5rem, 2.25rem);
    --font-size-4xl: clamp(2.25rem, 1.875rem, 2.5rem);

    /* Responsive line heights */
    --line-height-tight: clamp(1.25, 1.1, 1.3);
    --line-height-normal: clamp(1.5, 1.3, 1.6);
    --line-height-relaxed: clamp(1.625, 1.5, 1.75);

    /* Touch target sizes */
    --touch-target-min: 44px;
    --touch-target-comfortable: 48px;
}

/* Body e Background */
body {
    background-image: linear-gradient(90deg, #0f131d, #1f2231, #0f131d);
    color: var(--text-primary);
    font-family: var(--font-family), 'Inter', sans-serif;
    line-height: var(--line-height-normal);
    overflow-x: hidden;
    /* Responsive font size */
    font-size: var(--font-size-base);
    /* Improved text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Main Container */
main {
    max-width: min(var(--desktop-breakpoint), 1200px);
    margin: 0 auto;
    padding: var(--spacing-md);
    width: 100%;
    /* Responsive padding */
    padding: clamp(16px, 12px, 32px);
}

/* Tablet styles */
@media (min-width: var(--tablet-breakpoint)) {
    main {
        padding: var(--spacing-lg);
    }

    /* Improved grid for tablets */
    .researchers-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--spacing-md);
    }

    /* Adjust hero for tablets */
    #hero-section {
        height: 100vh;
        min-height: 500px;
        padding: var(--spacing-lg);
    }

    .hero-logo {
        max-width: 350px;
    }

    .hero-content h1 {
        font-size: var(--font-size-2xl);
    }

    .hero-content h2 {
        font-size: var(--font-size-xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }

    p {
        font-size: var(--font-size-base);
        line-height: var(--line-height-relaxed);
        text-align: left;
    }
}

/* Seções padrão */
section {
    margin: 64px 0;
    width: 100%;
}

.content-container {
    max-width: 100%;
    margin: 0 auto;
}

.content-container h2 {
    font-size: 1.8rem;
}

/* Hero Section */
#hero-section {
    height: 100vh;
    min-height: clamp(320px, 400px, 600px);
    background:    url('/assets/images/background_light_spot.png');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    margin-top: clamp(10vh, 15vh, 20vh);
    margin-bottom: var(--spacing-xl);
    /* Improved background positioning */
    background-repeat: no-repeat;
}

@media (min-width: 768px) {
    #hero-section {
        height: 384px;
    }
}

.hero-content {
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 2.5rem, 3rem);
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
    color: white;
    /* Responsive text */
    line-height: var(--line-height-tight);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    /* Improved text wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-logo {
    margin-bottom: var(--spacing-md);
    /* Responsive image */
    width: 100%;
    object-fit: contain;
}

@media (min-width: 768px) {
    .hero-logo {
        max-width: 400px;
    }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin: 0;
    /* Responsive text */
    line-height: var(--line-height-normal);
    text-align: center;
}

/* Tipografia */
h2 {
    color: white;
    font-size: var(--font-size-2xl);
    font-weight: bold;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    /* Responsive text */
    line-height: var(--line-height-tight);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

h3 {
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 8px;
}

p {
    color: var(--text-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
    /* Responsive text */
    text-align: left;
    max-width: 65ch;
}

/* Seção Nova Temporada */
#new-season {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin: 48px 0;
}

#new-season h2 {
    color: var(--accent-color);
    margin-bottom: 5vh;
}

/* Grid de Pesquisadores */
.researchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    /* Responsive grid */
    grid-auto-flow: dense;
    grid-auto-rows: min-content;
}

.researcher-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Responsive card */
    min-height: clamp(200px, 250px, 300px);
    /* Improved accessibility */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.researcher-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    /* Enhanced hover effect */
    z-index: 10;
}

/* Touch feedback for mobile */
.researcher-card:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.researcher-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    /* Responsive flex */
    flex: 1;
    min-width: 0;
}

.researcher-info h3 {
    margin-bottom: var(--spacing-sm);
    /* Responsive heading */
    font-size: var(--font-size-lg);
    line-height: var(--line-height-tight);
}

.researcher-info .specialty {
    color: var(--accent-color);
    font-weight: bold;
    /* Responsive speciality */
    font-size: var(--font-size-sm);
    display: block;
    margin-top: var(--spacing-xs);
}

.researcher-info .institution {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: auto;
    padding-top: var(--spacing-sm);
}

.researchers-summary {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 32px;
}

/* Banner "Quando Assistir" */
#when-watch {
    background: linear-gradient(135deg, #303b50, #111f30);
    border-radius: 12px;
    padding: 3rem;
    margin: var(--spacing-xl) 0;
    /* Responsive container */
    min-height: clamp(300px, 400px, 500px);
}

.watch-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Mobile landscape styles */
@media (min-width: var(--mobile-breakpoint)) and (orientation: landscape) {
    #hero-section {
        height: 100vh;
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: var(--font-size-xl);
    }

    .researchers-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Tablet styles */
@media (min-width: var(--tablet-breakpoint)) {
    .watch-content {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    /* Improved grid for tablets */
    .researchers-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: var(--spacing-md);
    }

    /* Adjust hero for tablets */
    #hero-section {
        height: 100vh;
        min-height: 500px;
        padding: var(--spacing-lg);
    }

    .hero-logo {
        max-width: 350px;
    }

    .hero-content h1 {
        font-size: var(--font-size-2xl);
    }

    .hero-content h2 {
        font-size: var(--font-size-xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }

    p {
        font-size: var(--font-size-base);
        line-height: var(--line-height-relaxed);
    }

    .watch-text {
        flex: 1;
    }

    .watch-text h2 {
        color: white;
        text-align: left;
        margin-bottom: 16px;
    }

    .watch-icons {
        display: flex;
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    @media (min-width: 768px) {
        .watch-icons {
            flex-direction: row;
        }
    }

    .icon-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        /* Responsive icon item */
        flex: 1;
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        padding: var(--spacing-sm);
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .icon-item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: inherit;
        width: 100%;
        height: 100%;
    }

    .icon-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    .icon-item:active {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(0) scale(0.95);
    }

    .icon-item img {
        filter: brightness(0) invert(1);
        /* Responsive image */
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .icon-item span {
        color: white;
        font-size: var(--font-size-sm);
        font-weight: 500;
        /* Responsive text */
        text-align: center;
        line-height: var(--line-height-normal);
        word-wrap: break-word;
    }

    .premiere-info {
        text-align: center;
        margin-top: var(--spacing-lg);
        padding-top: var(--spacing-lg);
        border-top: 1px solid var(--border-color);
        /* Responsive info section */
        padding-bottom: var(--spacing-lg);
    }

    .premiere-info p {
        margin: var(--spacing-xs) 0;
        color: var(--text-primary);
        font-weight: 500;
        /* Responsive text */
        font-size: var(--font-size-base);
        line-height: var(--line-height-relaxed);
        max-width: 60ch;
    }

    /* Seção Sobre Versatus */
    #about-versatus {
        border-top: 1px solid var(--border-color);
        padding-top: var(--spacing-xl);
        margin-top: var(--spacing-xl);
        /* Responsive section */
        padding-bottom: var(--spacing-xl);
    }

    .versatus-content {
        text-align: center;
    }

    .versatus-text p:last-child {
        margin-bottom: 0;
    }

    .versatus-text a {
        color: var(--accent-color);
        text-decoration: none;
        font-weight: 500;
        /* Responsive links */
        font-size: var(--font-size-base);
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: 4px;
        transition: all 0.2s ease;
        min-height: var(--touch-target-min);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .versatus-text a:hover {
        background-color: rgba(221, 79, 81, 0.1);
        transform: translateY(-1px);
    }

    .versatus-text a:active {
        background-color: rgba(221, 79, 81, 0.2);
        transform: translateY(0) scale(0.95);
    }

    .versatus-text a:focus-visible {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }

    .versatus-text a:hover {
        text-decoration: underline;
    }

    /* Responsive Design */
    @media (max-width: 767px) {
        html {
            font-size: 14px;
        }

        main {
            padding: 0 16px;
        }

        section {
            margin: 32px 0;
        }

        #hero-section {
            height: 280px;
            padding: 20px;
        }

        .hero-content h1 {
            font-size: 2rem;
        }

        .hero-subtitle {
            font-size: 1rem;
        }

        h2 {
            font-size: 1.75rem;
        }

        .researchers-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .researcher-card {
            padding: 20px;
        }

        #new-season {
            padding: 24px;
            margin: 32px 0;
        }

        #when-watch {
            padding: 24px;
            margin: 32px 0;
        }

        .watch-content {
            text-align: center;
        }

        .watch-text h2 {
            text-align: center;
        }

        .premiere-info {
            margin-top: 16px;
            padding-top: 16px;
        }
    }

    @media (min-width: 768px) and (max-width: 1023px) {
        .researchers-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (min-width: 1024px) {
        .researchers-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    /* Animações sutilizadas */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    section {
        animation: fadeInUp 0.6s ease-out;
    }
}
