/* ==========================================================================
   CSS GLOBAL - CRISTALERIA CADIGLASS S.L. (DISEÑO PREMIUM GLASSMORPHISM)
   ========================================================================== */

/* Google Fonts: cargados via <link> en HTML con crossorigin para mejor rendimiento y seguridad */

/* Variables CSS del Sistema de Diseño */
:root {
  /* Paleta de Colores de Lujo */
  --bg-deep: #06090e;
  --bg-dark: #0b111a;
  --bg-card: rgba(15, 23, 42, 0.45);
  --bg-glass: rgba(10, 18, 30, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.16);

  --primary: #10b981; /* Verde esmeralda translúcido original refinado */
  --primary-glow: rgba(16, 185, 129, 0.15);
  --secondary: #38bdf8; /* Azul cristal brillante */
  --secondary-glow: rgba(56, 189, 248, 0.15);

  --text-white: #fff;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;

  /* Fuentes */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transiciones y Sombras */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.2);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-deep);
}

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

/* Tipografía */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  color: var(--text-white);
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* Fondos y Efectos de Cristal (Glassmorphism) */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: 0.5s;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 40px 0 rgba(56, 189, 248, 0.1);
}

/* Efectos de Brillo e Iluminación de Fondo */
.glow-spot-primary {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

.glow-spot-secondary {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(40px);
}

/* Botones Premium */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  backdrop-filter: blur(8px);
}

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

/* Cabecera / Barra de Navegación */
header.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

header.main-header.scrolled {
  background: rgba(6, 9, 14, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.6rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-white);
}

.logo span {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.8rem;
}

.nav-item a {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition-smooth);
}

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

/* Menú móvil */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-white);
  margin: 5px 0;
  transition: var(--transition-smooth);
}

/* Footer Premium */
.main-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-glass);
  padding: 4.5rem 2rem 2rem 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.3fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-info p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 320px;
}

.footer-title {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

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

.footer-links a:hover {
  color: var(--text-white);
  transform: translateX(5px);
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-contact-list li {
  display: flex;
  gap: 0.7rem;
}

.footer-contact-list svg {
  flex-shrink: 0;
  color: var(--secondary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Banner de Cookies Flotante */
#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  width: calc(100% - 3rem);
  max-width: 600px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

#cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cookie-content {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.cookie-btns {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

/* Secciones Generales */
.section {
  padding: 7rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4.5rem;
}

.section-tag {
  color: var(--secondary);
  text-transform: uppercase;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Responsividad General */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(6, 9, 14, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    transition: var(--transition-smooth);
    border-top: 1px solid var(--border-glass);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  #cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .cookie-btns {
    width: 100%;
    justify-content: center;
  }
}
