/* ============================================================
   CENTRO COMETEA — DESIGN SYSTEM
   Font: Poppins 400/500/600/700 via Google Fonts
   ============================================================ */

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === TOKENS === */
:root {
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Brand */
  --clr-primary:       #5fb89e;
  --clr-primary-dark:  #4aa387;
  --clr-primary-light: #eaf7f3;
  --clr-primary-btn:   #ffffff;

  /* Backgrounds */
  --clr-bg:       #ffffff;
  --clr-bg-alt:   #faf9f7;
  --clr-bg-salmon:#fdf1ec;

  /* Text */
  --clr-text:       #1f2937;
  --clr-muted:      #6b7280;
  --clr-light-text: #9ca3af;
  --clr-white:      #ffffff;

  /* UI */
  --clr-border:  #e5e7eb;
  --clr-star:    #f59e0b;
  --clr-footer:  #1a2e3a;
  --clr-footer-t:#94a3b8;

  /* Spacing (8-pt scale) */
  --s1: 0.25rem;  /* 4 */
  --s2: 0.5rem;   /* 8 */
  --s3: 0.75rem;  /* 12 */
  --s4: 1rem;     /* 16 */
  --s5: 1.25rem;  /* 20 */
  --s6: 1.5rem;   /* 24 */
  --s8: 2rem;     /* 32 */
  --s10:2.5rem;   /* 40 */
  --s12:3rem;     /* 48 */
  --s16:4rem;     /* 64 */
  --s20:5rem;     /* 80 */

  /* Type */
  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-base:1rem;
  --t-lg:  1.125rem;
  --t-xl:  1.25rem;
  --t-2xl: 1.5rem;
  --t-3xl: 1.875rem;
  --t-4xl: 2.25rem;
  --t-5xl: 3rem;

  /* Radius */
  --r-sm:  4px;
  --r:     8px;
  --r-lg:  12px;
  --r-xl:  20px;
  --r-2xl: 28px;
  --r-full:9999px;

  /* Shadow */
  --sh-sm: 0 1px 4px rgba(0,0,0,0.07);
  --sh:    0 4px 16px rgba(0,0,0,0.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,0.10);

  /* Layout */
  --max-w: 1200px;
  --hdr-h: 72px;
}

/* === BASE === */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s4);
  background: var(--clr-primary);
  color: #fff;
  padding: var(--s2) var(--s5);
  border-radius: 0 0 var(--r) var(--r);
  font-size: var(--t-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s6);
}
@media (min-width: 768px)  { .container { padding-inline: var(--s8);  } }
@media (min-width: 1024px) { .container { padding-inline: var(--s12); } }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: var(--t-base);
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  box-shadow: 0 4px 14px rgba(95,184,158,0.38);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--clr-primary-light);
}

/* spacing helpers */
.mt-1 { margin-top: var(--s3); }
.mt-2 { margin-top: var(--s5); }
.mt-3 { margin-top: var(--s8); }

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
  border-radius: var(--r-full);
  font-size: var(--t-sm);
  font-weight: 500;
}

/* === SECTIONS === */
.section       { padding-block: var(--s16); }
.section-alt   { background: var(--clr-bg-alt); }
.section-salmon{ background: var(--clr-bg-salmon); }

.section-header {
  text-align: center;
  margin-bottom: var(--s10);
}
.section-header h2 {
  font-size: var(--t-3xl);
  font-weight: 700;
  display: inline-block;
  position: relative;
  padding-bottom: var(--s4);
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 3px;
  background: var(--clr-primary);
  border-radius: var(--r-full);
}

/* === TWO-COLUMN LAYOUT === */
.two-col {
  display: grid;
  gap: var(--s10);
  align-items: center;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col.reverse { direction: rtl; }
  .two-col.reverse > * { direction: ltr; }
}

.col-image img {
  width: 100%;
  border-radius: var(--r-2xl);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.col-text h2 {
  font-size: var(--t-3xl);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--s5);
}
.col-text p {
  color: var(--clr-muted);
  line-height: 1.75;
  margin-bottom: var(--s4);
}

/* === CARD GRID === */
.card-grid {
  display: grid;
  gap: var(--s5);
}
@media (min-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}

/* === SERVICE CARDS === */
.service-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--clr-white);
  box-shadow: var(--sh-sm);
  transition: transform 0.22s, box-shadow 0.22s;
  color: var(--clr-text);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-lg);
}
.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.service-card-body {
  padding: var(--s4) var(--s5) var(--s5);
  flex: 1;
}
.service-card-body h3 {
  font-size: var(--t-lg);
  font-weight: 600;
}

/* === ICON CARDS === */
.card {
  background: var(--clr-white);
  border-radius: var(--r-lg);
  padding: var(--s8) var(--s5);
  text-align: center;
  box-shadow: var(--sh-sm);
  transition: transform 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh);
}
.card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--s4);
  object-fit: contain;
}
.card h3 {
  font-size: var(--t-base);
  font-weight: 600;
  line-height: 1.4;
}

/* === STEPS === */
.steps {
  display: grid;
  gap: var(--s6);
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s8);
  }
}
.step {
  background: var(--clr-white);
  border-radius: var(--r-xl);
  padding: var(--s10) var(--s6);
  text-align: center;
  box-shadow: var(--sh-sm);
}
.step h3 {
  font-size: var(--t-xl);
  font-weight: 600;
  margin-bottom: var(--s3);
}
.step p {
  color: var(--clr-muted);
  font-size: var(--t-sm);
  line-height: 1.7;
}

/* === TESTIMONIALS === */
.testimonials-grid {
  display: grid;
  gap: var(--s5);
}
@media (min-width: 640px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
.testimonial {
  background: var(--clr-white);
  border-radius: var(--r-xl);
  padding: var(--s8);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.stars {
  color: var(--clr-star);
  font-size: var(--t-lg);
  letter-spacing: 2px;
}
.testimonial blockquote p {
  color: var(--clr-muted);
  font-size: var(--t-sm);
  line-height: 1.8;
  font-style: italic;
}
.testimonial cite {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--clr-primary-dark);
  font-style: normal;
  margin-top: auto;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  gap: var(--s8);
}
@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
}
.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item h3 {
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-muted);
  margin-bottom: var(--s1);
}
.contact-item a,
.contact-item p {
  font-size: var(--t-base);
  font-weight: 500;
  color: var(--clr-text);
}
.contact-item a:hover { color: var(--clr-primary); }

.map-container {
  border-radius: var(--r-xl);
  overflow: hidden;
  height: 360px;
  box-shadow: var(--sh);
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled {
  border-color: var(--clr-border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--hdr-h);
  padding-inline: var(--s6);
  max-width: var(--max-w);
  margin-inline: auto;
  gap: var(--s4);
}

.logo { line-height: 0; flex-shrink: 0; }
.logo img { height: 44px; width: auto; }

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: var(--s5);
}
@media (min-width: 1024px) { .main-nav { display: flex; } }

.main-nav a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--clr-muted);
  transition: color 0.18s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active { color: var(--clr-primary); }

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: var(--s2);
  padding: 0.45rem 1rem;
  background: #25d366;
  color: #fff !important;
  border-radius: var(--r-full);
  font-size: var(--t-sm);
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: #1da851;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(37,211,102,0.45);
}

.header-social {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-left: var(--s1);
}
.header-social a {
  color: var(--clr-muted);
  line-height: 0;
  transition: color 0.18s;
}
.header-social a:hover { color: var(--clr-primary); }

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r);
  flex-shrink: 0;
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  width: 100%;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4) var(--s6) var(--s6);
  background: var(--clr-white);
  border-top: 1px solid var(--clr-border);
}
.mobile-nav.open { display: flex; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

.mobile-nav a {
  padding: var(--s3) var(--s4);
  border-radius: var(--r);
  font-weight: 500;
  color: var(--clr-text);
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
}
.mobile-nav .nav-cta {
  margin-top: var(--s2);
  justify-content: center;
}
.mobile-nav .nav-social {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--clr-muted);
  padding: var(--s3) var(--s4);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: flex;
  min-height: 540px;
  overflow: hidden;
}
.hero-bg {
  flex: 1;
  order: 2;
  background-image: url('/assets/images/cabecera2b.jpg');
  background-size: cover;
  background-position: center 20%;
}
.hero-content {
  flex: 1;
  order: 1;
  display: flex;
  align-items: center;
  padding: var(--s16) var(--s10) var(--s16) var(--s12);
}
.hero-text { max-width: 520px; margin-left: auto; }
.hero-text h1 {
  font-size: var(--t-4xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--s5);
}
.hero-text > p {
  font-size: var(--t-lg);
  color: var(--clr-muted);
  line-height: 1.7;
  margin-bottom: var(--s6);
  max-width: 440px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-bottom: var(--s6);
}

/* Hero responsive */
@media (max-width: 767px) {
  .hero {
    flex-direction: column;
    min-height: auto;
  }
  .hero-bg    { order: 1; height: 260px; flex: none; }
  .hero-content {
    order: 2;
    padding: var(--s10) var(--s6);
    flex: none;
  }
  .hero-text { max-width: none; margin-left: 0; }
  .hero-text h1   { font-size: var(--t-3xl); }
  .hero-text > p  { font-size: var(--t-base); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content { padding: var(--s12) var(--s8); }
  .hero-text h1 { font-size: var(--t-3xl); }
  .hero-text { max-width: none; margin-left: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-footer);
  color: var(--clr-footer-t);
  padding-top: var(--s16);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: var(--s8);
  padding-bottom: var(--s12);
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1.5fr; } }

.footer-col h4 {
  font-size: var(--t-base);
  font-weight: 600;
  color: var(--clr-white);
  margin-bottom: var(--s4);
}
.footer-col > p {
  font-size: var(--t-sm);
  line-height: 1.7;
}
.footer-col a {
  display: flex;
  align-items: center;
  font-size: var(--t-sm);
  color: var(--clr-footer-t);
  padding: var(--s2) 0;
  transition: color 0.18s;
}
.footer-col a:hover { color: var(--clr-white); }

.footer-social {
  display: flex;
  gap: var(--s3);
  margin-top: var(--s5);
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  background: rgba(255,255,255,0.10);
  border-radius: var(--r-full);
  transition: background 0.18s;
}
.footer-social a:hover { background: var(--clr-primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-block: var(--s6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  align-items: center;
  justify-content: space-between;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
}
.footer-legal a {
  font-size: var(--t-xs);
  color: var(--clr-footer-t);
  padding: 0;
  transition: color 0.18s;
}
.footer-legal a:hover { color: var(--clr-white); }
.footer-bottom > p {
  font-size: var(--t-xs);
  color: var(--clr-light-text);
}

/* ============================================================
   FLOATING BUTTONS
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 4px 18px rgba(37,211,102,0.50);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 22px rgba(37,211,102,0.60);
}

.instagram-float {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  color: #fff;
  box-shadow: 0 4px 14px rgba(188,24,136,0.40);
  transition: transform 0.2s;
}
.instagram-float:hover { transform: scale(1.1); }
.instagram-float svg { width: 22px; height: 22px; }

.back-to-top {
  position: fixed;
  bottom: 150px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--sh);
  transition: opacity 0.25s, transform 0.2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover   { transform: translateY(-2px); }

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.cookie-consent {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--clr-white);
  border-top: 1px solid var(--clr-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.10);
  padding: var(--s5) var(--s6);
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-consent.show { bottom: 0; }
.cookie-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5);
  align-items: center;
  justify-content: space-between;
}
.cookie-text h3 {
  font-size: var(--t-base);
  font-weight: 600;
  margin-bottom: var(--s1);
}
.cookie-text p {
  font-size: var(--t-sm);
  color: var(--clr-muted);
}
.cookie-text a {
  color: var(--clr-primary);
  text-decoration: underline;
}
.cookie-buttons {
  display: flex;
  gap: var(--s3);
  flex-shrink: 0;
}

/* ============================================================
   FOCUS STYLES (accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
