/* DESIGN SYSTEM & CORE VARIABLES */
:root {
  --color-primary: #9C1A3C;      /* Brand Burgundy/Maroon */
  --color-secondary: #1D3B8A;    /* Brand Dark Blue */
  --color-accent: #E5B25D;       /* Warm Gold */
  --color-dark: #111827;         /* Neutral dark */
  --color-gray: #4B5563;         /* Neutral gray */
  --color-light-gray: #E5E7EB;   /* Border gray */
  --color-bg-light: #F9FAFB;     /* Page background */
  --color-bg-warm: #FAF8F6;      /* Cozy section background */
  --color-white: #FFFFFF;
  
  --font-headings: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(156, 26, 60, 0.12);
  --shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.15);
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-light);
  color: var(--color-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
}

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

ul {
  list-style: none;
}

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

section {
  padding: 100px 20px;
  position: relative;
  overflow: hidden;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2.5rem;
  color: var(--color-secondary);
  margin-bottom: 15px;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  margin: 0 auto 20px auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-gray);
}

/* LOGO CUSTOM STYLING */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-img {
  height: 56px; /* Make the horizontal brand logo appear larger and clearer */
  width: auto;  /* Allow width to scale proportionally for horizontal logos */
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-brand-buena {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--color-primary);
  font-style: italic;
}

.logo-brand-vida {
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--color-secondary);
  font-style: italic;
  margin-top: -6px;
}

.logo-tagline {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary); /* Dark blue from brand logo */
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.tagline-vida {
  color: var(--color-primary); /* Burgundy from brand logo */
  font-style: italic;
  font-weight: 800;
}

/* HEADER & NAVIGATION */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

.nav-menu ul {
  display: flex;
  gap: 30px;
}

.nav-item {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-gray);
  padding: 8px 4px;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  transition: var(--transition-fast);
  border-radius: 2px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--color-primary);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}



.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 5px;
}

/* Mobile Dropdown Nav */
.mobile-nav {
  display: none;
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-light-gray);
  padding: 15px 20px;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-nav-item {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-gray);
  display: block;
}

.mobile-nav-item:hover {
  color: var(--color-primary);
}



/* HERO SECTION */
.hero-section {
  padding-top: 180px;
  padding-bottom: 150px;
  background: linear-gradient(135deg, #102454 0%, #1D3B8A 45%, #9C1A3C 100%);
  color: var(--color-white);
  text-align: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  background-color: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.8rem;
  margin-bottom: 20px;
  line-height: 1.15;
}

.highlight-vida {
  color: var(--color-accent);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 45px;
  max-width: 720px;
  line-height: 1.6;
}

/* Interactive Search Box */
.search-wrapper {
  width: 100%;
  max-width: 650px;
}

.search-box {
  background-color: var(--color-white);
  border-radius: 100px;
  padding: 6px 6px 6px 24px;
  display: flex;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.search-icon {
  color: var(--color-gray);
  font-size: 1.2rem;
  margin-right: 15px;
}

.search-box input {
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: var(--font-body);
  color: var(--color-dark);
  flex-grow: 1;
  background: transparent;
}

.search-box input::placeholder {
  color: #9CA3AF;
}

.search-btn {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

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

.search-tags {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.search-tag {
  color: var(--color-white);
  background-color: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 500;
}

.search-tag:hover {
  background-color: rgba(255,255,255,0.25);
}

/* Wave Separator shape */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.hero-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

.hero-wave .shape-fill {
  fill: var(--color-bg-light);
}

/* CATEGORIES GRID SECTION */
.categories-section {
  background-color: var(--color-bg-light);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

/* Dynamic Cards Styles */
.category-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.category-image-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.category-badge-count {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(29, 59, 138, 0.85); /* Secondary blue translucent */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--color-white);
  padding: 6px 14px;
  border-radius: 50px;
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.1);
  transform: translate3d(0, 0, 0); /* Fix Chromium rendering/disappearing bugs during transitions */
}

.category-overlay-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 60%);
  opacity: 0.8;
  transition: var(--transition-smooth);
  z-index: 1;
}

.category-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.category-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: rgba(156, 26, 60, 0.06); /* primary light tint */
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: absolute;
  top: -27px;
  left: 30px;
  z-index: 5;
  box-shadow: 0 8px 16px rgba(156, 26, 60, 0.1);
  transition: var(--transition-smooth);
}

.category-name {
  font-size: 1.4rem;
  color: var(--color-secondary);
  margin-top: 10px;
  margin-bottom: 12px;
}

.category-desc {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-bottom: 8px;
}

.category-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.category-link {
  font-family: var(--font-headings);
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  margin-top: auto;
}

.category-link i {
  transition: var(--transition-fast);
}

/* Micro-animations on Card Hover */
.category-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(156, 26, 60, 0.1);
}

.category-card:hover .category-img {
  transform: scale(1.08);
}

.category-card:hover .category-overlay-effect {
  opacity: 0.4;
}

.category-card:hover .category-icon-wrapper {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 10px 20px rgba(156, 26, 60, 0.3);
}

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

.category-card:hover .category-link i {
  transform: translateX(6px);
}

/* HOW IT WORKS SECTION */
.how-it-works {
  background-color: var(--color-bg-warm);
}

.steps-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
}

.step-card {
  flex: 1;
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  padding: 40px 30px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.02);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(29, 59, 138, 0.3);
}

.step-icon-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(29, 59, 138, 0.05);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 25px auto;
}

.step-card h3 {
  font-size: 1.3rem;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--color-gray);
}

/* FEATURED BENEFITS */
.featured-benefits {
  background-color: var(--color-bg-light);
}

.benefits-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.benefit-promo-card {
  background: linear-gradient(135deg, #FAF4F5 0%, #FFFFFF 100%);
  border-left: 6px solid var(--color-primary);
  border-radius: var(--border-radius-sm);
  padding: 30px;
  position: relative;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.benefit-promo-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.promo-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
}

.promo-category {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 8px;
}

.benefit-promo-card h3 {
  font-size: 1.35rem;
  color: var(--color-secondary);
  margin-bottom: 8px;
  padding-right: 60px; /* Space for badge */
}

.benefit-promo-card p {
  color: var(--color-gray);
  font-size: 0.95rem;
  margin-bottom: 25px;
}

.promo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--color-light-gray);
  padding-top: 15px;
}

.promo-footer span {
  font-size: 0.85rem;
  color: #7c889a;
  font-weight: 500;
}

.promo-btn {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-secondary);
}

.promo-btn:hover {
  color: var(--color-primary);
}



/* FOOTER STYLING */
.main-footer {
  background-color: #0F172A;
  color: #94A3B8;
  padding: 80px 20px 30px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-brand-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  filter: brightness(0) invert(1); /* Clean white logo in footer */
  width: 48px;  /* Keep the footer logo at its original square dimensions */
  height: 48px;
}

.footer-tagline {
  color: #94A3B8 !important; /* Readable light slate on dark footer */
  font-size: 1rem;
}

.footer-tagline .tagline-vida {
  color: var(--color-accent) !important; /* Elegant warm gold highlight on dark background */
}

.footer-description {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.footer-socials a:hover {
  background-color: var(--color-primary);
  transform: translateY(-3px);
}

.footer-links-col h4,
.footer-contact-col h4 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-links-col h4::after,
.footer-contact-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-primary);
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col a {
  font-size: 0.95rem;
}

.footer-links-col a:hover {
  color: var(--color-white);
  padding-left: 5px;
}

.footer-contact-col p {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.footer-contact-col p i {
  color: var(--color-primary);
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 30px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748B;
}

/* FEATURED PARTNERS SUBSECTION */
.partners-subsection {
  margin-top: 80px;
  padding-top: 80px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.partners-header {
  margin-bottom: 40px;
}

.partners-title {
  font-size: 2rem;
  color: var(--color-secondary);
  margin-bottom: 15px;
}

.partners-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  margin: 0 auto 20px auto;
  border-radius: 2px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  width: 100%;
}

.partner-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  padding: 30px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-smooth);
}

.partner-logo-wrapper {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background-color: var(--color-bg-light);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.partner-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.partner-name {
  font-size: 1.25rem;
  color: var(--color-secondary);
  font-weight: 700;
}

.partner-desc {
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 1.4;
}

.partner-location {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Hover effects */
.partner-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(156, 26, 60, 0.08);
}

/* SCROLL FADE-IN ANIMATION STYLES */
.category-card, .step-card, .benefit-promo-card, .partner-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card.visible, .step-card.visible, .benefit-promo-card.visible, .partner-card.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* RESPONSIVE DESIGN - MEDIA QUERIES */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }

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

@media (max-width: 768px) {
  section {
    padding: 70px 15px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  /* Navigation mobile behavior */
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  

  
  .mobile-nav.active {
    display: block;
  }
  
  /* Hero */
  .hero-section {
    padding-top: 130px;
    padding-bottom: 90px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 30px;
  }
  .search-box {
    padding: 4px 4px 4px 16px;
  }
  .search-box input {
    font-size: 0.95rem;
  }
  .search-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  /* Grid layouts */
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .steps-container {
    flex-direction: column;
    gap: 30px;
  }
  

}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .logo-brand-buena {
    font-size: 1.3rem;
  }
  .logo-brand-vida {
    font-size: 1.7rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }

}

/* LOADING SPINNER & ERROR STATE STYLES */
.loading-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  gap: 15px;
  color: var(--color-gray);
  font-family: var(--font-headings);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(156, 26, 60, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-primary);
  font-family: var(--font-headings);
  font-weight: 600;
  padding: 40px 0;
}
