@import url('https://fonts.googleapis.com/css2?family=Lato:wght@900&family=Abril+Fatface&family=Merriweather+Sans:wght@300;400;500;600;700&display=swap');

/* FUNTESA Brand Variables */
:root {
  /* Brand Colors */
  --brand-amber: #be7d36;    
  --brand-brown: #855132;    
  --brand-dark:  #092420;    
  --brand-light: #e3ebd4;    
  --white:       #ffffff;    
  
  /* Typography Families */
  --font-headings: 'Lato', sans-serif;
  --font-subheadings: 'Abril Fatface', serif;
  --font-body: 'Merriweather Sans', sans-serif;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 0;
  --card-padding: 1.5rem;
  --border-radius: 0.75rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--brand-dark);
  line-height: 1.6;
}

/* Typography */
h1 {
  font-family: var(--font-headings);
  font-weight: 900;
  line-height: 1.2;
  color: var(--brand-dark);
}

h2 {
  font-family: var(--font-subheadings);
  font-weight: normal;
  line-height: 1.3;
  color: var(--brand-dark);
}

h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.4;
  color: var(--brand-dark);
}

p, span, div, a, button, input, textarea, label {
  font-family: var(--font-body);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Layout Components */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: var(--section-padding);
}

.section-hero {
  padding: 5rem 0 8rem;
}

.section-lg {
  padding: 6rem 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

/* Header and Navigation */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(9, 36, 32, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
}

.logo {
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--brand-dark);
  cursor: pointer;
}

.nav-desktop {
  display: none;
  gap: 2rem;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: #374151;
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-amber);
  border-bottom-color: var(--brand-amber);
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  background-color: var(--white);
  border-top: 1px solid rgba(9, 36, 32, 0.1);
  padding: 0.5rem;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--brand-amber);
  background-color: #fef3c7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand-dark);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--brand-brown);
  transform: scale(1.05);
}

.btn-secondary {
  background-color: transparent;
  color: var(--brand-dark);
  border: 2px solid var(--brand-dark);
}

.btn-secondary:hover {
  background-color: #fef3c7;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Cards */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow-xl);
}

.card-content {
  padding: var(--card-padding);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  color: var(--brand-amber);
  margin-bottom: 1rem;
}

/* Hero Sections */
.hero {
  background-color: var(--brand-light);
  padding: 5rem 0 8rem;
}

.hero-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--brand-brown);
  margin-bottom: 2rem;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-image {
  width: 100%;
  height: 24rem;
  object-fit: cover;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-2xl);
}

/* Sections */
.section-bg-light {
  background-color: var(--brand-light);
}

.section-bg-white {
  background-color: var(--white);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 3rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--brand-brown);
  margin-bottom: 2rem;
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

/* Service Cards */
.service-card {
  display: grid;
  grid-template-columns: 1fr;
  background-color: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin-bottom: 4rem;
}

.service-content {
  padding: 3rem;
}

.service-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.service-icon {
  width: 3rem;
  height: 3rem;
  color: var(--brand-amber);
  margin-right: 1rem;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.service-description {
  font-size: 1.125rem;
  color: var(--brand-brown);
  margin-bottom: 1.5rem;
}

.service-list {
  margin-bottom: 2rem;
}

.service-list h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-list ul {
  list-style: none;
  padding: 0;
}

.service-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  color: var(--brand-brown);
}

.service-list li::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--brand-amber);
  border-radius: 50%;
  margin-right: 0.75rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.service-visual {
  background-color: var(--brand-light);
  min-height: 16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.service-visual-icon {
  width: 6rem;
  height: 6rem;
  color: var(--brand-dark);
  opacity: 0.2;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.timeline-item {
  text-align: center;
}

.timeline-year {
  width: 4rem;
  height: 4rem;
  background-color: var(--brand-amber);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: 1.125rem;
  margin: 0 auto 1rem;
}

.timeline-text {
  color: var(--brand-brown);
  font-size: 0.875rem;
}

/* Impact Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-card {
  background-color: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  text-align: center;
}

.stat-icon {
  width: 2rem;
  height: 2rem;
  color: var(--brand-amber);
  margin-bottom: 1rem;
}

.stat-number {
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: 1.875rem;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.stat-text {
  color: var(--brand-brown);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--brand-dark);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-amber);
}

.form-input.error,
.form-textarea.error {
  border-color: #dc2626;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-textarea {
  resize: none;
  min-height: 150px;
}

/* Contact Info */
.contact-info {
  background-color: var(--brand-light);
  border-radius: var(--border-radius-xl);
  padding: 1.5rem;
  margin-top: 2rem;
}

.contact-item {
  background-color: var(--white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.contact-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--brand-amber);
  margin-right: 1rem;
}

.contact-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-value {
  color: #6b7280;
  transition: color 0.3s ease;
}

.contact-value:hover {
  color: var(--brand-amber);
}

/* Footer */
.footer {
  background-color: var(--brand-dark);
  color: var(--white);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-family: var(--font-headings);
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-text {
  color: #d1d5db;
  margin-bottom: 1rem;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #d1d5db;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand-amber);
}

.footer-bottom {
  border-top: 1px solid #4b5563;
  padding-top: 2rem;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .hero-title {
    font-size: 3.75rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .grid-md-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .grid-md-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .service-card {
    grid-template-columns: 1fr 1fr;
  }
  
  .service-card:nth-child(even) .service-content {
    order: 2;
  }
  
  .service-card:nth-child(even) .service-visual {
    order: 1;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
  
  .grid-lg-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .grid-lg-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--brand-light);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-amber);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-brown);
}

/* Utilities */
.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;
}

.transition {
  transition: all 0.3s ease;
}

.shadow-hover:hover {
  box-shadow: var(--shadow-2xl);
}

.scale-hover:hover {
  transform: scale(1.05);
}

.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
    gap: 8px; /* espacio entre logo e texto */
}

.logo-img {
    height: 100px; /* ajusta según el tamaño que desees */
    width: auto;
}

.icono-raiz {
  width: 80px;          /* ajusta según necesites */
  height: auto;
  margin: 0 auto 0rem;  /* centrado y con espacio abajo */
  display: block;
}

/* === Liderazgo con Propósito === */
.leader {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

/* Removed empty ruleset for .leader--reverse */

.leader-content .leader-name {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.leader-bio p { margin-bottom: 1rem; }

.leader-photo-wrap {
  text-align: center;
}

/*.leader-photo {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-2xl);
}*/ 

/* Desktop */
@media (min-width: 768px) {
  .leader {
    grid-template-columns: 1.2fr 0.8fr; /* texto / foto */
    gap: 3rem;
  }
  .leader--reverse {
    grid-template-columns: 0.8fr 1.2fr; /* foto / texto */
  }
  .leader--reverse .leader-content {
    order: 2;
  }
  .leader--reverse .leader-photo-wrap {
    order: 1;
    text-align: left;
  }
}

/* Reemplazo de panel verde por foto */
.service-visual {
  background: none;            /* antes: var(--brand-light) */
  min-height: 16rem;           /* conserva altura mínima */
  position: relative;
  overflow: hidden;            /* ya lo hereda del card, refuerzo */
  display: block;              /* no necesitamos centrar nada */
}

.service-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           /* recorte elegante, sin deformar */
  object-position: center;     /* ajusta foco si hace falta */
  display: block;
}

/* (Opcional) mantener proporción en móviles si la foto es muy alta */
@media (max-width: 767px) {
  .service-visual { min-height: 14rem; }
}

.menu-icon {
  width: 28px;     /* ajusta según se vea */
  height: auto;
  display: block;
}

/* Bloque de videos */
.section-videos {
  padding: 4rem 0;
}

.section-videos .section-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #092420; /* igual a otros títulos */
}

.section-videos .section-subtitle {
  color: #7a5a33; /* tono marrón usado en textos */
  margin-bottom: 2rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.video-item iframe {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 1) Seguridad global: ninguna imagen se sale del contenedor */
img { max-width: 100%; height: auto; }

/* 2) Ajustes de fotos de perfil en “Liderazgo con Propósito” */
.leader-photo {
  width: clamp(160px, 60vw, 300px); /* fluido: 160–300px, según ancho de pantalla */
  aspect-ratio: 1 / 1;             /* asegura el cuadrado */
  height: auto;                    /* deja que el alto lo calcule por ratio */
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-inline: auto;             /* centrada en móvil */
}

/* En desktop conservamos un tamaño mayor y la grilla ya existente */
@media (min-width: 768px) {
  .leader-photo {
    width: 320px;
    aspect-ratio: 1 / 1;
  }
}

/* El card no recorta contenido textual */
.service-card {
  overflow: visible;
}

/* El recorte para esquinas redondeadas lo hace la zona de imagen */
.service-visual {
  overflow: hidden;
  border-top-right-radius: var(--border-radius-xl);
  border-bottom-right-radius: var(--border-radius-xl);
}

/* Cuando las columnas se invierten en pares, el borde redondeado correcto */
@media (min-width: 768px) {
  .service-card:nth-child(even) .service-visual {
    border-top-left-radius: var(--border-radius-xl);
    border-bottom-left-radius: var(--border-radius-xl);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }
}

/* Mejoras de legibilidad y cortes de palabra */
.service-content {
  overflow: visible;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Menos padding en móviles angostos para evitar “corte” visual */
@media (max-width: 480px) {
  .service-content { padding: 1.5rem; }
}
