/**
 * ============================================
 * ESTILOS PRINCIPAIS - SITE INSTITUCIONAL
 * Advogado Autônomo - Design Profissional
 * ============================================
 * 
 * Paleta de cores:
 * - Azul Escuro (Principal): rgb(26, 58, 82)
 * - Azul Médio (Secundário): rgb(44, 90, 160)
 * - Cinza Escuro (Texto): rgb(51, 51, 51)
 * - Cinza Claro (Background): rgb(245, 245, 245)
 * - Branco: rgb(255, 255, 255)
 */

/* ================================
   RESET E CONFIGURAÇÕES GLOBAIS
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: rgb(51, 51, 51);
    background-color: rgb(255, 255, 255);
}

/* ================================
   VARIÁVEIS CSS
   ================================ */

:root {
    --primary-color: rgb(26, 58, 82);
    --secondary-color: rgb(44, 90, 160);
    --accent-color: rgb(212, 175, 55);
    --text-dark: rgb(51, 51, 51);
    --text-light: rgb(102, 102, 102);
    --bg-light: rgb(245, 245, 245);
    --white: rgb(255, 255, 255);
    --border-color: rgb(224, 224, 224);
    --transition: all 0.3s ease;
    --shadow-light: 0 2px 8px rgba(26, 58, 82, 0.1);
    --shadow-medium: 0 4px 16px rgba(26, 58, 82, 0.15);
    --shadow-heavy: 0 8px 32px rgba(26, 58, 82, 0.2);
}

/* ================================
   CONTAINER
   ================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================
   TIPOGRAFIA
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--primary-color);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 15px;
    color: var(--text-light);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

/* ================================
   BOTÕES
   ================================ */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ================================
   HEADER COM NAVEGAÇÃO FIXA
   ================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: none;
}

@media (min-width: 768px) {
    .logo-text {
        display: inline;
    }
}

/* Navegação */
.nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-medium);
    flex-direction: column;
}

.nav.active {
    display: flex;
}

@media (min-width: 768px) {
    .nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        background-color: transparent;
        box-shadow: none;
        gap: 40px;
    }
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 768px) {
    .nav-list {
        flex-direction: row;
        gap: 40px;
    }
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-dark);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .nav-link {
        padding: 0;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
}

.nav-link:hover {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
}

@media (min-width: 768px) {
    .nav-link:hover {
        border-left: none;
        border-bottom-color: var(--secondary-color);
    }
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 150px 0 100px;
    margin-top: 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -5%;
    width: 500px;
    height: 500px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -10%;
    width: 400px;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--white);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 600px) {
    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas .btn {
        width: 100%;
    }
}

/* ================================
   SEÇÃO SOBRE
   ================================ */

.about {
    padding: 80px 0;
    background-color: var(--white);
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 768px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.about-image {
    position: relative;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    object-fit: cover;
}

.about-content h2 {
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Badges de Credibilidade */
.credentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.credential-item {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.credential-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.credential-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.credential-item span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ================================
   SEÇÃO ÁREAS DE ATUAÇÃO
   ================================ */

.areas {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.text-center {
    text-align: center;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .areas-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards de Áreas */
.area-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
}

.area-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.area-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin: 0 auto 20px;
    transition: var(--transition);
}

.area-card:hover .area-icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.area-icon svg {
    width: 30px;
    height: 30px;
}

.area-title {
    margin: 15px 0;
    color: var(--primary-color);
}

.area-description {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.area-btn {
    background: none;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.area-btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* ================================
   MODAL DAS ÁREAS
   ================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 58, 82, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--white);
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 50px 40px 40px;
}

.modal-body h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-body p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modal-body li {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* ================================
   SEÇÃO DEPOIMENTOS
   ================================ */

.testimonials {
    padding: 80px 0;
    background-color: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

.testimonial-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.testimonial-rating {
    margin-bottom: 20px;
}

.star {
    color: rgb(255, 193, 7);
    font-size: 1.2rem;
    margin-right: 3px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    color: var(--primary-color);
    font-weight: 700;
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ================================
   SEÇÃO LOCALIZAÇÃO
   ================================ */

.location {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.location-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 968px) {
    .location-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.location-map {
    border-radius: 8px;
    box-shadow: var(--shadow-heavy);
    min-height: 400px;
}

.location-info h3 {
    margin-bottom: 20px;
}

.location-details p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* ================================
   SEÇÃO CONTATO
   ================================ */

.contact {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .contact-channels {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    background-color: var(--bg-light);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--secondary-color);
}

.contact-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-top-color: var(--primary-color);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin: 0 auto 20px;
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.contact-icon svg {
    width: 30px;
    height: 30px;
}

.contact-item h3 {
    margin: 15px 0;
    color: var(--primary-color);
}

.contact-item p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.contact-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--secondary-color);
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-color);
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.developer-credit {
    margin-top: 10px;
    font-size: 0.95rem;
}

.developer-credit strong {
    color: var(--accent-color);
    font-weight: 700;
}

/* ================================
   BOTÃO FLUTUANTE WHATSAPP
   ================================ */

.whatsapp {
  display: inline-block;
  margin-top: 12px;
  background: var(--vermelho);
  color: var(--branco);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.25s ease, transform 0.25s ease;
}

.whatsapp:hover {
  background: var(--vermelho-escuro);
  transform: translateY(-2px);
}

.whatsapp-flutuante {
  position: fixed !important;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.24);
  border: 3px solid #ffffff;
  z-index: 9999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-flutuante:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.whatsapp-flutuante svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ================================
   ANIMAÇÕES DE FADE IN E SCROLL REVEAL
   ================================ */

.fade-in {
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.fade-on-scroll.visible {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   RESPONSIVIDADE AJUSTES ADICIONAIS
   ================================ */

@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .areas, .testimonials, .location, .contact {
        padding: 60px 0;
    }

    .about {
        padding: 60px 0;
    }
}

/* ================================
   SCROLL BAR CUSTOMIZADO
   ================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
