/* ==========================================================================
   CERRAJEROS ALCORCÓN 24H — SISTEMA DE DISEÑO BLUEPRINT TÉCNICO
   Basado en tokens.json: Paleta Blueprint, Safety Orange, Glass Panels
   ========================================================================== */

:root {
  /* Blueprint Colors */
  --bp-950: #070b14;
  --bp-900: #0B1120;
  --bp-800: #0f172a;
  --bp-700: #1e293b;
  --bp-600: #2563eb;
  --bp-500: #3b82f6;
  --bp-400: #60a5fa;
  --bp-300: #93c5fd;
  --bp-200: #bfdbfe;
  --bp-100: #dbeafe;
  --bp-50:  #eff6ff;

  /* Safety & High Visibility Accents */
  --safety-600: #ea580c;
  --safety-500: #f97316;
  --safety-400: #fb923c;
  --neon-500:   #FF5F1F;

  /* Cyan Accents */
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;

  /* Status */
  --success: #22c55e;
  --warning: #eab308;
  --error:   #ef4444;

  /* Glass Surface & Borders */
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-accent: rgba(59, 130, 246, 0.3);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --header-height: 72px;
  --max-width: 1200px;
}

/* Reset y Base */
*, *::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-sans);
  background-color: var(--bp-800);
  color: var(--bp-100);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--bp-300);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

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

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

.font-mono {
  font-family: var(--font-mono);
}

/* Efectos visuales Blueprint */
.bg-blueprint-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
}

.text-glow {
  text-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.text-gradient {
  background: linear-gradient(135deg, var(--bp-400), var(--cyan-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animaciones HUD de Blueprint */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.hud-ring-outer {
  animation: spin-slow 25s linear infinite;
}

.hud-ring-inner {
  animation: spin-reverse 18s linear infinite;
}

/* Tarjetas de Marcas Técnicas */
.brand-cylinder-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.brand-cylinder-card:hover {
  transform: translateY(-4px);
  border-color: var(--bp-500);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.brand-cylinder-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #000;
  transition: transform 0.5s ease;
}

.brand-cylinder-card:hover .brand-cylinder-img {
  transform: scale(1.05);
}

/* Galería de Trabajos con Hover */
.gallery-card {
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: var(--bp-900);
  cursor: pointer;
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.1);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: opacity 0.3s ease;
}


/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section-py {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section-py {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Grid & Flex Helpers */
.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-safety {
  background: var(--safety-500);
  color: #fff;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.35);
}

.btn-safety:hover {
  background: var(--safety-600);
  color: #fff;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.55);
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

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

.btn-primary {
  background: var(--bp-600);
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--bp-500);
  color: #fff;
  transform: translateY(-2px);
}

/* Pills de estado */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bp-200);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--success);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-badge {
  display: inline-block;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid var(--safety-500);
  color: var(--safety-400);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.15rem;
}

.nav-link {
  color: var(--bp-100);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s ease;
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--bp-500);
  border-radius: 2px;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--safety-500), var(--safety-600));
  color: #fff;
  padding: 0.55rem 1.15rem;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
  transition: all 0.2s ease;
}

.header-phone-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
  color: #fff;
}

/* Botón Hamburguesa */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bp-900);
    border-bottom: 1px solid var(--glass-border-accent);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1.25rem;
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.5rem 0;
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bp-950);
  border-top: 1px solid rgba(59, 130, 246, 0.2);
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-title {
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9rem;
}

.footer-list a {
  color: var(--bp-200);
}

.footer-list a:hover {
  color: #fff;
}

.footer-legal-badge {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  font-size: 0.75rem;
  border-radius: 6px;
  line-height: 1.4;
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--bp-300);
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--bp-900);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bp-300);
  transition: all 0.2s ease;
}

.footer-socials a:hover {
  color: #fff;
  border-color: var(--bp-500);
  transform: translateY(-2px);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE LLAMADA 24H
   ========================================================================== */
.floating-call {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--safety-500), var(--safety-600));
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: all 0.25s ease;
}

.floating-call:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.7);
  color: #fff;
}

.floating-call-icon {
  width: 20px;
  height: 20px;
  animation: wiggle 2.5s infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-15deg); }
  20%, 40% { transform: rotate(15deg); }
  50% { transform: rotate(0deg); }
}

@media (max-width: 640px) {
  .floating-call {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.15rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   FAQ ACORDEÓN
   ========================================================================== */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.faq-item.open {
  border-color: var(--bp-500);
  background: rgba(11, 17, 32, 0.8);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  color: var(--bp-400);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--safety-500);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--bp-200);
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--bp-300);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.breadcrumbs a {
  color: var(--bp-300);
}

.breadcrumbs a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumbs span.current {
  color: var(--bp-100);
}

/* ==========================================================================
   CARDS DE SERVICIOS
   ========================================================================== */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bp-300);
  margin-bottom: 1.25rem;
}

.service-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card-desc {
  font-size: 0.95rem;
  color: var(--bp-200);
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.service-card-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   TABLAS DE TARIFAS
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.tarifa-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.tarifa-table th {
  background: rgba(11, 17, 32, 0.9);
  color: var(--bp-300);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border-accent);
}

.tarifa-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--bp-100);
}

.tarifa-table tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

.tarifa-table .price-cell {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.tarifa-table .price-total {
  color: #fff;
  font-size: 1.05rem;
}

.tarifa-table .price-base {
  color: var(--bp-300);
  font-size: 0.825rem;
}

/* ==========================================================================
   PÁGINA 404
   ========================================================================== */
.error-page {
  min-height: calc(100vh - var(--header-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
  background: linear-gradient(135deg, var(--safety-500), var(--bp-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

/* ==========================================================================
   FORMULARIOS (WEB3FORMS COMPATIBLE)
   ========================================================================== */
.form-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
}

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

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bp-100);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--bp-500);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
  background: rgba(11, 17, 32, 0.95);
}

.form-select option {
  background: var(--bp-900);
  color: #fff;
}

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

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--bp-200);
  cursor: pointer;
  margin-top: 0.5rem;
}

.form-checkbox-label input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--safety-500);
}

.form-status {
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 1rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success);
  color: #86efac;
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--error);
  color: #fca5a5;
}

