/* ==========================================================================
   SISTEMA DE DISEÑO Y ESTILOS PREMIUM — GRUPO ZEDER (EBANISTERÍA)
   ========================================================================== */

/* Variables de Color e Identidad Visual (Inspiradas en maderas nobles y artesanía) */
:root {
  --bg-primary: #faf8f5;           /* Crema suave refinado */
  --bg-secondary: #f4efea;         /* Arena/madera clara sutil */
  --bg-dark: #1c1917;              /* Carbón profundo */
  --bg-dark-secondary: #292524;    /* Carbón intermedio */
  
  --text-primary: #1c1917;         /* Texto principal de alto contraste suave */
  --text-secondary: #57534e;       /* Texto secundario cálido */
  --text-light: #f5f5f4;           /* Texto sobre fondos oscuros */
  --text-muted: #78716c;           /* Texto atenuado */
  
  --accent-wood: #b45309;          /* Ámbar ocre (madera curada) */
  --accent-wood-hover: #92400e;    /* Tono madera más oscuro para hovers */
  --accent-wood-light: #fef3c7;    /* Brillo de madera claro */
  
  --border-color: #e7e5e4;         /* Borde gris piedra cálido */
  --border-light: rgba(255, 255, 255, 0.15);
  
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Outfit', 'Inter', sans-serif;
  
  --container-width: 1140px;
  --header-height: 80px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-subtle: 0 4px 20px -2px rgba(28, 25, 23, 0.04);
  --shadow-medium: 0 12px 30px -4px rgba(28, 25, 23, 0.08);
  --shadow-heavy: 0 20px 40px -4px rgba(28, 25, 23, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
}

/* Reset y Estilos Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

/* Utilidades de Diseño */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section-header {
  max-width: 700px;
  margin: 0 auto 50px auto;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-wood);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

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

/* Estilos de Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--accent-wood);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-wood-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-primary);
}

.icon-svg {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   CABECERA / HEADER
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.05);
  transition: var(--transition-smooth);
}

.header.scrolled {
  background-color: rgba(250, 248, 245, 0.95);
  box-shadow: var(--shadow-subtle);
  height: 70px;
}

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

.logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header.scrolled .logo-img {
  height: 36px;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

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

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-wood);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.nav-item:hover::after, .nav-item.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-btn {
  background-color: var(--text-primary);
  color: var(--bg-primary) !important;
  padding: 10px 20px !important;
  border-radius: var(--radius-md);
}

.nav-btn::after {
  display: none !important;
}

.nav-btn:hover {
  background-color: var(--accent-wood);
  transform: translateY(-1px);
}

/* Toggle del Menú Móvil */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
  justify-content: center;
  align-items: center;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  position: relative;
  transition: var(--transition-smooth);
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

/* Animación de Hamburguesa Activa */
.nav-toggle.active .hamburger {
  background-color: transparent;
}
.nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* ==========================================================================
   SECCIÓN HERO / INICIO
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.04) 0%, rgba(250, 248, 245, 0) 70%);
  z-index: 1;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1sfr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 2;
}

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

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-wood);
  background-color: rgba(180, 83, 9, 0.08);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Slider de Fotos */
.hero-slider-container {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
}

.hero-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease-out;
}

.slide.active .slide-img {
  transform: scale(1.05);
}

/* Indicadores de Slider (Puntos) */
.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dot.active {
  background-color: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* ==========================================================================
   SECCIÓN DE SERVICIOS / EBANISTERÍA
   ========================================================================== */
.services-section {
  padding: 100px 0;
  background-color: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.service-card {
  background-color: var(--bg-primary);
  padding: 40px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(28, 25, 23, 0.04);
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(180, 83, 9, 0.15);
}

.service-icon {
  width: 50px;
  height: 50px;
  color: var(--accent-wood);
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  color: var(--accent-wood-hover);
}

.service-card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.service-card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Feature Banner Lateral */
.feature-banner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  margin-top: 40px;
}

.feature-banner-text {
  padding: 60px;
}

.feature-banner-text h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 18px;
}

.feature-banner-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.divider-wood {
  width: 60px;
  height: 3px;
  background-color: var(--accent-wood);
}

.feature-banner-img-container {
  height: 100%;
  min-height: 380px;
  overflow: hidden;
}

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

.feature-banner:hover .feature-banner-img {
  transform: scale(1.03);
}

/* ==========================================================================
   SECCIÓN CNC ROUTER
   ========================================================================== */
.cnc-section {
  padding: 100px 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.section-header.dark .section-title {
  color: var(--text-light);
}

.section-header.dark .section-subtitle {
  color: var(--text-muted);
}

.cnc-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: flex-start;
}

/* Galería CNC Izquierda */
.cnc-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cnc-gallery-main {
  width: 100%;
  height: 340px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cnc-gallery-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cnc-gallery-sub div, .cnc-gallery-sub img {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 200px;
}

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

.cnc-img:hover {
  transform: scale(1.04);
}

/* Contenido CNC Derecha */
.cnc-info {
  display: flex;
  flex-direction: column;
}

.cnc-intro h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-bottom: 16px;
  color: var(--text-light);
}

.cnc-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.cnc-services-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cnc-services-list li {
  display: flex;
  gap: 20px;
}

.list-bullet {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background-color: rgba(180, 83, 9, 0.15);
  border: 1px solid var(--accent-wood);
  color: var(--accent-wood-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 4px;
}

.cnc-services-list h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-light);
}

.cnc-services-list p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ==========================================================================
   SECCIÓN DE CATEGORÍAS (ESPACIOS)
   ========================================================================== */
.categories-section {
  padding: 100px 0;
  background-color: var(--bg-primary);
}

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

.category-card {
  position: relative;
  height: 440px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  cursor: pointer;
}

.category-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay Oscuro */
.category-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.9) 0%, rgba(28, 25, 23, 0.2) 60%, rgba(28, 25, 23, 0) 100%);
  z-index: 2;
  transition: var(--transition-smooth);
}

.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 3;
  color: var(--text-light);
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.category-card-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Hover de Categoría */
.category-card:hover .category-img {
  transform: scale(1.06);
}

.category-card:hover::after {
  background: linear-gradient(to top, rgba(28, 25, 23, 0.95) 0%, rgba(28, 25, 23, 0.3) 60%, rgba(28, 25, 23, 0.1) 100%);
}

.category-card:hover .category-overlay {
  transform: translateY(0);
}

/* ==========================================================================
   ESTADÍSTICAS
   ========================================================================== */
.stats-section {
  padding: 80px 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-wood);
  line-height: 1;
  margin-bottom: 8px;
}

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

/* ==========================================================================
   SECCIÓN DE CONTACTO
   ========================================================================== */
.contact-section {
  padding: 100px 0;
  background-color: var(--bg-primary);
}

.contact-card-box {
  display: grid;
  grid-template-columns: 1fr 340px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
}

.contact-card-content {
  padding: 60px;
  background-color: var(--bg-primary);
}

.contact-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-wood);
  margin-bottom: 16px;
}

.contact-card-content h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 18px;
  line-height: 1.2;
}

.contact-card-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 600px;
}

/* Rejilla de Acciones Rápidas de Contacto */
.contact-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.contact-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* WhatsApp específico */
.contact-btn.whatsapp {
  background-color: #25d366;
  color: #ffffff;
}
.contact-btn.whatsapp:hover {
  background-color: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(37, 211, 102, 0.25);
}

/* Teléfono específico */
.contact-btn.phone {
  background-color: var(--accent-wood);
  color: #ffffff;
}
.contact-btn.phone:hover {
  background-color: var(--accent-wood-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(180, 83, 9, 0.25);
}

/* Email específico */
.contact-btn.email {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}
.contact-btn.email:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-2px);
}

/* Lateral de Contacto */
.contact-card-sidebar {
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-sidebar-item h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact-sidebar-item p {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ==========================================================================
   PIE DE PÁGINA / FOOTER
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

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

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

.footer-credit a {
  color: var(--text-light);
  text-decoration: underline;
}

.footer-credit a:hover {
  color: var(--accent-wood);
}

/* ==========================================================================
   RESPONSIVO / MEDIA QUERIES
   ========================================================================== */

/* Tablet Grande / Escritorio Pequeño */
@media (max-width: 1024px) {
  .hero-container {
    gap: 40px;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .hero-slider-container {
    height: 420px;
  }
  .categories-grid {
    gap: 20px;
  }
  .category-card {
    height: 360px;
  }
  .category-overlay {
    padding: 24px;
  }
}

/* Tablet Pequeño / Móvil Grande */
@media (max-width: 900px) {
  /* Habilitar Menú Hamburguesa */
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
    padding: 30px 40px;
    display: none;
    transform: translateY(-10px);
    transition: var(--transition-smooth);
    z-index: 999;
  }
  
  .nav-menu.active {
    display: block;
    transform: translateY(0);
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 100%;
  }
  
  .nav-item {
    font-size: 1.1rem;
    display: block;
  }
  
  .nav-btn {
    text-align: center;
    margin-top: 10px;
  }

  /* Grid Layouts a una sola columna */
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .feature-banner {
    grid-template-columns: 1fr;
  }
  
  .feature-banner-img-container {
    height: 320px;
  }
  
  .cnc-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    height: 320px;
  }
  
  .contact-card-box {
    grid-template-columns: 1fr;
  }
  
  .contact-card-sidebar {
    border-top: 1px solid var(--border-color);
    padding: 40px;
    background-color: var(--bg-secondary);
  }
}

/* Móvil Pequeño */
@media (max-width: 480px) {
  .section-title {
    font-size: 2rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-slider-container {
    height: 300px;
  }
  .service-card {
    padding: 24px;
  }
  .feature-banner-text {
    padding: 30px;
  }
  .feature-banner-text h3 {
    font-size: 1.6rem;
  }
  .contact-card-content {
    padding: 30px 20px;
  }
  .contact-card-content h2 {
    font-size: 1.8rem;
  }
  .contact-actions-grid {
    grid-template-columns: 1fr;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}
