/* 
  Design System for Prévia Seguros
  Premium, Trustworthy, Modern
*/

:root {
  --primary: #002B5B; /* Deep Navy */
  --secondary: #1A5F7A; /* Ocean Blue */
  --accent: #D4AF37; /* Premium Gold */
  --text-dark: #1A1A1A;
  --text-light: #F5F5F5;
  --bg-light: #FFFFFF;
  --bg-soft: #F8FAFC;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Space for the fixed header */
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 43, 91, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0, 43, 91, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 43, 91, 0); }
}

.cta-btn.header-cta {
  animation: pulse 2s infinite;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10001;
  pointer-events: none;
  transition: var(--transition);
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent); /* Gradient for visibility */
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 10%;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: white; /* Default white for dark hero */
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  pointer-events: auto;
}

header.scrolled .logo {
  color: var(--primary);
}

/* Logo image variants — dark (default/hero) & light (scrolled) */
.logo-img {
  height: 44px;
  border-radius: 6px;
  object-fit: contain;
  transition: var(--transition);
}

.logo-img--light {
  display: none; /* hidden on dark hero */
}

header.scrolled .logo-img--dark {
  display: none; /* hide dark logo on white header */
}

header.scrolled .logo-img--light {
  display: block; /* show light logo on white header */
}

/* Hide text span in header — the logo image already contains the name */
header .logo span {
  display: none;
}

/* Footer logo */
.footer-logo {
  color: white;
}

.footer-logo-icon {
  height: 38px;
  border-radius: 6px;
  object-fit: contain;
}

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

nav a {
  text-decoration: none;
  color: white; /* Visible on dark background */
  font-weight: 600;
  transition: var(--transition);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
}

header.scrolled nav a {
  color: var(--text-dark);
  text-shadow: none;
}

nav a:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}

header.scrolled nav a:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  pointer-events: auto;
}

.mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

header.scrolled .mobile-menu-toggle {
  color: var(--primary);
}

.cta-btn {
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid rgba(255,255,255,0.3); /* Added border for visibility */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cta-btn:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), url('insurance_hero_v2.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 10%;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Sections */
section {
  padding: 100px 10%;
}

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

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-list {
  list-style: none;
  margin-top: 2rem;
}

.about-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-list i {
  color: var(--primary);
}

@media (max-width: 968px) {
  .about-list li {
    justify-content: center;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-10px);
  border-bottom: 4px solid var(--accent);
}

.service-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

/* Contact Form */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  background: var(--bg-soft);
  border-radius: 30px;
  padding: 4rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 43, 91, 0.1);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23002B5B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 80px 10% 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4rem;
  margin-bottom: 60px;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--accent);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 40px;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2000;
  transform: translateY(150%);
  transition: transform 0.5s ease-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

/* Mobile Fixes & Refinements */
@media (max-width: 968px) {
  section {
    padding: 60px 20px;
  }

  .hero {
    height: auto;
    min-height: 100svh; /* Dynamic viewport height */
    padding: 100px 20px 40px; /* Reduced padding-top to keep content higher */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero h1 { 
    font-size: clamp(2rem, 8vw, 2.5rem); /* Fluid typography */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    width: 100%;
  }

  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    width: 100%;
    opacity: 0.95;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
    margin-top: 1rem;
  }

  .cta-btn {
    width: 100%;
    max-width: 280px; /* More compact for mobile */
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  header { 
    padding: 0.7rem 15px;
    background: rgba(0, 43, 91, 0.95);
    backdrop-filter: blur(10px);
  }

  .header-right {
    gap: 0.8rem;
  }

  .mobile-menu-toggle {
    display: block; /* Show on mobile */
  }

  nav#nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 80%;
    height: 100vh;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    z-index: 999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  }

  nav#nav-menu.active {
    right: 0; /* Slide in */
    z-index: 10001;
  }

  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
  }

  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  nav#nav-menu ul {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  nav#nav-menu ul li a {
    font-size: 1.5rem;
    color: white;
    text-shadow: none;
  }

  header .cta-btn.header-cta {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    max-width: fit-content;
    border-radius: 10px;
    margin: 0;
  }

  .logo-img {
    height: 32px;
  }

  .logo span { 
    font-size: 0.85rem; 
  }

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

  .service-card {
    padding: 1.5rem;
  }

  .service-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .contact-container { 
    grid-template-columns: 1fr; 
    padding: 30px 20px;
    gap: 30px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .stat-card {
    padding: 1.5rem 10px;
  }

  .stat-card h3 {
    font-size: 2rem;
  }

  .stat-card p {
    font-size: 0.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-col ul {
    align-items: center;
    padding: 0;
  }

  .footer-col li {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Pós-Acidente — mobile */
  .pos-acidente-container {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  .pos-acidente-icon-wrap {
    display: none; /* hide decorative icon on small screens */
  }

  .pos-acidente-list ul li {
    font-size: 0.95rem;
  }

  .pos-acidente-cta {
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto 0;
  }
}

/* ============================================================
   Outline CTA Button (Hero — second button)
   ============================================================ */
.cta-btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.85);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.cta-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  border-color: white;
}

/* ============================================================
   Service Card — highlight variant (Assessoria)
   ============================================================ */
.service-card--highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  position: relative;
  overflow: hidden;
}

.service-card--highlight::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.service-card--highlight h3,
.service-card--highlight p {
  color: white;
}

.service-card--highlight i {
  color: var(--accent);
}

.service-card--highlight:hover {
  border-bottom: 4px solid var(--accent);
  transform: translateY(-10px);
}

/* ============================================================
   Pós-Acidente Section
   ============================================================ */
.pos-acidente-section {
  background: var(--bg-soft);
}

.pos-acidente-container {
  display: flex;
  align-items: center;
  gap: 4rem;
  background: white;
  border-radius: 30px;
  padding: 4rem;
  box-shadow: var(--shadow);
  max-width: 1200px;
  margin: 0 auto;
}

.pos-acidente-list {
  flex: 1;
}

.pos-acidente-list h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.pos-acidente-list ul {
  list-style: none;
  margin-bottom: 2rem;
}

.pos-acidente-list ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-dark);
  line-height: 1.5;
}

.pos-acidente-list ul li i {
  color: var(--primary);
  margin-top: 3px;
  flex-shrink: 0;
}

.pos-acidente-cta {
  margin-top: 0.5rem;
}

/* Decorative icon column */
.pos-acidente-icon-wrap {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 43, 91, 0.25);
}

.pos-acidente-icon {
  font-size: 6rem;
  color: var(--accent);
}
