/* ============================================
   PNAE 2026 - Página de Autenticação
   Identidade Visual Lumni
   ============================================ */

/* Importar fonte Outfit */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&display=swap');

/* Variáveis de Cores */
:root {
    --pnae-orange: #FC7D55;
    --pnae-blue: #083FCF;
    --pnae-blue-light: #E8F0FF;
    --pnae-background: #FAFBFC;
    --pnae-card-bg: #FFFFFF;
    --pnae-text-primary: #1F2937;
    --pnae-text-secondary: #6B7280;
    --pnae-border: #E5E7EB;
    --pnae-error: #EF4444;
    --pnae-success: #10B981;
    --pnae-shadow: 0 10px 25px rgba(8, 63, 207, 0.08);
    --pnae-shadow-hover: 0 15px 35px rgba(8, 63, 207, 0.12);
}

/* Reset e Base */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.pnae-auth-section {
    min-height: auto;
    background: var(--pnae-background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.pnae-auth-section * {
    box-sizing: border-box;
    max-width: 100%;
}

/* Wrapper Principal - Layout em Grid */
.pnae-auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: auto;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

/* ============================================
   LADO ESQUERDO: Branding
   ============================================ */

.pnae-branding {
    display: flex;
    align-items: top;
    justify-content: center;
    padding: 4rem 3rem 4rem 4rem;
    gap: 1rem;
    background: var(--pnae-background);
}

.vertical-line {
    width: 5px;
    height: 160px;
    background: var(--pnae-blue);
    border-radius: 0px;
    flex-shrink: 0;
    align-self: stretch;
}

.branding-content {
    max-width: 500px;
}

.main-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 4.5rem;
    line-height: 1.1;
    margin: 0 0 0.75rem 0;
    letter-spacing: -1px;
}

.pnae-text,
.year-text {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pnae-text:hover,
.year-text:hover {
    transform: scale(1.02);
}

/* Base text layer */
.pnae-text .text-base {
    color: var(--pnae-orange);
    font-weight: 700;
}

.year-text .text-base {
    color: var(--pnae-blue);
    font-weight: 400;
}

/* Overlay text layer with gradient mask */
.text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pnae-text .text-overlay {
    color: var(--pnae-blue);
    font-weight: 700;
    -webkit-mask-image: radial-gradient(circle 0px at 50% 50%, black 0%, transparent 0%);
    mask-image: radial-gradient(circle 0px at 50% 50%, black 0%, transparent 0%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.year-text .text-overlay {
    color: var(--pnae-orange);
    font-weight: 400;
    -webkit-mask-image: radial-gradient(circle 0px at 50% 50%, black 0%, transparent 0%);
    mask-image: radial-gradient(circle 0px at 50% 50%, black 0%, transparent 0%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* Active state when hovering */
.pnae-text:hover .text-overlay,
.year-text:hover .text-overlay {
    opacity: 1;
}

.subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--pnae-blue);
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
}

/* ============================================
   CARROSSEL DE PARCEIROS
   ============================================ */

.partners-carousel {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    position: relative;
    padding: 1.5rem 0;
}

.carousel-track {
    display: flex;
    gap: 2.5rem;
    animation: scroll 25s linear infinite;
    width: fit-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.partner-logo {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(8, 63, 207, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-logo:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(8, 63, 207, 0.15);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%) opacity(1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   LADO DIREITO: Formulários
   ============================================ */

.pnae-auth-forms {
    display: flex;
    align-items: top;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--pnae-card-bg);
}

.pnae-auth-container {
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Tabs */
.pnae-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--pnae-background);
    padding: 0.5rem;
    border-radius: 12px;
}

.pnae-tab {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--pnae-text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pnae-tab:hover {
    color: var(--pnae-blue);
}

.pnae-tab.active {
    background: var(--pnae-card-bg);
    color: var(--pnae-blue);
    box-shadow: 0 2px 8px rgba(8, 63, 207, 0.1);
}

/* Form Container */
.pnae-form-container {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.pnae-form-container.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form */
.pnae-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pnae-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pnae-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pnae-text-primary);
    font-family: 'Outfit', sans-serif;
}

.pnae-form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--pnae-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    color: var(--pnae-text-primary);
    transition: all 0.3s ease;
    background: var(--pnae-card-bg);
}

.pnae-form-group input:focus {
    outline: none;
    border-color: var(--pnae-blue);
    box-shadow: 0 0 0 4px var(--pnae-blue-light);
}

.pnae-form-group input::placeholder {
    color: var(--pnae-text-secondary);
    opacity: 0.6;
}

.pnae-form-hint {
    font-size: 0.75rem;
    color: var(--pnae-text-secondary);
    margin-top: -0.25rem;
}

/* Messages */
.pnae-form-message {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

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

.pnae-form-message.show {
    display: block;
}

.pnae-form-message.error {
    background: #FEE2E2;
    color: var(--pnae-error);
    border: 1px solid #FECACA;
}

.pnae-form-message.success {
    background: #D1FAE5;
    color: var(--pnae-success);
    border: 1px solid #A7F3D0;
}

/* Button */
.pnae-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.pnae-btn-primary {
    background: var(--pnae-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 63, 207, 0.3);
}

.pnae-btn-primary:hover:not(:disabled) {
    background: #0633A8;
    box-shadow: 0 6px 16px rgba(8, 63, 207, 0.4);
    transform: translateY(-2px);
}

.pnae-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.pnae-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Footer */
.pnae-form-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--pnae-text-secondary);
}

.pnae-link {
    color: var(--pnae-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.pnae-link:hover {
    color: var(--pnae-orange);
    text-decoration: underline;
}

.pnae-auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pnae-border);
    text-align: center;
}

.pnae-auth-footer p {
    font-size: 0.75rem;
    color: var(--pnae-text-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .pnae-auth-wrapper {
        grid-template-columns: 1fr;
    }

    .pnae-branding {
        padding: 3rem 2rem;
        min-height: 40vh;
        gap: 2rem;
    }

    .main-title {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }
    
    .partners-carousel {
        max-width: 400px;
    }
    
    .partner-logo {
        width: 130px;
        height: 130px;
        padding: 1.5rem;
    }

    .pnae-auth-forms {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .pnae-auth-section {
        padding: 1rem 0.5rem;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .pnae-auth-wrapper {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        padding: 0 0.5rem;
    }

    .pnae-branding {
        padding: 2rem 1rem;
        min-height: auto;
        gap: 1rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .branding-content {
        max-width: 100%;
        width: 100%;
        overflow: hidden;
    }

    .vertical-line {
        width: 2px;
        height: 40px;
        flex-shrink: 0;
    }

    .main-title {
        font-size: 2rem;
        line-height: 1.2;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .subtitle {
        font-size: 0.875rem;
        line-height: 1.5;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .partners-carousel {
        max-width: 100%;
        width: 100%;
        margin-top: 1rem;
        overflow: hidden;
    }
    
    .carousel-track {
        gap: 1rem;
    }
    
    .partner-logo {
        width: 70px;
        height: 70px;
        padding: 0.875rem;
    }

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

    .pnae-auth-container {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }

    .pnae-auth-forms {
        padding: 1.5rem 1rem 2rem 1rem;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .pnae-auth-forms * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .pnae-tabs {
        width: 100%;
    }

    .pnae-tab {
        flex: 1;
        min-width: 0;
    }

    .pnae-tabs {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .pnae-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .pnae-form-group {
        margin-bottom: 1rem;
    }

    .pnae-form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .pnae-form-group {
        margin-bottom: 1rem;
    }

    .pnae-form-group label {
        font-size: 0.875rem;
    }

    .pnae-form-group input {
        padding: 0.75rem;
        font-size: 0.9375rem;
        width: 100%;
        max-width: 100%;
    }

    .pnae-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
        max-width: 100%;
    }

    .pnae-link {
        font-size: 0.875rem;
    }

    .pnae-auth-footer {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .form-message {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

/* Telas muito pequenas */
@media (max-width: 400px) {
    .pnae-branding {
        padding: 1.5rem 1rem;
    }

    .vertical-line {
        height: 30px;
    }

    .main-title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.8125rem;
    }

    .partner-logo {
        width: 70px;
        height: 70px;
        padding: 0.875rem;
    }

    .pnae-auth-forms {
        padding: 1.25rem 0.875rem 1.5rem 0.875rem;
    }

    .pnae-tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .pnae-form-group input {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .pnae-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible */
.pnae-tab:focus-visible,
.pnae-btn:focus-visible,
.pnae-link:focus-visible {
    outline: 2px solid var(--pnae-blue);
    outline-offset: 2px;
}
