/* ============================================
   Advocacia Humberto Feitosa - Main Stylesheet
   Modern Dark Theme | Cubatão - SP
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --gold: #c8a84e;
  --gold-light: #d4b95e;
  --gold-dark: #a88a3e;
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #777777;
  --border-color: #2a2a2a;
  --border-gold: rgba(200, 168, 78, 0.3);
  --shadow-gold: 0 0 30px rgba(200, 168, 78, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

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

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  color: var(--gold);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--gold);
}

.section-title p {
  max-width: 600px;
  margin: 20px auto 0;
}

/* --- Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

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

.logo img {
  height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--gold);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 0;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 24px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  color: var(--gold);
  background: rgba(200, 168, 78, 0.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0d0d0d 50%, #111 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, rgba(200, 168, 78, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-content h1 span {
  color: var(--gold);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 45%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, transparent 100%);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--gold);
  color: #000;
}

.btn-primary:hover {
  background: var(--gold-light);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 168, 78, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold);
  color: #000;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #20bd5a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Sections --- */
section {
  padding: 100px 0;
}

.bg-dark {
  background: var(--bg-secondary);
}

/* --- Services / Areas Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  transform: scaleX(0);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(200, 168, 78, 0.1);
  color: var(--gold);
  font-size: 1.6rem;
}

.service-card h3 {
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 1.2rem;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.service-card .card-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- About / Empresa Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content h2 {
  color: var(--gold);
  margin-bottom: 20px;
}

.about-content p {
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.stat-item .number {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 700;
}

.stat-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 36px;
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
  top: 12px;
  left: 24px;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-info .name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.testimonial-info .role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stars {
  color: var(--gold);
  margin-bottom: 12px;
  font-size: 1rem;
  letter-spacing: 2px;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--border-gold);
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(200, 168, 78, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-text h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.contact-item-text p,
.contact-item-text a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.contact-item-text a:hover {
  color: var(--gold);
}

.contact-map {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
  filter: grayscale(0.5) contrast(1.1);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, rgba(200, 168, 78, 0.08) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.cta-section h2 {
  color: var(--gold);
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 32px;
}

/* --- Footer --- */
.footer {
  background: #000000;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 50px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 360px;
}

.footer h4 {
  color: var(--gold);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 4px 0;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--gold);
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center top, rgba(200, 168, 78, 0.05) 0%, transparent 60%);
}

.page-hero h1 {
  color: var(--gold);
  margin-bottom: 16px;
  position: relative;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 12px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs span {
  margin: 0 8px;
  color: var(--text-muted);
}

/* --- Content Area (inner pages) --- */
.content-area {
  padding: 80px 0;
}

.content-area .content-body {
  max-width: 800px;
  margin: 0 auto;
}

.content-body h2 {
  color: var(--gold);
  margin: 40px 0 16px;
}

.content-body h3 {
  color: var(--text-primary);
  margin: 30px 0 12px;
}

.content-body p {
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}

.content-body ul {
  margin: 16px 0;
  padding-left: 24px;
}

.content-body ul li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.content-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.content-image {
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.content-image img {
  width: 50%;
  margin: 0 auto;
  display: block;
}

/* --- WhatsApp Float Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse-whatsapp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

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

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

/* --- Responsive --- */
@media (max-width: 992px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-image {
    display: none;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    gap: 0;
    transition: var(--transition);
    border-left: 1px solid var(--border-color);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: auto;
  }

  .dropdown-menu a {
    padding: 8px 0;
    border-bottom: none;
  }

  section {
    padding: 60px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-item .number {
    font-size: 1.4rem;
  }

  .hero {
    min-height: 80vh;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* --- Selection --- */
::selection {
  background: rgba(200, 168, 78, 0.3);
  color: var(--text-primary);
}
