/* ============================================================
   GEOLOGÍA Y PROYECTOS — Hoja de estilos principal
   ============================================================
   Estructura:
   1. Variables / Design tokens
   2. Reset y base
   3. Tipografía
   4. Componentes reutilizables (botones, tarjetas, secciones)
   5. Navbar
   6. Hero
   7. Secciones de la landing
   8. Galería / Media grid
   9. Footer
   10. Responsive / Media queries
   ============================================================ */

/* ------------------------------------------------------------
   1. Variables / Design tokens
   ------------------------------------------------------------ */
:root {
  /* Paleta de colores — modifica aquí para cambiar el tema */
  --color-primary:     #1a3a2a;   /* Verde tierra oscuro — color principal */
  --color-primary-mid: #2d5c3e;   /* Verde medio — hover de botones */
  --color-accent:      #8b6914;   /* Dorado tierra — acento */
  --color-accent-light:#c49a22;   /* Dorado claro — hover acento */
  --color-bg:          #f7f5f0;   /* Fondo cálido casi blanco */
  --color-bg-dark:     #0e2018;   /* Fondo oscuro para hero/footer */
  --color-surface:     #ffffff;   /* Superficie de tarjetas */
  --color-border:      #d4cfc5;   /* Bordes sutiles */
  --color-text:        #1c1c1c;   /* Texto principal */
  --color-text-mid:    #4a4a4a;   /* Texto secundario */
  --color-text-light:  #7a7a7a;   /* Texto de ayuda / placeholders */
  --color-text-on-dark:#e8e4dc;   /* Texto sobre fondo oscuro */

  /* Tipografía */
  --font-display: 'Playfair Display', Georgia, serif;   /* Títulos grandes */
  --font-body:    'Inter', system-ui, sans-serif;        /* Texto general */

  /* Espaciado */
  --gap-xs:  0.5rem;
  --gap-sm:  1rem;
  --gap-md:  2rem;
  --gap-lg:  4rem;
  --gap-xl:  6rem;

  /* Bordes */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Sombras */
  --shadow-card: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.13);

  /* Transiciones */
  --transition: 0.22s ease;
}

/* ------------------------------------------------------------
   2. Reset y base
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ------------------------------------------------------------
   3. Tipografía
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

p { margin-bottom: var(--gap-sm); }
p:last-child { margin-bottom: 0; }

.text-muted { color: var(--color-text-mid); }
.text-small { font-size: 0.875rem; color: var(--color-text-light); }

/* Eyebrow — etiqueta pequeña sobre títulos */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--gap-xs);
}

/* ------------------------------------------------------------
   4. Componentes reutilizables
   ------------------------------------------------------------ */

/* Contenedor central */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gap-md);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

/* Botón primario — relleno verde */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-mid);
  border-color: var(--color-primary-mid);
}

/* Botón acento — dorado para WhatsApp/CTA secundario */
.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

/* Botón outline — borde visible, fondo transparente */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

/* Botón outline claro — para usar sobre fondos oscuros */
.btn-outline-light {
  background: transparent;
  color: var(--color-text-on-dark);
  border-color: var(--color-text-on-dark);
}
.btn-outline-light:hover {
  background: var(--color-text-on-dark);
  color: var(--color-bg-dark);
}

/* Botón WhatsApp */
.btn-whatsapp {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}
.btn-whatsapp:hover {
  background: #1da851;
  border-color: #1da851;
}

/* Tarjeta base */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-body {
  padding: 1.5rem;
}

/* Grilla de tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap-md);
}

/* Divisor decorativo */
.divider {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border: none;
  margin: var(--gap-sm) 0 var(--gap-md);
}

/* Sección genérica */
.section {
  padding: var(--gap-xl) 0;
}

.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-text-on-dark);
}
.section--dark .eyebrow {
  color: var(--color-accent-light);
}

.section--light-alt {
  background: #eeeae2;
}

.section-header {
  margin-bottom: var(--gap-lg);
}

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

/* Icono de servicio */
.service-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gap-sm);
  flex-shrink: 0;
}
.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Badge de número */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-bottom: var(--gap-sm);
}

/* Accordion / FAQ */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  gap: 1rem;
  transition: color var(--transition);
}
.accordion-trigger:hover {
  color: var(--color-primary);
}

.accordion-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  display: none;
  padding-bottom: 1.25rem;
  color: var(--color-text-mid);
  line-height: 1.8;
}
.accordion-content.open {
  display: block;
}

/* ------------------------------------------------------------
   5. Navbar
   ------------------------------------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

/* Navbar scrolleada — fondo sólido */
.navbar.scrolled {
  background: var(--color-bg-dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gap-md);
  max-width: 1180px;
  margin-inline: auto;
}

/* Logo */
.navbar-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.navbar-logo .logo-main {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.navbar-logo .logo-sub {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
}

/* Imagen del logo dentro de .navbar-logo (agregado) */
.navbar-logo {
flex-direction: row;
align-items: center;
gap: 0.6rem;
}
.navbar-logo-img {
height: 44px;
width: auto;
display: block;
border-radius: 4px;
}
.navbar-logo-text {
display: flex;
flex-direction: column;
line-height: 1.2;
}

/* Links de navegación */
.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}
.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}
.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-light);
  transition: width var(--transition);
}
.navbar-links a:hover { color: #fff; }
.navbar-links a:hover::after { width: 100%; }
.navbar-links a.active { color: #fff; }
.navbar-links a.active::after { width: 100%; }

/* Botón CTA en navbar */
.navbar-cta {
  font-size: 0.8rem;
  padding: 0.55rem 1.2rem;
}

/* Menú hamburguesa (móvil) */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all var(--transition);
}

/* Menú móvil abierto */
.navbar-mobile {
  display: none;
  flex-direction: column;
  background: var(--color-bg-dark);
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
  gap: 1rem;
}
.navbar-mobile.open { display: flex; }
.navbar-mobile a {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg-dark);
}

/* Imagen/video de fondo del hero */
.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

/* Overlay degradado sobre el fondo */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 32, 24, 0.85) 0%,
    rgba(14, 32, 24, 0.5) 60%,
    rgba(14, 32, 24, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  color: #fff;
  margin-bottom: var(--gap-sm);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--color-text-on-dark);
  opacity: 0.9;
  max-width: 540px;
  margin-bottom: var(--gap-md);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stats rápidos debajo del hero CTA */
.hero-stats {
  display: flex;
  gap: var(--gap-md);
  margin-top: var(--gap-lg);
  flex-wrap: wrap;
}
.hero-stat {
  border-left: 2px solid var(--color-accent);
  padding-left: 1rem;
}
.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #fff;
  line-height: 1;
}
.hero-stat span {
  font-size: 0.78rem;
  color: var(--color-text-on-dark);
  opacity: 0.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   7. Secciones de la landing
   ------------------------------------------------------------ */

/* Servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap-md);
}

.service-card {
  padding: var(--gap-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--color-primary);
}
.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { color: var(--color-text-mid); font-size: 0.92rem; }

/* Nosotros — layout dos columnas */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-lg);
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-border);  /* placeholder mientras no hay imagen */
}
.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder visual cuando no hay imagen */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #d4cfc5;
  color: var(--color-text-light);
  gap: 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}
.img-placeholder svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-text-light);
  fill: none;
  stroke-width: 1.5;
}

.about-checklist {
  margin-top: var(--gap-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.about-checklist li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--color-text-mid);
}
.about-checklist li::before {
  content: '✓';
  flex-shrink: 0;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 0.05rem;
}

/* Proceso — timeline horizontal */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-md);
  position: relative;
}

.process-step {
  text-align: center;
  padding: var(--gap-md) var(--gap-sm);
}
.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-mid);
}

/* ------------------------------------------------------------
   8. Galería / Media grid
   ------------------------------------------------------------ */
.media-grid {
  display: grid;
  gap: var(--gap-sm);

  /* Cuadrícula variable: 1 grande + 2 pequeñas en la misma fila */
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
}

/* Cada elemento de la galería */
.media-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ccc;
  cursor: pointer;
}

/* Elemento grande que ocupa 2 columnas y 2 filas */
.media-item.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.media-item:hover img,
.media-item:hover video {
  transform: scale(1.04);
}

/* Overlay con descripción al hacer hover */
.media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(14,32,24,0.85), transparent);
  color: #fff;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--transition);
}
.media-item:hover .media-caption {
  opacity: 1;
  transform: translateY(0);
}
.media-caption strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

/* Placeholder de imagen en la galería */
.media-placeholder {
  width: 100%;
  height: 100%;
  background: #c8c3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #7a7a7a;
  font-size: 0.8rem;
}
.media-placeholder svg {
  width: 36px;
  height: 36px;
  stroke: #9a9a9a;
  fill: none;
  stroke-width: 1.5;
}

/* Botón de video play overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14,32,24,0.35);
  transition: background var(--transition);
}
.play-overlay:hover { background: rgba(14,32,24,0.5); }
.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform var(--transition);
}
.play-overlay:hover .play-btn { transform: scale(1.1); }
.play-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--color-primary);
  margin-left: 3px; /* centra el triángulo visualmente */
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}
#lightbox.active { display: flex; }
#lightbox img, #lightbox video {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}
#lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
#lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ------------------------------------------------------------
   9. Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding: var(--gap-lg) 0 var(--gap-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap-lg);
  padding-bottom: var(--gap-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--gap-md);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: var(--gap-sm);
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: #fff; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.7rem;
}
.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--color-accent-light);
  fill: none;
  stroke-width: 2;
  margin-top: 2px;
}
.footer-contact-item a { color: inherit; }
.footer-contact-item a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

/* Botón flotante de WhatsApp */
.whatsapp-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.whatsapp-fab svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ------------------------------------------------------------
   10. Responsive
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  .navbar-links { display: none; }
  .navbar-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .about-image-wrapper { aspect-ratio: 16/9; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .media-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 200px;
  }
  .media-item.featured { grid-column: span 2; }
}

@media (max-width: 600px) {
  :root {
    --gap-lg: 3rem;
    --gap-xl: 4rem;
  }

  .hero-stats { gap: var(--gap-sm); }

  .media-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }
  .media-item.featured { grid-column: span 1; grid-row: span 1; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--gap-md); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
