/* Root Variables - Premium Color Palette */
:root {
  --primary-color: #0288d1;
  /* Requested Blue */
  --secondary-color: #01579b;
  /* Darker Blue for contrast */
  --accent-color: #f59e0b;
  /* Attention/Action Gold */
  --whatsapp-color: #25d366;
  --whatsapp-hover: #128c7e;
  --bg-color: #ffffff;
  /* Requested White */
  --bg-card: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #475569;
  --text-white: #ffffff;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
}

p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.mt-4 {
  margin-top: 4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-whatsapp {
  background-color: var(--whatsapp-color);
  color: var(--text-white);
  box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background: var(--secondary-color);
  color: var(--text-white);
}

/* Header & Nav */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  padding: 1rem 0;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.95rem;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem;
  background-color: var(--bg-color);
  background-size: cover;
  background-position: center;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-inicio {
  background-image: url('img/hero_bg.png');
}

.hero-autos {
  background-image: url('img/hero_autos.png');
}

.hero-gastos {
  background-image: url('img/hero_gastos.png');
}

.hero-vida {
  background-image: url('img/hero_vida.png');
}

.hero-sucursales {
  background-image: url('img/hero_sucursales.png');
}

.hero-gastos h1 {
  color: #065f46;
}

.hero-vida {
  background-image: url('img/hero_vida.png');
}

.hero-vida h1 {
  color: #b45309;
}

.hero-vida .card-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.hero-calendario {
  background-color: var(--primary-color);
  background-image: none;
  min-height: 40vh;
  padding: 8rem 0 4rem;
}

.hero-calendario::before {
  display: none;
}

.hero-calendario h1,
.hero-calendario p {
  color: white;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  /* White overlay for text readability */
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  color: #db8a00;
  font-weight: 700;
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero p {
  font-size: 1.25rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* Trust Bar (Logos) */
.trust-bar {
  padding: 3rem 0;
  background: var(--text-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.trust-title {
  text-align: center;
  font-size: 0.875rem;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
  font-weight: 600;
}

.logos-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.logos-grid img {
  height: 45px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: var(--transition);
}

.logos-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Tablas */
.table-responsive {
  overflow-x: auto;
  margin-top: 2rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--text-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 1rem;
  text-align: left;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tr:nth-child(even) {
  background: var(--bg-card);
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.months-grid img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Services / Features Grid */
.section {
  padding: 6rem 0;
}

.section-bg {
  background-color: var(--bg-card);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.card {
  background: var(--text-white);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p {
  flex-grow: 1;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.card-link {
  color: var(--secondary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.card-link:hover {
  gap: 0.75rem;
}

/* Value Props / Why us */
.value-props {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 6rem 0;
}

.value-props h2 {
  color: var(--text-white);
}

.value-props p {
  color: rgba(255, 255, 255, 0.8);
}

.value-prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.value-item {
  text-align: center;
}

.value-item h3 {
  color: var(--accent-color);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.value-item h4 {
  color: var(--text-white);
  font-size: 1.25rem;
}

/* Footer */
.footer {
  background: #081630;
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

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

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 1rem;
}

.footer h4 {
  color: var(--text-white);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer a:hover {
  color: var(--text-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.legal-links {
  display: flex;
  gap: 1.5rem;
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* simple mobile logic to hide, or implement toggle */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--text-white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    gap: 1.5rem;
    text-align: center;
  }

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

  .mobile-menu-btn {
    display: block;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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