/* ==========================================================================
   ReformabañosZaragoza - Modern Design System
   ========================================================================== */

:root {
  /* Colors - Water, Cleanliness, Elegance */
  --primary: #0284c7;
  /* Clean Blue */
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --secondary: #0f172a;
  /* Dark Slate */
  --secondary-light: #334155;
  --accent: #0ea5e9;

  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --border-color: #e2e8f0;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Layout & Spacing */
  --container-width: 1200px;
  --spacing-xs: 0.5rem;
  /* 8px */
  --spacing-sm: 1rem;
  /* 16px */
  --spacing-md: 2rem;
  /* 32px */
  --spacing-lg: 4rem;
  /* 64px */
  --spacing-xl: 8rem;
  /* 128px */

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--secondary);
  line-height: 1.2;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

h1 {
  margin-top: 0;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-lg) 0;
}

.section-light {
  background-color: var(--surface);
}

.section-dark {
  background-color: var(--secondary);
  color: var(--text-inverse);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: var(--text-inverse);
}

/* ==========================================================================
   Components -> Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--secondary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-accent {
  background-color: white;
  color: var(--primary);
}

.btn-accent:hover {
  background-color: var(--bg-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Top Bar (email, hours, social)
   ========================================================================== */
.topbar {
  background-color: var(--secondary);
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0.45rem 0;
  line-height: 1;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  padding-top: 0;
  padding-bottom: 0;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar a,
.topbar span {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.topbar a:hover {
  color: #f8fafc;
}

.topbar svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.topbar-sep {
  border-left: 1px solid rgba(255,255,255,0.1);
  padding-left: 1.25rem;
}

@media (max-width: 768px) {
  .topbar { display: none; }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  background-color: rgb(255 255 255 / 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

/* Header logo: icon only, no text */
.header .logo {
  font-size: 0;
  gap: 0;
}

.header .logo svg {
  width: 44px;
  height: 44px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Dropdown Menu */
.has-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  min-width: 240px;
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  z-index: 1001;
}

.has-dropdown:hover .dropdown {
  display: flex;
}

.dropdown a {
  padding: 0.5rem 1rem;
  font-weight: 400;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.dropdown a:last-child {
  border-bottom: none;
}

.dropdown a::after {
  display: none;
  /* remove underline effect for dropdown items */
}

.dropdown a:hover {
  background-color: var(--bg-color);
  color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 6rem 0 4rem;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg-color) 0%, #e0f2fe 100%);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  opacity: 0.1;
  border-radius: 50%;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  color: var(--primary);
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image img {
  width: 100%;
  height: 600px;
  object-fit: cover;
}

/* ==========================================================================
   Inner Pages Unified Blue Hero Section
   ========================================================================== */
.page-hero-blue {
  background-color: var(--primary);
  color: white;
  padding: 4rem 0;
  text-align: center;
  border-bottom: 3px solid var(--secondary);
}

.page-hero-blue-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-hero-blue-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  color: white;
}

.page-hero-blue-content p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.page-hero-advantages {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.page-hero-advantage {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 1.05rem;
}

.page-hero-advantage i {
  color: #fbbf24;
  /* highlight gold */
}

/* ==========================================================================
   Services Cards
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: #e0f2fe;
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-sm);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--text-muted);
  flex-grow: 1;
  font-size: 0.95rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
}

.service-link svg {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  transition: transform 0.2s;
}

.service-card:hover .service-link svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Features / Value Props
   ========================================================================== */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  text-align: center;
}

.feature-item {
  padding: var(--spacing-md);
}

.feature-item .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-sm);
  background: var(--surface);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--secondary);
  color: var(--text-inverse);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: white;
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
}

.footer-col p {
  color: #94a3b8;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    margin: 0 auto var(--spacing-md);
  }

  .hero-actions {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   Menú móvil (hamburguesa + panel desplegable)
   ========================================================================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links > a,
  .has-dropdown > a {
    display: block;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.05rem;
  }

  .nav-links a::after {
    display: none;
  }

  .has-dropdown {
    display: block;
    width: 100%;
  }

  /* Anular apertura por hover en táctil: solo acordeón por clic */
  .has-dropdown:hover .dropdown {
    display: none;
  }

  .dropdown {
    position: static;
    display: none;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-color);
  }

  .has-dropdown.open .dropdown {
    display: flex;
  }

  .dropdown a {
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links .btn-primary {
    margin-top: 1rem;
    text-align: center;
    border-bottom: none;
    padding: 0.85rem 1rem !important;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-float {
    display: none;
  }

  .mobile-cta-bar {
    display: flex;
  }

  body {
    padding-bottom: 60px;
  }
}

/* ==========================================================================
   Page Headers
   ========================================================================== */
.page-header {
  background-color: var(--surface);
  padding: var(--spacing-lg) 0 var(--spacing-sm);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-sm);
}

.page-header h1 span {
  color: var(--primary);
}

/* ==========================================================================
   Floating WhatsApp & Mobile CTA
   ========================================================================== */
/* Floating email button */
.email-float {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.email-float:hover {
  transform: scale(1.1);
  color: white;
  background-color: var(--primary-dark);
}

.email-float svg {
  width: 28px;
  height: 28px;
}

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: white;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.mobile-cta-bar a {
  flex: 1;
  text-align: center;
  padding: 1rem;
  font-weight: 600;
  color: white;
}

.cta-call {
  background-color: var(--primary);
}

.cta-call:hover {
  color: white;
}

.cta-whatsapp {
  background-color: #25d366;
}

.cta-whatsapp:hover {
  color: white;
}

/* Utilities */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}
/* ==========================================================================
   Accesibilidad (WCAG 2.2 AA): foco visible, motion reducido, sr-only
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #0284c7;
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}