/* ========================================
   INDEX CSS RESPONSIVO - MELHORADO
   Estilos globais e utilitários responsivos
======================================== */

/* ========================================
   RESET E CONFIGURAÇÕES GLOBAIS
======================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

input {
    pointer-events: auto;
}

input[title] {
    title: "";
}

input:hover:after {
    display: none !important;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Blinker', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #374151;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   BOTÕES RESPONSIVOS
======================================== */
.btn-register {
    background: linear-gradient(135deg, #1e97df 0%, #1976d2 100%);
    color: #ffffff;
    padding: clamp(0.5rem, 1.5vw, 0.5rem) clamp(1rem, 3vw, 1.3125rem);
    border-radius: 6px;
    text-decoration: none;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30, 151, 223, 0.3);
}

.btn-register:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 151, 223, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #1e97df 0%, #1976d2 100%);
    color: #ffffff;
    padding: clamp(0.75rem, 2vw, 0.8125rem) clamp(1rem, 3vw, 1.4375rem);
    border-radius: 6px;
    text-decoration: none;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30, 151, 223, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 151, 223, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    padding: clamp(0.75rem, 2vw, 0.8125rem) clamp(1rem, 3vw, 1.5625rem);
    border: 2px solid #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #1e97df;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* ========================================
   DROPDOWN DE IDIOMA RESPONSIVO (MODIFICADO)
======================================== */
.lang-dropdown {
    position: fixed;
    /* MODIFICADO: Movido para o canto inferior direito */
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1001;
    font-size: 0.75rem;
    font-family: "Poppins", sans-serif;
}

#lang-button {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.3125rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
}

#lang-button:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

#lang-button.active {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
}

#lang-list {
    /* MODIFICADO: Ajustes para a lista aparecer para cima */
    position: absolute;
    bottom: calc(100% + 8px);
    /* Posiciona a lista acima do botão com um espaçamento de 8px */
    right: 0;
    margin: 0;
    /* Reset de margem */
    padding: 0.625rem;
    list-style: none;
    background-color: #ffffff;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    min-width: 150px;
    border: none;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    /* MODIFICADO: Animação de baixo para cima */
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    /* Origem da animação */
    transition: all 0.25s ease;
    box-shadow: 0px -8px 25px rgba(0, 0, 0, 0.15);
    /* Sombra ajustada para cima */
}

#lang-list.show {
    opacity: 1;
    visibility: visible;
    /* MODIFICADO: Animação para o estado visível */
    transform: translateY(0) scale(1);
}

#lang-list li {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    color: #1E1E1E;
    user-select: none;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    margin: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

#lang-list li:hover {
    background-color: #f0f0f0;
}

#lang-list svg {
    width: 1.5rem;
    height: 1rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    border-radius: 2px;
}


/* ========================================
   MODAL RESPONSIVO
======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #000;
    background-color: #f0f0f0;
}

/* ========================================
   NOTIFICAÇÕES RESPONSIVAS
======================================== */
.notification {
    position: fixed;
    bottom: 5.5rem;
    /* Ajustado para não sobrepor o dropdown de idioma */
    right: 1.25rem;
    background-color: #4caf50;
    color: white;
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: calc(100vw - 2.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background-color: #f44336;
}

.notification.warning {
    background-color: #ff9800;
}

.notification.info {
    background-color: #2196f3;
}

/* ========================================
   ANIMAÇÕES RESPONSIVAS
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   ESTADOS DE CARREGAMENTO
======================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1e97df;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* ========================================
   FOOTER RESPONSIVO
======================================== */
.footer {
    background-color: #1f2937;
    padding: clamp(2.5rem, 6vw, 3.75rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    padding: 60px 40px;
    color: #d1d5db;
}

.container-footer {
    padding: 0 104px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.25rem;
    gap: 20px;
}

.footer-brand {
    grid-column: 1;
}

.footer-logo {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: #1e97df;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.footer-tagline {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    line-height: 1.5;
    color: #d1d5db;
    margin-bottom: 1.5rem;
    font-family: 'Montserrat', sans-serif;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 1.25rem;
    height: 1.25rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.footer-section {
    font-family: 'Montserrat', sans-serif;
}

.footer-title {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    color: #ffffff;
}

.contact-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 400;
    color: #9ca3af;
}

.security-icon {
    width: 0.875rem;
    height: 0.75rem;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: clamp(1.5rem, 4vw, 2.5rem);
    border-top: 1px solid #374151;
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 400;
    color: #9ca3af;
    font-family: 'Montserrat', sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ========================================
   MEDIA QUERIES ESPECÍFICAS
======================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .lang-dropdown {
        bottom: 1rem;
        right: 1rem;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2.5rem;
    }
}

/* Mobile Large (481px - 768px) */
@media (max-width: 768px) {
    .lang-dropdown {
        bottom: 0.75rem;
        right: 0.75rem;
    }

    #lang-button {
        width: 2.25rem;
        height: 2.25rem;
    }

    #lang-list {
        min-width: 130px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .notification {
        bottom: 5rem;
        right: 1rem;
        left: 1rem;
        transform: translateY(150px);
        max-width: none;
    }

    .notification.show {
        transform: translateY(0);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        grid-column: 1;
    }

    .social-links {
        justify-content: center;
    }
}

/* Mobile Small (até 480px) */
@media (max-width: 480px) {
    .lang-dropdown {
        bottom: 0.5rem;
        right: 0.5rem;
    }

    #lang-button {
        width: 2rem;
        height: 2rem;
    }

    #lang-list {
        min-width: 120px;
        right: -0.5rem;
    }

    .modal-content {
        margin: 5% auto;
        width: 98%;
        padding: 1.25rem;
    }

    .close {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 1.5rem;
    }

    .notification {
        bottom: 4.5rem;
        right: 0.5rem;
        left: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .btn-register,
    .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Extra Small Mobile (até 360px) */
@media (max-width: 360px) {
    .lang-dropdown {
        bottom: 0.25rem;
        right: 0.25rem;
    }

    #lang-button {
        width: 1.75rem;
        height: 1.75rem;
    }

    #lang-list {
        min-width: 110px;
        right: -0.75rem;
    }

    .modal-content {
        margin: 2% auto;
        width: 99%;
        padding: 1rem;
    }

    .notification {
        bottom: 4.25rem;
        right: 0.25rem;
        left: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .footer-content {
        padding: 0 0.75rem;
        gap: 1.5rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content {
        margin: 2% auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .lang-dropdown {
        bottom: 0.5rem;
        right: 0.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .spinner {
        border-width: 1px;
    }

    .social-link,
    .contact-icon,
    .security-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

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

    .fade-in,
    .slide-in-left,
    .slide-in-right {
        transition: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: #1f2937;
        color: #f9fafb;
    }

    .close {
        color: #d1d5db;
    }

    .close:hover {
        color: #f9fafb;
        background-color: #374151;
    }
}

/* Print Styles */
@media print {

    .lang-dropdown,
    .notification,
    .modal,
    .btn-register,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }

    .footer {
        background: #f9fafb !important;
        color: #000 !important;
    }

    .footer-logo {
        color: #000 !important;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

@media (max-width: 1024px) {
    .container-footer {
        padding: 0 40px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .container-footer {
        padding: 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-logo {
        font-size: 20px;
    }

    .footer-tagline {
        font-size: 14px;
        line-height: 20px;
    }

    .footer-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .contact-item {
        font-size: 14px;
    }

    .security-note {
        font-size: 12px;
    }

    .footer-bottom {
        font-size: 14px;
        padding-top: 30px;
    }
}