/* =========================================================================
   LA CELOSTINA - GLOBAL STYLES & DESIGN SYSTEM
   ========================================================================= */

/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Brand Palette - Oficial */
  --color-black-deep: #1e1d20;
  /* negro */
  --color-gold-warm: #ae9464;
  /* dorado */
  --color-gold-light: #cfa861;
  /* dorado más claro para hover */
  --color-ivory: #f1ebea;
  /* blanco */
  --color-stone-gray: #4a4a4a;
  --color-amber-roast: #a8412e;
  /* rojo */
  --color-blue-mystic: #094e61;
  /* Azul */

  /* Backgrounds */
  --bg-primary: var(--color-black-deep);
  --bg-secondary: #252427;
  /* Un poco más claro que el negro profundo */
  --bg-overlay: rgba(30, 29, 32, 0.85);

  /* Text Colors */
  --text-primary: var(--color-ivory);
  --text-secondary: #cccccc;
  --text-accent: var(--color-gold-warm);
  --text-dark: var(--color-black-deep);
  /* For text on light backgrounds */

  /* Typography */
  /* Using Outfit as a modern, clean, elegant alternative to Nexa/Novecento for Headlines */
  --font-heading: 'Outfit', sans-serif;
  /* Using Inter for highly readable body text */
  --font-body: 'Inter', sans-serif;

  /* Spacing System */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  --space-section: 8rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 15px rgba(212, 175, 55, 0.15);
}
html, body {
    background: #1e1d20;
}

/* --- 2. RESET & BASE --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Texture Overlay Background para secciones específicas (clase helper) */
.bg-stone-texture {
  background: linear-gradient(rgba(30, 29, 32, 0.93), rgba(30, 29, 32, 0.93)), url('../assets/images/background-stone.webp');
  background-size: auto, 400px;
  background-repeat: repeat;
}

/* Texture Overlay (Global subtle grain/stone texture) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* A very subtle noise/stone texture pattern. Using a base64 tiny noise image for elegance */
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

h1 {
  font-size: clamp(2rem, 3.8vw, 3.3rem);
  font-weight: 600;
  letter-spacing: 2px;
}

h2 {
  font-size: clamp(1.6rem, 2.9vw, 2.3rem);
}

h3 {
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  text-transform: none;
  /* Slightly less rigid for subheadings */
  font-weight: 400;
  letter-spacing: 0.45px;
}

h4 {
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  text-transform: none;
  letter-spacing: 0.3px;
}

h5 {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  text-transform: none;
  letter-spacing: 0.2px;
}

h6 {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0.2px;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 1.125rem;
  /* 18px body copy for premium feel */
}

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

a:hover {
  color: var(--color-gold-light);
}

ul,
ol {
  list-style: none;
}

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

/* --- 3. UTILITY CLASSES --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.text-accent {
  color: var(--text-accent);
}

.text-ivory {
  color: var(--color-ivory);
}

.section {
  padding: var(--space-section) 0;
}

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

.section-secondary {
  background-color: var(--bg-secondary);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* --- 4. BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-gold-warm);
  color: var(--color-black-deep);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: var(--color-gold-light);
  transform: translateY(-2px);
  color: var(--color-black-deep);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-ivory);
  border-color: var(--color-gold-warm);
}

.btn-outline:hover {
  background-color: rgba(212, 175, 55, 0.1);
  color: var(--color-gold-warm);
}

.btn-whatsapp {
  background-color: #25D366;
  /* Standard WhatsApp Green, but we might tweak it forbrand */
  color: white;
  font-weight: 600;
}

.btn-whatsapp:hover {
  background-color: #1ebe56;
  color: white;
}

/* Floating WhatsApp Button */
.fab-whatsapp {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform var(--transition-normal);
}

.fab-whatsapp:hover {
  transform: scale(1.08);
  color: white;
}

/* --- 5. COMPONENT: HEADER / NAV --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  background-color: #1e1d20;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background-color: #1e1d20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-ivory);
  letter-spacing: 4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-link img {
  height: 40px;
  /* Adjust based on actual logo */
  width: auto;
}

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

.nav-link {
  color: var(--color-ivory);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
}

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

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

.nav-link.active {
  color: var(--color-gold-warm);
}

.nav-cta {
  border: 1px solid var(--color-gold-warm);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--color-gold-warm);
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background-color: var(--color-gold-warm);
  color: var(--color-black-deep);
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-ivory);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- 6. COMPONENT: FOOTER --- */
.footer {
  background: #120f0d;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  column-gap: 2rem;
  row-gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-brand h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  letter-spacing: 3px;
}

.footer-brand p {
  font-size: 1rem;
  font-style: italic;
  opacity: 0.8;
}

.footer-brand-copy {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-gold-warm);
  max-width: 16rem;
  opacity: 1;
}

.footer-brand-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--color-gold-warm);
}

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

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

.footer-link-muted {
  color: rgba(245, 239, 230, 0.5);
  font-size: 1rem;
}

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

.footer-contact-list a,
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-contact-list i {
  width: 1rem;
  margin-top: 0.25rem;
  color: var(--color-gold-warm);
}

.footer-contact-item {
  color: var(--text-secondary);
}

.footer-contact-list strong {
  color: var(--color-gold-warm);
  font-weight: 600;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-ivory);
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  border-color: var(--color-gold-warm);
  color: var(--color-gold-warm);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 2px solid rgba(212, 175, 55, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-ivory);
  opacity: 0.8;
}

.footer-bottom p i {
  color: var(--color-gold-warm);
  margin-right: 0.35rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(10, 8, 7, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox-media {
  max-width: min(80vw, 550px);
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 999px;
  background: rgba(18, 15, 13, 0.88);
  color: var(--color-ivory);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.image-lightbox-close:hover {
  color: var(--color-gold-warm);
  border-color: rgba(212, 175, 55, 0.44);
}

/* --- 7. ANIMATIONS (AOS Style Fallbacks) --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- 8. RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
  .header {
    padding: 1rem 0;
  }

  .header.scrolled {
    padding: 0.5rem 0;
    background-color: var(--bg-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
    /* Above mobile menu */
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-secondary);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
    padding-top: 7rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: left;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.open {
    right: 0;
  }

  /* Mobile backdrop */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.2rem;
    width: 100%;
    text-align: left;
  }

  .nav-cta {
    align-self: flex-start;
    margin-top: 0.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* Clases de texto personalizadas para los nuevos colores */
.text-rojo {
  color: var(--color-amber-roast);
}

.text-azul {
  color: var(--color-blue-mystic);
}

/* Utilities generales */
.badge-eco {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(9, 78, 97, 0.2);
  border: 1px solid var(--color-blue-mystic);
  color: var(--color-ivory);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  :root {
    --space-section: 5rem;
    /* Smaller section padding on mobile */
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

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

/* --- 9. FORM ELEMENTS --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-ivory);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--color-ivory);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-gold-warm);
  background-color: rgba(0, 0, 0, 0.4);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ae9464' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

select.form-control option {
  background-color: var(--bg-secondary);
  color: var(--color-ivory);
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: max(env(safe-area-inset-top, 20px), 28px);
  background: #1e1d20;
  z-index: 999;
  pointer-events: none;
}
