/* ===================================
   Avance Caboluz Solar - Landing Page
   
   CORES PRINCIPAIS (editar aqui para mudar em todo o site):
   - Azul Marinho: #1a3a6b (--primary)
   - Dourado: #e6a817 (--secondary)
   - Branco: #ffffff (--background)
   
   =================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #1c2a3d;
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* ---------- CSS Variables (EDITAR CORES AQUI) ---------- */
:root {
  --primary: #1a3a6b;           /* Azul marinho principal */
  --primary-light: #234d8e;     /* Azul mais claro */
  --primary-foreground: #ffffff;/* Texto sobre azul */
  --secondary: #e6a817;         /* Dourado/amarelo */
  --secondary-foreground: #1a3a6b; /* Texto sobre dourado */
  --background: #ffffff;        /* Fundo branco */
  --foreground: #1c2a3d;        /* Texto escuro */
  --card: #f9f7f3;              /* Fundo dos cards */
  --muted: #f5f3ee;             /* Fundo secoes alternadas */
  --muted-foreground: #5a6577;  /* Texto secundario */
  --border: #dde1e8;            /* Bordas */
  --input-border: #dde1e8;      /* Bordas de inputs */
  --radius: 0.75rem;            /* Arredondamento padrao */
  --font-heading: 'Montserrat', system-ui, sans-serif;
}

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

/* ---------- Utilities ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-label {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title {
  font-size: 1.875rem;
  color: var(--foreground);
  margin-top: 0.75rem;
  text-wrap: balance;
}

.section-desc {
  color: var(--muted-foreground);
  margin-top: 1rem;
  max-width: 640px;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--primary-foreground);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

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

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--secondary-foreground);
  font-size: 0.875rem;
}

.header-logo-text span:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  display: block;
  line-height: 1.2;
}

.header-logo-text span:last-child {
  font-size: 0.75rem;
  opacity: 0.7;
  display: block;
  line-height: 1.2;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
}

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

.header-cta {
  display: none;
}

.header-cta a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.header-cta a:hover {
  filter: brightness(1.1);
}

/* Mobile menu */
.menu-toggle {
  display: flex;
  background: none;
  border: none;
  color: var(--primary-foreground);
  cursor: pointer;
  padding: 0.25rem;
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0;
}

.mobile-nav a:hover {
  color: var(--secondary);
}

.mobile-nav .btn-secondary {
  text-align: center;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 107, 0.82);
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 5rem 0;
  width: 100%;
}

.hero-inner {
  max-width: 640px;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-label svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--secondary);
}

.hero-label span {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: 2.25rem;
  color: var(--primary-foreground);
  line-height: 1.15;
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-desc {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  animation: bounce 2s infinite;
}

.hero-scroll:hover {
  color: var(--secondary);
}

.hero-scroll svg {
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ---------- SERVICES ---------- */
.services {
  padding: 5rem 0;
  background: var(--background);
}

.services .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.services .section-header .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.service-card:hover {
  border-color: rgba(230, 168, 23, 0.5);
}

.service-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  background: rgba(230, 168, 23, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: background 0.2s ease;
}

.service-card:hover .service-icon {
  background: rgba(230, 168, 23, 0.2);
}

.service-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
}

.service-card h3 {
  font-size: 1.125rem;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ---------- ADVANTAGES ---------- */
.advantages {
  padding: 5rem 0;
  background: var(--muted);
}

.advantages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.advantages-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.advantage-item {
  display: flex;
  gap: 1rem;
}

.advantage-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.advantage-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary-foreground);
}

.advantage-item h3 {
  font-size: 1rem;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.advantage-item p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.5;
}

.advantages-image {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
}

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

.advantages-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 107, 0.1);
}

.advantages-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  background: rgba(26, 58, 107, 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.advantages-badge-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--secondary-foreground);
  font-size: 1.125rem;
}

.advantages-badge p:first-of-type {
  color: var(--primary-foreground);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}

.advantages-badge p:last-of-type {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

/* ---------- TESTIMONIALS ---------- */
.testimonials-section {
  padding: 5rem 0;
  background: var(--background);
}

.testimonials-section .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-section .section-header h2 {
  font-size: 1.875rem;
  color: var(--primary);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.testimonials-section .section-header p {
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
}

.testimonials-section .section-header .disclaimer {
  font-size: 0.875rem;
  font-style: italic;
  opacity: 0.7;
  margin-top: 0.5rem;
  color: var(--muted-foreground);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.testimonial-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.testimonial-card .stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.quote-wrapper {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 1rem;
}

.quote-wrapper .quote-icon {
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  color: rgba(230, 168, 23, 0.3);
}

.quote-wrapper .quote-text {
  color: var(--foreground);
  line-height: 1.6;
  opacity: 0.8;
}

.testimonial-author {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.testimonial-author .author-name {
  font-weight: 600;
  color: var(--primary);
}

.testimonial-author .author-location {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ---------- GALLERY ---------- */
.gallery-section {
  padding: 5rem 0;
  background: var(--muted);
}

.gallery-section .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-section .section-header h2 {
  font-size: 1.875rem;
  color: var(--primary);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.gallery-section .section-header p {
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 107, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1rem;
  transition: background 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(26, 58, 107, 0.6);
}

.gallery-overlay span {
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 42, 61, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  position: relative;
}

.lightbox-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-caption {
  background: rgba(28, 42, 61, 0.9);
  color: #fff;
  padding: 1rem;
  text-align: center;
  border-radius: 0 0 var(--radius) var(--radius);
}

.lightbox-caption #lightbox-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.lightbox-caption #lightbox-desc {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ---------- CONTACT ---------- */
.contact {
  padding: 5rem 0;
  background: var(--primary);
  color: var(--primary-foreground);
}

.contact .section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact .section-title {
  color: var(--primary-foreground);
}

.contact .section-desc {
  color: rgba(255,255,255,0.7);
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  display: block;
}

.contact-card:hover {
  background: rgba(255,255,255,0.1);
}

.contact-card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(230, 168, 23, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: background 0.2s ease;
}

.contact-card:hover .contact-card-icon {
  background: rgba(230, 168, 23, 0.3);
}

.contact-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--secondary);
}

.contact-card h3 {
  font-size: 0.875rem;
  color: var(--primary-foreground);
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--foreground);
  color: var(--background);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--secondary-foreground);
  font-size: 0.875rem;
}

.footer-logo-text span:first-child {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  display: block;
  line-height: 1.2;
}

.footer-logo-text span:last-child {
  font-size: 0.75rem;
  opacity: 0.6;
  display: block;
  line-height: 1.2;
}

.footer-about p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a,
.footer-links span {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
}

/* ---------- WHATSAPP FLOAT ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #25D366;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
}

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

.whatsapp-float svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: #ffffff;
  flex-shrink: 0;
}

.whatsapp-float-text {
  display: none;
}

/* ---------- RESPONSIVE ---------- */

/* Mobile - 640px */
@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
  
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .whatsapp-float {
    padding: 0.75rem 1.5rem;
  }
  
  .whatsapp-float-text {
    display: inline;
  }
}

/* Tablet - 768px */
@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }

  .header-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-content {
    padding: 8rem 0;
  }

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

  .section-title {
    font-size: 2.25rem;
  }

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

  .testimonials-section .section-header h2,
  .gallery-section .section-header h2 {
    font-size: 2.25rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop - 1024px */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
