/* Melhorias de Responsividade e Acessibilidade para Index.php */

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

/* Skip to content para navegação por teclado */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s;
}

.skip-to-content:focus {
    top: 6px;
    opacity: 1;
}

/* ===== MELHORIAS DE FOCO PARA ACESSIBILIDADE ===== */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Foco específico para botões */
.btn:focus,
button:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 1px rgba(76, 200, 237, 0.3);
}

/* Foco para links */
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ===== ACCORDION ACESSÍVEL ===== */
.accordion-header {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.accordion-header:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.accordion-header[aria-expanded="true"] .accordion-icon:after {
    transform: translateX(-50%) rotate(90deg);
}

/* ===== RESPONSIVE HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 60px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-text .intro-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    background: rgba(4, 74, 117, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 3.0rem);
    margin-bottom: 25px;
    line-height: 1.2;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.95);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablets (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .quem-sou-content,
    .especialidades-content,
    .nosso-espaco-content,
    .localizacao-content {
        gap: 40px;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .beneficios-boxes {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Ajustes do header para tablets */
    .main-nav ul {
        gap: 3px;
    }
    
    .main-nav ul li a {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
}

/* Mobile Large (481px - 768px) */
@media screen and (max-width: 768px) {
    /* Hero Section Mobile */
    .hero-section {
        padding: 100px 0 40px;
        min-height: auto;
        text-align: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-image {
        order: 2;
        max-width: 300px;
        margin: 0 auto;
    }
    
    /* Seções Mobile */
    section {
        padding: 60px 0;
    }
    
    .quem-sou-content,
    .especialidades-content,
    .nosso-espaco-content,
    .localizacao-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    /* Especialidades Mobile - Imagem depois do texto */
    .especialidades-imagem {
        order: 2;
    }
    
    .especialidades-texto {
        order: 1;
        text-align: left;
    }
    
    /* Benefícios Mobile */
    .beneficios-boxes {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Galeria Mobile */
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Accordion Mobile */
    .accordion-header h3 {
        font-size: 1rem;
    }
    
    .accordion-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Mapa Mobile */
    .mapa iframe {
        height: 300px;
    }
    
    /* CTA Mobile */
    .btn.primary-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }
    
    /* Depoimentos Mobile */
    .depoimento-item {
        margin: 5px;
        padding: 20px;
    }
    
    .depoimento-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .depoimento-perfil {
        justify-content: center;
    }
}

/* Mobile Small (320px - 480px) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Hero Mobile Small */
    .hero-section {
        padding: 90px 0 30px;
    }
    
    .hero-text .intro-text {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    /* Seções Mobile Small */
    section {
        padding: 40px 0;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Benefícios Mobile Small */
    .beneficio-box {
        padding: 25px 20px;
    }
    
    .beneficio-box img {
        width: 60px;
        height: 60px;
    }
    
    /* Accordion Mobile Small */
    .accordion-item {
        margin-bottom: 10px;
    }
    
    .accordion-header {
        padding: 15px 20px;
    }
    
    .accordion-header h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .accordion-content {
        font-size: 0.9rem;
        padding: 0 20px 15px;
    }
    
    /* Galeria Mobile Small */
    .galeria-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .galeria-item img {
        height: 180px;
    }
    
    /* Info boxes Mobile Small */
    .info-box {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    /* Contato Mobile Small */
    .contato-rapido p {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .contato-rapido a {
        display: block;
        margin: 5px 0;
    }
    
    /* Progress bars Mobile Small */
    .progresso-item {
        margin-bottom: 20px;
    }
    
    .progresso-titulo {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    /* Depoimentos Mobile Small */
    .depoimento-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .depoimento-nome {
        font-size: 0.95rem;
    }
    
    .depoimento-data {
        font-size: 0.8rem;
    }
    
    .depoimento-texto {
        font-size: 0.9rem;
    }
    
    /* Mapa Mobile Small */
    .mapa iframe {
        height: 250px;
    }
}

/* ===== PERFORMANCE E OTIMIZAÇÕES ===== */

/* Otimizações de imagem */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    /*background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);*/
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

/* ===== MELHORIAS DE INTERAÇÃO TOUCH ===== */

/* Aumentar área de toque para elementos interativos */
.galeria-item,
.accordion-header,
.btn,
a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Touch feedback */
.galeria-item:active,
.accordion-header:active,
.btn:active {
    transform: scale(0.98);
    transition: transform 0.1s;
}

/* ===== SCROLL SMOOTH E PERFORMANCE ===== */
html {
    scroll-behavior: smooth;
}

/* Reduzir motion para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== DARK MODE CONSIDERATIONS ===== */
@media (prefers-color-scheme: dark) {
    .glass-card-modern,
    .info-box,
    .beneficio-box {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .accordion-content {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .btn.primary-btn {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .accordion-header {
        border: 1px solid;
    }
    
    .glass-card-modern {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid #000;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .floating-shapes,
    .preloader,
    .whatsapp-flutuante,
    .back-to-top,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
    }
    
    .hero-text h1 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    section {
        background: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

/* ===== CONTAINER QUERIES (Futuro) ===== */
@supports (container-type: inline-size) {
    .hero-content {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .hero-content {
            grid-template-columns: 1fr;
        }
    }
}

/* ===== STICKY ELEMENTS MOBILE ===== */
@media screen and (max-width: 768px) {
    .whatsapp-flutuante {
        bottom: 20px;
        left: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-flutuante a {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* ===== IMPROVED LOADING STATES ===== */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ===== ENHANCED FORM STYLES (para futuras adições) ===== */
input,
textarea,
select {
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(76, 200, 237, 0.1);
}

/* ===== SECTION SPACING MOBILE ===== */
@media screen and (max-width: 768px) {
    #quem-somos {
        margin-top: -20px; /* Reduzir espaço após hero */
    }
    
    section + section {
        margin-top: -10px; /* Reduzir espaços entre seções */
    }
}

/* ===== ANIMATION PERFORMANCE ===== */
.hero-text,
.hero-image,
.beneficio-box,
.accordion-item {
    will-change: transform;
}

/* Parar animações quando elemento não está visível */
@media (prefers-reduced-motion: no-preference) {
    .intersection-observed {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .intersection-observed.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EMERGENCY ACCESSIBILITY OVERRIDES ===== */
.accessibility-mode {
    --transition: none !important;
}

.accessibility-mode * {
    animation: none !important;
    transition: none !important;
}

.accessibility-mode .floating-shapes {
    display: none !important;
}

/* ===== CRITICAL CSS OPTIMIZATIONS ===== */
/* Inlining critical styles for above-the-fold content */
.hero-section,
.hero-content,
.hero-text,
.hero-image {
    /* Styles já definidos acima, mantidos para clareza */
}

/* ===== NETWORK-AWARE LOADING ===== */
@media (max-width: 768px) and (max-resolution: 1.5dppx) {
    /* Imagens de menor qualidade para dispositivos com tela de menor resolução */
    .hero-image img,
    .quem-sou-imagem img {
        filter: contrast(1.1) brightness(1.05);
    }
}

/* ===== IMPROVED GLASS MORPHISM MOBILE ===== */
@media screen and (max-width: 768px) {
    .glass-card-modern {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        background: rgba(255, 255, 255, 0.85);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    section {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.75);
    }
}

/* Bloco de contato rápido - alinhamento central, ícones à esquerda, espaçamento */
.contato-rapido {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 32px 0 18px 0;
}

.contato-rapido p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.contato-rapido i {
    font-size: 1.3em;
    color: #044A75;
    margin-right: 8px;
    vertical-align: middle;
}

.contato-rapido a {
    color: #1976D2;
    font-size: 1.08em;
    font-style: italic;
    text-decoration: none;
    margin-bottom: 2px;
    transition: color 0.2s;
}

.contato-rapido a:hover {
    color: #4AC8ED;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .contato-rapido {
        margin: 22px 0 12px 0;
        gap: 8px;
    }
    
    .contato-rapido p {
        gap: 7px;
    }
    
    .contato-rapido a {
        font-size: 1em;
    }
}

/* Bloco de contato na seção Localização - alinhamento central, ícones à esquerda, espaçamento */
.localizacao-section .contato-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.localizacao-section .info-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.localizacao-section .info-box h4 {
    font-size: 1.15em;
    color: #044A75;
    margin-bottom: 4px;
    font-weight: 700;
}
.localizacao-section .info-box p,
.localizacao-section .info-box a {
    color: #1976D2;
    font-size: 1.08em;
    font-style: italic;
    text-align: center;
    margin-bottom: 2px;
    text-decoration: none;
    transition: color 0.2s;
}
.localizacao-section .info-box a:hover {
    color: #4AC8ED;
    text-decoration: underline;
}
.localizacao-section .info-box i {
    font-size: 1.2em;
    color: #044A75;
    margin-right: 8px;
    vertical-align: middle;
}
@media (max-width: 600px) {
    .localizacao-section .contato-info {
        gap: 12px;
        margin-bottom: 16px;
    }
    .localizacao-section .info-box {
        gap: 6px;
    }
    .localizacao-section .info-box h4 {
        font-size: 1em;
    }
    .localizacao-section .info-box p,
    .localizacao-section .info-box a {
        font-size: 1em;
    }
}