/**
 * THROW CONSULTORIA EM LEILÕES
 * Layout Components (Header, Footer, Hero)
 * Based on official brand guide by Caroline Almeida
 * Last updated: 2025-11-17 - Menu mobile fix v4 (corrigido overlay)
 */

/* =================================== */
/* 1. HEADER / NAVIGATION              */
/* =================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(31, 36, 36, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(111, 189, 177, 0.1);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: rgba(31, 36, 36, 0.98);
}

.header-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 20px var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform var(--transition-base);
}

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

.header-logo-desktop {
  height: 40px;
  width: auto;
}

.header-logo-mobile {
  display: none;
  height: 40px;
  width: auto;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.header-nav a {
  color: var(--throw-white);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-base);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--throw-gradient-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.header-nav a:hover {
  color: var(--throw-turquoise);
}

.header-nav a:hover::after,
.header-nav a.active::after {
  transform: scaleX(1);
}

.header-nav a.active {
  color: var(--throw-turquoise);
}

/* CTA Button in Header */
.header-cta {
  margin-left: var(--space-lg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--throw-white);
  cursor: pointer;
  padding: var(--space-sm);
  position: relative;
  z-index: 1002;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Hamburger Icon */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 24px;
  height: 24px;
  justify-content: center;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--throw-white);
  transition: all var(--transition-base);
}

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

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

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

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(31, 36, 36, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
  overflow-y: auto;
  padding-top: 80px;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s 0s;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-lg);
  gap: var(--space-lg);
  min-height: 100%;
}

.mobile-nav a {
  color: #FFFFFF;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  padding: var(--space-md) var(--space-lg);
  background: rgba(111, 189, 177, 0.15);
  border: 1px solid rgba(111, 189, 177, 0.3);
  border-radius: 8px;
  transition: all var(--transition-base);
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #FFFFFF;
  background: rgba(111, 189, 177, 0.25);
  border-color: var(--throw-turquoise);
}

/* =================================== */
/* 2. FOOTER                           */
/* =================================== */

.footer {
  background: var(--throw-dark);
  color: var(--throw-white);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  border-top: 1px solid rgba(111, 189, 177, 0.2);
}

.footer-container {
  max-width: var(--container-xl);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

/* Footer Brand Section */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-logo {
  height: 50px;
  width: auto;
}

.footer-description {
  color: var(--throw-gray-400);
  line-height: var(--line-height-relaxed);
  max-width: 300px;
}

/* Footer Sections */
.footer-section h4 {
  color: var(--throw-white);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--throw-gradient-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--throw-gray-400);
  text-decoration: none;
  transition: all var(--transition-base);
  padding: var(--space-xs) 0;
}

.footer-links a:hover {
  color: var(--throw-turquoise);
  padding-left: var(--space-sm);
}

/* Contact Info */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  color: var(--throw-gray-400);
}

.footer-contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--throw-turquoise);
  margin-top: 2px;
}

/* Social Media Icons */
.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(111, 189, 177, 0.1);
  border-radius: var(--border-radius-md);
  color: var(--throw-turquoise);
  text-decoration: none;
  transition: all var(--transition-base);
}

.footer-social a:hover {
  background: var(--throw-gradient-primary);
  color: var(--throw-white);
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 20px;
  height: 20px;
}

/* Footer Bottom */
.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(111, 189, 177, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.footer-copyright {
  color: var(--throw-gray-500);
  font-size: var(--font-size-sm);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  color: var(--throw-gray-500);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-bottom-links a:hover {
  color: var(--throw-turquoise);
}

/* =================================== */
/* 3. HERO SECTION                     */
/* =================================== */

.hero-premium {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--throw-dark);
  overflow: hidden;
  padding: 100px var(--space-lg) 60px;
}

/* Animated Gradient Orbs Background */
.hero-background {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float-slow 20s infinite ease-in-out;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7ECDC3 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation-duration: 20s;
}

.gradient-orb-2 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, #35554F 0%, transparent 70%);
  bottom: -300px;
  left: -300px;
  animation-duration: 25s;
  animation-direction: reverse;
}

.gradient-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #6FBDB1 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
}

@keyframes float-slow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container-xl);
  margin: 0 auto;
  width: 100%;
}

.hero-label {
  display: inline-block;
  color: var(--throw-turquoise);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-left: 50px;
}

.hero-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 2px;
  background: var(--throw-gradient-primary);
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  color: var(--throw-white);
  margin-bottom: var(--space-xl);
  max-width: 900px;
}

.hero-description {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--throw-gray-300);
  margin-bottom: var(--space-2xl);
  max-width: 700px;
}

/* Hero Actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

/* Trust Indicators / Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(111, 189, 177, 0.2);
  max-width: 700px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stat-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  background: var(--throw-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--throw-gray-400);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

/* =================================== */
/* 4. SECTIONS                         */
/* =================================== */

.section {
  padding: var(--space-4xl) var(--space-lg);
}

.section-dark {
  background: var(--throw-dark);
  color: var(--throw-white);
}

.section-light {
  background: var(--throw-white);
  color: var(--throw-dark);
}

.section-cream {
  background: var(--throw-cream);
  color: var(--throw-dark);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
}

.section-title p {
  font-size: var(--font-size-lg);
  color: var(--throw-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  max-width: var(--container-xl);
  margin: 0 auto;
}

/* =================================== */
/* 5. RESPONSIVE DESIGN                */
/* =================================== */

/* Tablet and below */
@media (max-width: 1023px) {
  /* Header */
  .header-logo-desktop {
    display: none;
  }

  .header-logo-mobile {
    display: block;
  }

  .header-nav,
  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 767px) {
  /* Hero */
  .hero-premium {
    padding: 80px var(--space-md) 40px;
    min-height: auto;
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-description {
    font-size: var(--font-size-base);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Gradient orbs smaller on mobile */
  .gradient-orb-1 {
    width: 300px;
    height: 300px;
  }

  .gradient-orb-2 {
    width: 400px;
    height: 400px;
  }

  .gradient-orb-3 {
    width: 200px;
    height: 200px;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Section spacing */
  .section {
    padding: var(--space-3xl) var(--space-md);
  }
}

/* Body lock when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}