/* ===================================================
   MotorHeritage Certificación S.L. — Global Styles
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #1F6F5E;
  --color-primary-light: #28917a;
  --color-primary-dark: #165248;
  --color-bg: #0a0a0a;
  --color-bg-2: #111111;
  --color-bg-3: #1a1a1a;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.07);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #e8e8e8;
  --color-text-muted: #a0a0a0;
  --color-text-subtle: #666666;
  --color-white: #ffffff;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s ease;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
  --max-width: 1200px;
  --header-h: 70px;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-white);
}

ul {
  list-style: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  color: var(--color-text);
  margin-bottom: 1rem;
}

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 80px 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 111, 94, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

/* ---------- Glass Card ---------- */
.card-glass {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.card-glass:hover {
  background: var(--color-surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ---------- Section Title ---------- */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header .section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: 0.75rem;
}

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

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

/* ---------- Divider line accent ---------- */
.divider-accent {
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 1rem auto 0;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}

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

/* Glass style on scroll */
.site-header.scrolled {
  background: rgba(10, 10, 10, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--color-border);
}

/* Logo */
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-primary-light);
  letter-spacing: -0.01em;
}

.logo-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.07);
}

.nav-links a.active {
  color: var(--color-primary-light);
}

/* CTA in nav */
.nav-cta {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--color-primary-light) !important;
  transform: translateY(-1px);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  transition: background var(--transition);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.07);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem;
  z-index: 999;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-bottom: 0.25rem;
  text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu a.active {
  color: var(--color-primary-light);
}

.mobile-menu .mobile-cta {
  margin-top: 1rem;
  background: var(--color-primary);
  color: var(--color-white) !important;
  text-align: center;
  font-weight: 600 !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

/* Hero background with <picture> element (real photograph) */
.hero-bg-picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
  filter: grayscale(20%) brightness(0.65);
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Dark gradient overlay on top of the picture */
  background-color: transparent;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.85) 0%,
    rgba(10, 26, 22, 0.8) 40%,
    rgba(10, 10, 10, 0.75) 100%
  );
}

/* Gradient-only hero (no image / picture failed to load) */
.hero-bg.no-image {
  background: linear-gradient(135deg, #0a0a0a 0%, #0d1f1a 50%, #0a0a0a 100%);
}

.hero-bg.no-image::before {
  background: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 1.5rem;
}

.hero-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  border: 1px solid rgba(31, 111, 94, 0.4);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
  color: var(--color-primary-light);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Small hero for inner pages */
.hero-small {
  min-height: 320px;
  padding-top: var(--header-h);
  padding-bottom: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #0d1f1a 60%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-small::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
}

.hero-small .hero-content {
  padding: 3rem 1.5rem;
}

/* ============================================================
   SITUATIONS SECTION
   ============================================================ */
.situations {
  background: var(--color-bg-2);
}

.situations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.situation-card {
  padding: 2rem;
}

.situation-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(31, 111, 94, 0.15);
  border: 1px solid rgba(31, 111, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.situation-icon svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary-light);
}

.situation-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-white);
}

.situation-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ============================================================
   PROCESS SECTION
   ============================================================ */
.process {
  background: var(--color-bg);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.process-step {
  padding: 1.75rem;
  position: relative;
  text-align: center;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  color: rgba(31, 111, 94, 0.2);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}

.process-step h4 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  color: var(--color-white);
  font-family: var(--font-body);
  font-weight: 600;
}

.process-step p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

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

/* ============================================================
   CATALOGACION PAGE
   ============================================================ */

/* Two column text */
.two-col-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.two-col-text p {
  font-size: 0.97rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.two-col-text p strong {
  color: var(--color-text);
}

/* Requirements grid */
.req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.req-card {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.req-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  background: rgba(31, 111, 94, 0.15);
  border: 1px solid rgba(31, 111, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.req-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary-light);
}

.req-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.req-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.req-card--wide {
  grid-column: 1 / -1;
}

.req-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

/* ===================== BENEFICIOS - LISTAS ===================== */
.beneficio-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.beneficio-list li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.beneficio-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary-light);
  font-weight: bold;
}

.beneficio-nota {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(40, 145, 122, 0.08);
  border-left: 3px solid var(--color-primary-light);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.beneficio-nota strong {
  color: var(--color-primary-light);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  padding: 2rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.service-card .service-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: rgba(31, 111, 94, 0.15);
  border: 1px solid rgba(31, 111, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card .service-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary-light);
}

.service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Process detail (6 steps) */
.process-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.process-detail-step {
  padding: 1.75rem;
}

.process-detail-step .step-number {
  font-size: 2.2rem;
}

.process-detail-step h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.process-detail-step p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(31, 111, 94, 0.15) 0%, rgba(31, 111, 94, 0.05) 100%);
  border: 1px solid rgba(31, 111, 94, 0.25);
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-form-card,
.contact-info-card {
  padding: 2.5rem;
}

.contact-form-card h2,
.contact-info-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.contact-form-card .subtitle,
.contact-info-card .subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* Form fields */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.form-group label .required {
  color: var(--color-primary-light);
  margin-left: 3px;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-white);
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 111, 94, 0.6);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(31, 111, 94, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-subtle);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select option {
  background: var(--color-bg-3);
  color: var(--color-text);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
  border-radius: 4px;
}

.form-check a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Form success message */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.visible {
  display: block;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(31, 111, 94, 0.15);
  border: 2px solid rgba(31, 111, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary-light);
}

.form-success h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Contact info card */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-info-item:last-child {
  border-bottom: none;
}

.contact-info-item .ci-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(31, 111, 94, 0.15);
  border: 1px solid rgba(31, 111, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-item .ci-icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary-light);
}

.contact-info-item .ci-text {
  flex: 1;
}

.contact-info-item .ci-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-subtle);
  margin-bottom: 0.3rem;
}

.contact-info-item .ci-value {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0;
}

.contact-info-item .ci-value a {
  color: var(--color-primary-light);
}

.contact-info-item .ci-value a:hover {
  color: var(--color-white);
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 1.5rem 80px;
}

.legal-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-content h2 {
  font-size: 1.3rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-primary-light);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-content h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.legal-content a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-info-box {
  background: rgba(31, 111, 94, 0.07);
  border: 1px solid rgba(31, 111, 94, 0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.legal-info-box p {
  margin-bottom: 0.3rem;
  font-size: 0.93rem;
}

.legal-info-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-2);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
  margin-bottom: 1.25rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col ul li a:hover {
  color: var(--color-white);
}

.footer-contact-email {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
  margin-bottom: 0.75rem;
}

.footer-contact-email:hover {
  color: var(--color-white);
}

.footer-contact-email svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-response {
  font-size: 0.82rem;
  color: var(--color-text-subtle);
  margin-bottom: 0;
}

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

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--color-text-subtle);
  margin-bottom: 0;
}

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

.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--color-text-subtle);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--color-text);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }

  .fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
  }

  .fade-in-delay-1 { animation-delay: 0.15s; }
  .fade-in-delay-2 { animation-delay: 0.3s; }
  .fade-in-delay-3 { animation-delay: 0.45s; }

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

/* Fallback: always visible when reduced motion prefers */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .fade-in {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.pt-0 { padding-top: 0 !important; }
.bg-alt { background: var(--color-bg-2); }

/* ============================================================
   RESPONSIVE — TABLET (max 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .situations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .req-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ============================================================
   RESPONSIVE — MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  section {
    padding: 60px 0;
  }

  /* Nav */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Grids → single column */
  .situations-grid,
  .process-grid,
  .req-grid,
  .req-grid--2col,
  .services-grid,
  .process-detail-grid,
  .two-col-text {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* CTA banner */
  .cta-banner {
    padding: 2.5rem 1.5rem;
  }

  /* Legal */
  .legal-content {
    padding: 40px 1rem 60px;
  }

  /* Contact cards */
  .contact-form-card,
  .contact-info-card {
    padding: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero-label {
    display: none;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .process-step,
  .situation-card,
  .req-card,
  .service-card {
    padding: 1.5rem;
  }
}

/* ============================================================
   SITUATION BADGE (RD 892/2024 — Grupo A / B / Patrimonio)
   ============================================================ */
.situation-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: rgba(31, 111, 94, 0.2);
  border: 1px solid rgba(31, 111, 94, 0.4);
  color: var(--color-primary-light);
  margin-bottom: 0.75rem;
}

.situation-badge--b {
  background: rgba(180, 120, 30, 0.15);
  border-color: rgba(180, 120, 30, 0.35);
  color: #c99a4e;
}

.situation-badge--pat {
  background: rgba(100, 80, 160, 0.15);
  border-color: rgba(100, 80, 160, 0.35);
  color: #9d82d8;
}

/* ============================================================
   GRUPO A / GRUPO B CARDS
   ============================================================ */
.grupos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 1rem;
}

.grupo-card {
  padding: 2.25rem;
}

.grupo-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.grupo-header h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0;
}

.grupo-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  background: rgba(31, 111, 94, 0.2);
  border: 1px solid rgba(31, 111, 94, 0.4);
  color: var(--color-primary-light);
  white-space: nowrap;
}

.grupo-badge--b {
  background: rgba(180, 120, 30, 0.15);
  border-color: rgba(180, 120, 30, 0.35);
  color: #c99a4e;
}

.grupo-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.grupo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.grupo-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.grupo-list li span {
  color: var(--color-primary-light);
  font-weight: 700;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ============================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
  border-radius: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 3px;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 10000;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   GRUPO GRID RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .grupos-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   WELCOME SECTION (index.html — warm intro after hero)
   ============================================================ */
.welcome-section {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
  background: var(--color-bg-3);
}

.welcome-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.welcome-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.welcome-content {
  position: relative;
  z-index: 1;
}

.welcome-text {
  max-width: 720px;
}

.welcome-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--color-white);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.welcome-text .divider-accent {
  margin: 1rem 0 1.5rem 0;
}

.welcome-text p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

/* ============================================================
   HOME SERVICES SECTION (index.html — 10 service cards)
   ============================================================ */
.home-services {
  background: var(--color-bg-2);
}

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ===================== SERVICE CARD — PHOTOGRAPH ===================== */
.servicio-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: block;
}

.servicio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
  display: block;
}

.home-service-card:hover .servicio-image img {
  transform: scale(1.05);
}

.home-service-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(31, 111, 94, 0.15);
  border: 1px solid rgba(31, 111, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-icon-wrap svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary-light);
}

.home-service-card h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 0;
}

.home-service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0;
  flex: 1;
}

.home-service-cta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition);
  margin-top: auto;
}

.home-service-cta:hover {
  color: var(--color-white);
}

.home-services-link {
  text-align: center;
  margin-top: 2.5rem;
}

.home-services-link p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.home-services-link a {
  color: var(--color-primary-light);
  font-weight: 600;
}

.home-services-link a:hover {
  color: var(--color-white);
}

/* ============================================================
   FAQ SECTION (catalogacion.html)
   ============================================================ */
.faq-section {
  background: var(--color-bg-2);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-item summary h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
  flex: 1;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-primary-light);
  transition: transform var(--transition);
}

.faq-icon svg {
  width: 24px;
  height: 24px;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 2rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

.faq-answer p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-top: 1rem;
}

.faq-answer p strong {
  color: var(--color-text);
}

.faq-answer a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-answer ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  list-style: disc;
}

.faq-answer ul li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.faq-answer ul li strong {
  color: var(--color-text);
}

.faq-cta {
  text-align: center;
  margin-top: 2.5rem;
}

.faq-cta p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.faq-cta a {
  color: var(--color-primary-light);
  font-weight: 600;
}

.faq-cta a:hover {
  color: var(--color-white);
}

/* ============================================================
   ENAC NOTICE (contacto.html)
   ============================================================ */
.enac-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(31, 111, 94, 0.08);
  border: 1px solid rgba(31, 111, 94, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.enac-notice svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--color-primary-light);
  margin-top: 1px;
}

.enac-notice p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

.enac-notice p strong {
  color: var(--color-text);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  min-height: calc(100vh - var(--header-h) - 200px);
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
}

.error-content {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.error-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(31, 111, 94, 0.1);
  border: 2px solid rgba(31, 111, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.error-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-primary-light);
}

.error-code {
  display: block;
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 700;
  color: rgba(31, 111, 94, 0.2);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1rem;
}

.error-content p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.error-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE — HOME SERVICES & FAQ
   ============================================================ */
@media (max-width: 1024px) {
  .home-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-services-grid {
    grid-template-columns: 1fr;
  }

  .faq-item summary {
    padding: 1.25rem 1.5rem;
  }

  .faq-answer {
    padding: 0 1.5rem 1.25rem;
  }

  .error-links {
    flex-direction: column;
    align-items: center;
  }

  .error-links .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .home-service-card {
    padding: 1.5rem;
  }

  .error-code {
    font-size: 5rem;
  }
}

/* ===================== COOKIE BANNER ===================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 30, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(193, 163, 98, 0.3);
  padding: 1.5rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

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

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary-light);
  font-weight: 600;
}

.cookie-banner-text p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.cookie-link {
  color: var(--color-primary-light);
  text-decoration: underline;
  transition: color var(--transition);
}

.cookie-link:hover {
  color: var(--color-white);
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner-actions .btn {
  white-space: nowrap;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.cookie-preferences-reset {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(31, 111, 94, 0.1);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
}

.cookie-preferences-reset p {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 1rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }
}

/* Remove spin buttons from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Radio group styles */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
}

.radio-label input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* ============================================
   Flatpickr Custom Styles - TEXTO BLANCO EN CABECERA
   ============================================ */

.flatpickr-calendar {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-family: var(--font-body);
}

/* Cabecera del calendario - fondo gris oscuro */
.flatpickr-months {
  background: #2a2a2a;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

/* Contenedor del mes actual - BLANCO */
.flatpickr-current-month {
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 600;
}

/* Texto del mes (span) - FORZAR BLANCO */
.flatpickr-current-month span.cur-month {
  color: #ffffff !important;
  font-weight: 600;
}

/* Selector dropdown del mes - BLANCO */
.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #3a3a3a;
  color: #ffffff !important;
  border: 1px solid #4a4a4a;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: #3a3a3a;
  color: #ffffff;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: #4a4a4a;
}

/* Año (numInputWrapper) - FORZAR BLANCO */
.flatpickr-current-month .numInputWrapper {
  color: #ffffff !important;
}

.flatpickr-current-month .numInputWrapper input,
.flatpickr-current-month .numInputWrapper input.cur-year {
  background: #3a3a3a !important;
  color: #ffffff !important;
  border: 1px solid #4a4a4a;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 1rem;
}

.flatpickr-current-month .numInputWrapper:hover input {
  background: #4a4a4a !important;
}

/* Flechas arriba/abajo del año */
.flatpickr-current-month .numInputWrapper span.arrowUp:after,
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
  border-bottom-color: #ffffff;
  border-top-color: #ffffff;
}

/* Flechas de navegación (prev/next month) - BLANCAS */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: #ffffff !important;
  padding: 10px;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #ffffff !important;
  width: 14px;
  height: 14px;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--color-primary) !important;
}

/* Días de la semana */
.flatpickr-weekdays {
  background: var(--color-bg);
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
}

.flatpickr-weekday {
  color: var(--color-text-subtle);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Días del calendario */
.flatpickr-day {
  color: var(--color-text);
  border: none;
  border-radius: 0.25rem;
}

.flatpickr-day:hover:not(.disabled):not(.selected) {
  background: var(--color-bg);
  border-color: var(--color-primary);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}

/* Días deshabilitados (sábados y domingos) */
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: var(--color-text-subtle);
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
}

.flatpickr-day.today {
  border: 2px solid var(--color-primary);
}

.flatpickr-day.today:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.flatpickr-day.today.selected {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Input styling */
input#fecha-preferida {
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: var(--color-text);
  transition: border-color 0.2s ease;
}

input#fecha-preferida:focus {
  outline: none;
  border-color: var(--color-primary);
}

input#fecha-preferida::placeholder {
  color: var(--color-text-subtle);
}

/* ============================================
   Cloudinary Upload Widget Styles
   ============================================ */

.btn-upload {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  width: 100%;
  text-align: center;
}

.btn-upload:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(61, 130, 255, 0.3);
}

.btn-upload:active {
  transform: translateY(0);
}

/* Lista de archivos subidos */
.archivos-lista {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archivo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s ease;
}

.archivo-item:hover {
  border-color: var(--color-primary);
}

.archivo-nombre {
  color: var(--color-text);
  font-size: 0.9rem;
  flex: 1;
  word-break: break-all;
}

.archivo-remove {
  background: transparent;
  border: none;
  color: var(--color-text-subtle);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.2s ease;
  margin-left: 0.5rem;
}

.archivo-remove:hover {
  color: #ff4444;
}

/* Estado del formulario */
.form-status {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.form-status.info {
  background: rgba(61, 130, 255, 0.1);
  border: 1px solid rgba(61, 130, 255, 0.3);
  color: var(--color-text);
}

.form-status.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--color-text);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 768px) {
  .btn-upload {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .archivo-nombre {
    font-size: 0.85rem;
  }
}

/* ============================================
   hCaptcha Styles
   ============================================ */

.h-captcha {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .h-captcha iframe {
    filter: invert(0.9) hue-rotate(180deg);
  }
}

@media (max-width: 768px) {
  .h-captcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }
}

/* ============================================
   Solicitud Form — Fieldset & Extra Styles
   ============================================ */

.form-fieldset {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.form-fieldset legend,
.fieldset-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-light);
  padding: 0 0.5rem;
  margin-bottom: 1rem;
}

.form-info-note {
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.file-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.2s;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: var(--color-primary);
}

.file-upload-area input[type="file"] {
  display: block;
  width: 100%;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.file-upload-area small {
  display: block;
  margin-top: 0.5rem;
  color: var(--color-text-subtle);
  font-size: 0.8rem;
}
