/* CSS Customizado - PÁDUA Advogados */

/* Variáveis CSS */
:root {
    --padua-navy: #2B2D7B;
    --padua-cyan: #00D4FF;
    --padua-dark: #1a1a2e;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Tipografia Customizada */
.font-playfair {
    font-family: 'Playfair Display', serif;
}

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

/* Logo Styles */
.logo-container {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05);
}

/* Logo em fundos escuros */
.logo-white {
    filter: brightness(0) invert(1);
}

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

@keyframes fadeInDelay {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay2 {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    66% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease-out forwards;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 2s ease-out forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Header Scroll Effect */
.header-scrolled {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navigation Links */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--padua-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section Carousel */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Indicadores do carrossel */
.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: var(--padua-cyan);
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Hero Text com contorno azul marinho (cor do botão Fale Conosco) */
.hero-title {
    text-shadow: 
        0 0 10px rgba(43, 45, 123, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    text-shadow: 
        0 0 8px rgba(43, 45, 123, 0.6),
        1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Hero Section Background Pattern */
.hero-pattern {
    background-image: 
        linear-gradient(45deg, transparent 25%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 75%, transparent 75%),
        linear-gradient(-45deg, transparent 25%, rgba(0, 212, 255, 0.05) 25%, rgba(0, 212, 255, 0.05) 75%, transparent 75%);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
}

/* Cards Hover Effects - Anti-CLS */
.card-hover {
    transition: all 0.3s ease;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: transform; /* Otimização de performance */
}

/* Prevenção de Layout Shift */
img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Containers com dimensões fixas */
.hero-carousel, .team-image-container, .logo-container {
    contain: layout style paint;
}

/* Otimizações de renderização */
.hero-slide, .team-image {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(43, 45, 123, 0.15);
}

/* Form Inputs */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--padua-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Button Animations */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Section Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--padua-navy);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--padua-cyan);
}

/* Loading Animation */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--padua-navy);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Area Cards Icon Animation */
.area-card-icon {
    transition: transform 0.3s ease;
}

.group:hover .area-card-icon {
    transform: rotateY(180deg);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--padua-navy) 0%, var(--padua-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pattern Overlay */
.pattern-overlay {
    position: relative;
}

.pattern-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px
        );
    pointer-events: none;
}

/* Team Cards - Otimizado para CLS */
.team-image-container {
    position: relative;
    height: 16rem; /* 256px - FIXO para evitar layout shift */
    width: 100%; /* Largura fixa */
    background: #f9fafb; /* Fundo neutro claro */
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: 1 / 1; /* Proporção fixa para estabilidade */
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.3s ease;
    display: block; /* Remove espaçamentos inline */
    border: none; /* Remove bordas */
    outline: none; /* Remove outlines */
}

.team-image:hover {
    transform: scale(1.05);
}

/* Fallback para quando a imagem não carrega */
.team-image-placeholder {
    background: linear-gradient(135deg, var(--padua-navy) 0%, #4a4d8f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Ajustes específicos para cada tipo de foto */
.augusto-image {
    object-position: center 15%; /* Para fotos corporativas - foco no rosto */
}

.giovanna-image {
    object-position: center 20%; /* Foco no rosto como os demais */
    object-fit: cover;
    width: 100% !important;
    height: 100% !important;
    transform: scale(1.01); /* Pequeno zoom para eliminar riscos */
}

.guilherme-image {
    object-position: center 25%; /* Para fotos com óculos - posição ideal */
}

.jesse-image {
    object-position: center 20%; /* Foco no rosto */
    image-rendering: -webkit-optimize-contrast; /* Melhora renderização no WebKit */
    image-rendering: crisp-edges; /* Melhora qualidade em redimensionamento */
    transform: scale(1.0); /* Sem zoom para manter qualidade */
}

/* Responsividade para cards da equipe */
@media (max-width: 768px) {
    .team-image-container {
        height: 14rem; /* Menor em mobile */
    }
    
    .team-image {
        object-position: center 15%; /* Ajuste para mobile */
    }
}

/* Mobile Menu Animation */
.mobile-menu-open {
    animation: slideDown 0.3s ease;
}

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

/* Contact Info Icons */
.contact-icon {
    min-width: 30px;
}

/* Footer Link Hover */
footer a {
    transition: color 0.3s ease;
}

/* Success Message */
.success-message {
    background-color: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

/* Error Message */
.error-message {
    background-color: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    section {
        padding: 3rem 0 !important;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .whatsapp-float {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        color: inherit;
        text-decoration: none;
    }
}

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

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--padua-cyan);
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--padua-navy) 0%, #3a3d8f 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--padua-cyan) 0%, #00a8cc 100%);
}

/* Shadow Effects */
.shadow-elegant {
    box-shadow: 0 10px 30px rgba(43, 45, 123, 0.1);
}

.shadow-elegant-hover:hover {
    box-shadow: 0 15px 40px rgba(43, 45, 123, 0.15);
}

/* Line Decorations */
.line-decoration {
    position: relative;
    padding-left: 20px;
}

.line-decoration::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--padua-cyan);
}

/* Number Counters Animation */
.counter {
    display: inline-block;
}

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