/* ==========================================================================
   SEGUROS ALFA - FRONTEND STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #013D38;
  --primary-hover: #012b27;
  --primary-light: #EBF7F5;
  --primary-tint: #D6EFEA;
  --secondary: #008375;
  --accent: #22c55e;
  
  --text-main: #1A1A1A;
  --text-muted: #555555;
  --text-light: #71717A;
  --text-white: #FFFFFF;
  
  --bg-body: #FFFFFF;
  --bg-light: #F4FBF9;
  --bg-section: #EBF7F5;
  --bg-card: #FFFFFF;
  
  --card-purple: #F3EEF8;
  --card-blue: #EAF4F8;
  --card-yellow: #F7F7EB;
  --card-teal: #EAF6F3;
  
  --border-color: #E2E8F0;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-radius-xl: 28px;
  --border-radius-pill: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(1, 61, 56, 0.04);
  --shadow-md: 0 4px 16px rgba(1, 61, 56, 0.08);
  --shadow-lg: 0 10px 25px rgba(1, 61, 56, 0.12);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Hind', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo img {
  height: 38px;
  width: auto;
}

/* Segments tabs */
.segment-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: transparent;
}

.segment-tab {
  padding: 8px 18px;
  border-radius: var(--border-radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.segment-tab:hover {
  color: var(--primary);
  background-color: #f3f4f6;
}

.segment-tab.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* Top action buttons */
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1.5px solid var(--primary);
  border-radius: var(--border-radius-pill);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  background-color: transparent;
  transition: var(--transition);
}

.btn-header-action:hover {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-header-action img,
.btn-header-action svg {
  width: 18px;
  height: 18px;
}

/* Sub-Navigation & Search Bar */
.sub-nav-wrapper {
  background-color: var(--primary-light);
  border-top: 1px solid rgba(1, 61, 56, 0.08);
}

.sub-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links li a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.nav-links li a:hover {
  background-color: var(--primary-tint);
}

.nav-search {
  position: relative;
  width: 320px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--primary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border-radius: var(--border-radius-pill);
  border: 1px solid transparent;
  background-color: #FFFFFF;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(1, 61, 56, 0.15);
}

.search-input::placeholder {
  color: var(--text-light);
}

/* Mobile Header Controls */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-light);
  font-size: 1.25rem;
}

/* Mobile Offcanvas Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background-color: #FFFFFF;
  z-index: 2000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transition: left 0.35s ease-in-out;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   HERO BANNER (ESTILO OFICIAL SEGUROS ALFA)
   ========================================================================== */

.hero-section {
  position: relative;
  background: #FFFFFF;
  padding: 24px 0 36px;
}

.alfa-hero-banner {
  background: #EAF7F4;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.alfa-banner-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 420px;
  align-items: center;
}

.alfa-banner-info {
  padding: 48px 48px 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.alfa-banner-info h1 {
  font-size: 2.35rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.alfa-banner-info p {
  font-size: 1.05rem;
  color: #374151;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alfa-banner-contact {
  margin-bottom: 28px;
  font-size: 0.98rem;
  color: #1F2937;
}

.alfa-banner-contact div {
  margin-bottom: 6px;
}

.alfa-banner-contact strong {
  font-weight: 700;
  color: #111827;
}

.alfa-banner-action {
  display: flex;
}

.btn-alfa-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background-color: var(--primary);
  color: #FFFFFF;
  border-radius: var(--border-radius-pill);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(1, 61, 56, 0.25);
  transition: var(--transition);
}

.btn-alfa-cta:hover {
  background-color: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(1, 61, 56, 0.35);
}

.alfa-banner-media {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(circle at center, #025952 0%, #013D38 100%);
  border-radius: 200px 0 0 200px;
  overflow: hidden;
}

.alfa-banner-media img {
  max-height: 400px;
  width: auto;
  object-fit: cover;
  transform: scale(1.02);
}

/* Slider Controls */
.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  z-index: 10;
  transition: var(--transition);
}

.slider-nav-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.slider-prev {
  left: 2px;
}

.slider-next {
  right: 2px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--border-radius-pill);
  background-color: #CBD5E1;
  cursor: pointer;
  transition: var(--transition);
}

.slider-dot.active {
  background-color: var(--primary);
  width: 28px;
}

/* ==========================================================================
   SECTION HEADERS (Pill Accent)
   ========================================================================== */

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-pill-bar {
  width: 4px;
  height: 24px;
  background-color: var(--secondary);
  border-radius: 4px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   QUICK HELP CARDS (¿En qué te ayudamos hoy?)
   ========================================================================== */

.section-help {
  padding: 20px 0 48px;
}

.help-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.help-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.help-card-purple { background-color: var(--card-purple); }
.help-card-blue   { background-color: var(--card-blue); }
.help-card-yellow { background-color: var(--card-yellow); }
.help-card-teal   { background-color: var(--card-teal); }

.help-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.help-card-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.help-card-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.help-card-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.help-card-arrow {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.help-card:hover .help-card-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   PRODUCTS SECTION (Productos para ti)
   ========================================================================== */

.section-products {
  padding: 48px 0;
  background-color: var(--bg-section);
  border-radius: var(--border-radius-xl);
  margin-bottom: 48px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.product-card {
  background: #FFFFFF;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background-color: #E2E8F0;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img img {
  transform: scale(1.06);
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.product-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 20px;
}

.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}

.product-card-link:hover {
  color: var(--secondary);
}

.products-footer {
  text-align: center;
}

.btn-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
}

.btn-secondary-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   NEWS SECTION (Últimas novedades)
   ========================================================================== */

.section-news {
  padding: 20px 0 54px;
}

.news-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.news-card {
  background: var(--bg-light);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  transition: var(--transition);
  border: 1px solid rgba(1, 61, 56, 0.05);
}

.news-card:hover {
  background: #FFFFFF;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-tint);
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 16px;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.news-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.news-card:hover .news-card-link svg {
  transform: translateX(4px);
}

/* ==========================================================================
   WHY CHOOSE US SECTION (¿Por qué elegir Seguros Alfa?)
   ========================================================================== */

.section-why-us {
  padding: 20px 0 48px;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.why-us-card {
  background-color: var(--primary);
  color: #FFFFFF;
  border-radius: var(--border-radius-xl);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.why-us-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.why-us-icon-wrapper {
  flex-shrink: 0;
}

.why-us-icon-wrapper img {
  height: 64px;
  width: auto;
}

.why-us-text {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  color: #E2E8F0;
}

/* ==========================================================================
   ALLIES CAROUSEL (Nuestros aliados)
   ========================================================================== */

.section-allies {
  padding: 20px 0 60px;
}

.allies-wrapper {
  background: #FFFFFF;
  padding: 24px 0;
  overflow: hidden;
  position: relative;
}

.allies-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 24px;
}

.ally-item {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(10%);
  opacity: 0.9;
  transition: var(--transition);
}

.ally-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.ally-item img {
  max-height: 42px;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 992px) {
  .allies-track {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .allies-track {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: #EBF7F5;
  border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
  padding: 56px 0 32px;
  margin-top: 40px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 220px repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 48px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.superfinanciera-badge img {
  max-width: 140px;
  height: auto;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.social-link img {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background: var(--primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
}

.footer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-menu li a {
  font-size: 0.92rem;
  color: #374151;
  transition: var(--transition);
}

.footer-menu li a:hover {
  color: var(--primary);
  font-weight: 600;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(1, 61, 56, 0.12);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FLOATING ACCESSIBILITY WIDGET
   ========================================================================== */

.floating-accessibility-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 54px;
  height: 54px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(1, 61, 56, 0.35);
  cursor: pointer;
  z-index: 999;
  transition: var(--transition);
}

.floating-accessibility-btn:hover {
  transform: scale(1.08);
  background-color: var(--primary-hover);
}

.floating-accessibility-btn svg {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .help-cards-grid,
  .products-grid,
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .why-us-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .hero-slide-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-image-wrapper {
    border-radius: var(--border-radius-xl);
    height: 320px;
  }
}

@media (max-width: 768px) {
  .segment-tabs,
  .top-actions,
  .nav-links,
  .nav-search {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }

  .hero-section {
    padding: 12px 0 24px;
  }

  .hero-slider-container {
    padding: 0 12px;
  }

  .alfa-hero-banner {
    border-radius: var(--border-radius-lg);
  }

  .alfa-banner-grid {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .alfa-banner-info {
    order: 1;
    padding: 24px 18px 20px;
    text-align: left;
  }

  .alfa-banner-info h1 {
    font-size: 1.8rem;
    line-height: 1.25;
    margin-bottom: 20px;
  }

  .btn-alfa-cta {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    text-align: center;
  }

  .alfa-banner-media {
    order: 2;
    width: 100%;
    height: 220px;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    background: radial-gradient(circle at center, #025952 0%, #013D38 100%);
  }

  .alfa-banner-media img {
    max-height: 220px;
  }
  
  .help-cards-grid,
  .products-grid,
  .news-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .slider-nav-btn {
    display: none;
  }
}
