/*
 * Reis e Oliveira Advocacia — estilos globais compartilhados
 * (variáveis, reset, animações, header/nav, botões, whatsapp flutuante, footer)
 * Usado por: index.html, contato.html, direito-bancario.html, direito-digital.html,
 * direito-imobiliario.html, direito-previdenciario.html
 * Estilos específicos de cada página continuam no <style> de cada arquivo.
 */

/* Variáveis de cores - Tema Preto e Dourado */
:root {
    --primary: #000000;
    --secondary: #121212;
    --accent: #D4AF37;
    --accent-light: #FFD700;
    --accent-dark: #B8860B;
    --text: #FFFFFF;
    --text-secondary: #CCCCCC;
    --card-bg: #1A1A1A;
    --border: #333333;
    --white: #FFFFFF;
    --accent-rgb: 212, 175, 55;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--primary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 6rem 0;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(var(--accent-rgb), 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Header premium */
header {
    background-color: rgba(0, 0, 0, 0.95);
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
}

header.scrolled {
    padding: 0.8rem 0;
    background-color: rgba(0, 0, 0, 0.98);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    animation: fadeInLeft 1s ease;
}

.logo-img {
    height: 130px;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.3));
    transition: height 0.4s ease;
}

header.scrolled .logo-img {
    height: 85px;
}

.logo span {
    color: var(--accent);
    position: relative;
}

.logo span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.logo:hover span::after {
    transform: scaleX(1);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
    position: relative;
}

nav ul li a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--accent);
}

nav ul li a.active::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu:hover {
    color: var(--accent);
    transform: scale(1.1);
}

/* Botões */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary);
    padding: 18px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.4);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s;
}

.btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.6);
}

.btn:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--accent);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--primary);
}

.btn-whatsapp {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.4);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.btn-whatsapp:hover {
    box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.6);
    color: var(--primary);
}

.btn-whatsapp i {
    color: var(--primary);
}

/* Botão WhatsApp Flutuante */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.5);
    z-index: 1000;
    animation: pulse 2s infinite;
    transition: all 0.4s ease;
    text-decoration: none !important;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.7);
}

.whatsapp-float i {
    font-size: 35px;
    color: var(--primary);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary) 0%, #1a1a1a 100%);
    color: var(--text);
    padding: 4rem 0 2rem;
    position: relative;
    border-top: 1px solid var(--border);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><g fill="%23D4AF37" fill-opacity="0.02"><path d="M0,0 L100,100 M100,0 L0,100"/></g></svg>');
    pointer-events: none;
}

footer h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsividade comum (header/nav/menu mobile) */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo-img {
        height: 75px;
    }

    header.scrolled .logo-img {
        height: 60px;
    }

    nav {
        width: 100%;
        margin-top: 1rem;
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid var(--border);
    }

    nav ul li a {
        display: block;
        padding: 1rem 0;
    }

    .mobile-menu {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
}
