/*
========================================================================
  Karpent & Co. | Sistema de Estilos y Diseño Premium (Production Ready)
  Version: 1.0.0
  Author: Antigravity AI
========================================================================
*/

/* --- Importación de Fuentes Premium de Google --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- Variables y Paleta de Colores (Diseño Natural Premium B2B) --- */
:root {
  /* Tipografías */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Paleta de Colores - Dark Mode (Por Defecto) */
  --bg-primary: hsl(210, 20%, 9%);       /* Azul pizarra muy profundo */
  --bg-secondary: hsl(210, 16%, 13%);     /* Gris azulado oscuro */
  --bg-tertiary: hsl(210, 14%, 18%);      /* Para elementos flotantes o tarjetas */
  --bg-glass: rgba(210, 16%, 13%, 0.7);   /* Cristal translúcido */
  --text-primary: hsl(0, 0%, 98%);       /* Blanco puro */
  --text-secondary: hsl(210, 10%, 75%);   /* Gris plateado suave */
  --text-muted: hsl(210, 8%, 55%);        /* Gris oscuro apagado */
  
  /* Tonos Madera y Metales (Acentos) */
  --color-accent: hsl(32, 60%, 45%);       /* Roble Madera Profundo */
  --color-accent-hover: hsl(32, 70%, 55%); /* Roble Madera Vibrante */
  --color-gold: hsl(43, 70%, 55%);         /* Cobre/Oro cálido */
  --color-success: #2ecc71;
  --color-error: #e74c3c;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  /* Transiciones y Radios */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Dimensiones del Layout */
  --header-height: 80px;
  --container-width: 1280px;
}

/* --- Modo Claro Alternativo --- */
[data-theme="light"] {
  --bg-primary: hsl(0, 0%, 98%);
  --bg-secondary: hsl(210, 10%, 95%);
  --bg-tertiary: hsl(0, 0%, 100%);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --text-primary: hsl(210, 20%, 9%);
  --text-secondary: hsl(210, 15%, 35%);
  --text-muted: hsl(210, 10%, 55%);
  --border-color: rgba(0, 0, 0, 0.08);
  --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(0, 0, 0, 0.12);
}

/* --- Reseteo de Estilos de Producción --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* --- Accesibilidad: Foco Visible --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* --- Scrollbar Personalizado --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border: 2px solid var(--bg-primary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* --- Estilos Tipográficos y Elementos Base --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  position: relative;
}

h3 {
  font-size: 1.5rem;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
}

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

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

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
}

/* --- Componentes Comunes y Utilidades --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

.section {
  padding: 7.5rem 0;
  position: relative;
}

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

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

.section-header {
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  margin-bottom: 1.25rem;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
  margin: 1rem auto 0 auto;
  border-radius: var(--radius-full);
}

.section-header p {
  font-size: 1.125rem;
}

/* Botones Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: white;
  box-shadow: 0 4px 15px rgba(211, 107, 28, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211, 107, 28, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text-primary);
}

/* Tarjetas */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(211, 107, 28, 0.3);
  box-shadow: var(--shadow-md);
}

/* --- Sticky Header / Navegación --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.header-scrolled {
  height: 70px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

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

/* Logotipo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo svg {
  fill: var(--color-accent);
  transition: transform var(--transition-normal);
}

.logo:hover svg {
  transform: rotate(-10deg) scale(1.1);
}

.logo-text span {
  background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navegación de Escritorio */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Selector de Tema */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--border-color);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

/* Botón Hamburguesa Móvil */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.burger-bar {
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all var(--transition-normal);
}

/* Hamburguesa Activa */
.burger-menu.active .burger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger-menu.active .burger-bar:nth-child(2) {
  opacity: 0;
}
.burger-menu.active .burger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Hero Section (Efecto Premium e Impactante) --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-height);
  background-color: var(--bg-primary);
  overflow: hidden;
}

/* Fondo decorativo */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(211, 107, 28, 0.15) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 620px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

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

/* Contenedor de Imagen de Hero con Efecto Glassmorphism */
.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  aspect-ratio: 4 / 3;
  background-color: var(--bg-secondary);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero-image-wrapper:hover img {
  transform: scale(1.05);
}

/* Placa Flotante Informativa */
.hero-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background-color: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 2;
}

.hero-badge-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.hero-badge-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

/* --- Sobre Nosotros --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-image-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-card-overlap {
  position: absolute;
  top: 50%;
  right: -2.5rem;
  transform: translateY(-50%);
  background-color: var(--bg-tertiary);
  border-left: 4px solid var(--color-accent);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 320px;
}

.about-card-overlap h4 {
  margin-bottom: 0.75rem;
}

.about-content h3 {
  color: var(--color-gold);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1.5rem;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.about-value-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.about-value-item svg {
  fill: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.about-value-item h5 {
  margin-bottom: 0.25rem;
}

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

.service-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(211, 107, 28, 0.4);
  box-shadow: var(--shadow-lg);
}

.service-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.service-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.service-card-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-icon-badge {
  width: 50px;
  height: 50px;
  background-color: rgba(211, 107, 28, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-icon-badge svg {
  fill: var(--color-accent);
}

.service-card h3 {
  margin-bottom: 1rem;
}

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

.service-features {
  margin-bottom: 2rem;
}

.service-features-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.service-features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.service-features-list li svg {
  fill: var(--color-gold);
  flex-shrink: 0;
}

.service-card .btn {
  margin-top: auto;
  width: 100%;
}

/* --- ¿Por qué elegirnos? --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.why-card {
  text-align: left;
}

.why-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.why-card:hover .why-icon {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.1);
}

.why-card:hover .why-icon svg {
  fill: white;
}

.why-icon svg {
  fill: var(--color-accent);
  transition: fill var(--transition-normal);
}

.why-card h3 {
  margin-bottom: 0.75rem;
}

/* --- Cómo funciona (Proceso) --- */
.process-timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: var(--border-color);
  transform: translateX(-50%);
}

.process-step {
  position: relative;
  width: 50%;
  padding: 2rem 3rem;
  margin-bottom: 2rem;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 2.5rem;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background-color: var(--bg-primary);
  border: 3px solid var(--color-accent);
  z-index: 1;
}

.process-step:nth-child(even) {
  left: 50%;
  padding: 2rem 3rem;
}

.process-step:nth-child(even)::after {
  left: -8px;
}

.process-step:nth-child(odd) {
  left: 0;
  text-align: right;
}

.process-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(211, 107, 28, 0.15);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.process-step:hover .process-number {
  color: var(--color-accent);
  transition: color var(--transition-normal);
}

.process-step h3 {
  margin-bottom: 0.75rem;
}

/* --- Estadísticas (Contadores) --- */
.stats {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-title {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* --- Testimonios --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
}

.testimonial-rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.testimonial-rating svg {
  fill: var(--color-gold);
}

.testimonial-text {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-meta h5 {
  font-size: 1rem;
  font-weight: 700;
}

.testimonial-meta span {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* --- Galería de Proyectos --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  aspect-ratio: 1 / 1;
  background-color: var(--bg-tertiary);
}

.gallery-item-1 { grid-column: span 4; }
.gallery-item-2 { grid-column: span 8; aspect-ratio: 16/7.5; }
.gallery-item-3 { grid-column: span 8; aspect-ratio: 16/7.5; }
.gallery-item-4 { grid-column: span 4; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.gallery-title {
  font-size: 1.25rem;
  font-weight: 700;
}

/* --- Preguntas Frecuentes (FAQ Accordion) --- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.faq-item:hover {
  border-color: rgba(211, 107, 28, 0.3);
}

.faq-trigger {
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 1.1rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: var(--bg-tertiary);
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.faq-icon svg {
  fill: var(--text-primary);
  transition: transform var(--transition-normal);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.faq-content-inner {
  padding: 0 2rem 1.5rem 2rem;
}

/* FAQ Activo */
.faq-item.active {
  border-color: var(--color-accent);
}

.faq-item.active .faq-icon {
  background-color: var(--color-accent);
}

.faq-item.active .faq-icon svg {
  transform: rotate(180deg);
  fill: white;
}

.faq-item.active .faq-content {
  max-height: 300px; /* Suficiente para el texto largo */
}

/* --- Blog Section --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.blog-img-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.blog-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-img-wrapper img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.blog-meta-tags {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.blog-meta-tags span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-meta-tags svg {
  fill: var(--text-muted);
}

.blog-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: 1.4;
}

.blog-card h3 a:hover {
  color: var(--color-accent);
}

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

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
}

.blog-card-link:hover {
  color: var(--color-accent-hover);
}

.blog-card-link svg {
  fill: currentColor;
  transition: transform var(--transition-fast);
}

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

/* --- Contacto --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
}

.contact-form-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 3rem;
  border-radius: var(--radius-md);
}

.contact-form-wrapper h3 {
  margin-bottom: 2rem;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-accent);
  background-color: var(--bg-secondary);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1.25rem;
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-icon svg {
  fill: var(--color-accent);
}

.contact-info-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-info-details p, .contact-info-details a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Map Placeholder / Iframe Wrapper */
.map-wrapper {
  margin-top: 2rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  height: 250px;
  background-color: var(--bg-secondary);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(0.8) invert(0.9) contrast(1.2);
}

[data-theme="light"] .map-wrapper iframe {
  filter: none;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-3px);
}

.social-link svg {
  fill: currentColor;
}

/* --- Footer --- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
}

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

.footer-brand p {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--color-accent);
  padding-left: 4px;
}

.footer-newsletter p {
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.newsletter-form {
  display: flex;
}

.newsletter-form input {
  flex-grow: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.newsletter-form .btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1.25rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

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

.footer-legal-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-links a:hover {
  color: var(--color-accent);
}

/* --- Botones Flotantes (WhatsApp & Back to Top) --- */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.btn-float {
  width: 55px;
  height: 55px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-float:hover {
  transform: translateY(-5px) scale(1.05);
}

.btn-whatsapp {
  background-color: #25d366;
  color: white;
}

.btn-whatsapp svg {
  fill: white;
  width: 30px;
  height: 30px;
}

.btn-back-to-top {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  opacity: 0;
  pointer-events: none;
}

.btn-back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.btn-back-to-top svg {
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.btn-back-to-top:hover svg {
  transform: translateY(-2px);
}

/* --- Banner de Cookies Interactivo --- */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  max-width: 420px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  transform: translateY(120%);
  transition: transform var(--transition-slow);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner h4 {
  margin-bottom: 0.75rem;
}

.cookie-banner p {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

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

.cookie-actions button {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* --- Animaciones de Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Páginas Secundarias Especiales --- */

/* Hero Especial de Subpáginas */
.page-hero {
  padding: 10rem 0 5rem 0;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.breadcrumbs {
  display: inline-flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-accent);
}

/* Artículos del Blog (Single Article) */
.article-container {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 3rem;
}

.article-title {
  font-size: 2.75rem;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-featured-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}

.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h2, .article-content h3 {
  margin: 2.5rem 0 1rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul {
  list-style: disc;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--color-accent);
  background-color: var(--bg-secondary);
  padding: 1.5rem 2rem;
  font-style: italic;
  margin: 2.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Página 404 */
.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.error-page h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

.error-page p {
  max-width: 500px;
  margin-bottom: 2.5rem;
}

/* --- Ajustes Responsivos (Mobile First / Breakpoints) --- */

@media (max-width: 1024px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.85rem; }
  
  .hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    max-width: 100%;
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .about-card-overlap {
    position: static;
    transform: none;
    max-width: 100%;
    margin-top: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .section {
    padding: 5rem 0;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-secondary);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .header-actions .btn {
    display: none; /* Ocultar CTA de cabecera en móvil */
  }
  
  .process-timeline::before {
    left: 2rem;
  }
  
  .process-step {
    width: 100%;
    padding: 1.5rem 0 1.5rem 4rem;
    text-align: left !important;
  }
  
  .process-step::after {
    left: calc(2rem - 8px) !important;
  }
  
  .process-step:nth-child(even) {
    left: 0;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item {
    grid-column: span 1 !important;
    aspect-ratio: 16/10 !important;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-legal-links {
    justify-content: center;
  }
  
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
