/* =========================================================
   RESET + BASE
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --brand-a: #4fb3c6;   /* azul HC */
  --brand-b: #9fc9d6;   /* azul/gris */
  --text:   #0b1220;
  --muted:  #475569;
  --muted2: #334155;

  --card: rgba(255,255,255,0.92);
  --shadow: 0 18px 45px rgba(0,0,0,0.14);
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #f4f7f8;
}

/* Evita imágenes sueltas gigantes por culpa de estilos viejos */
img { max-width: 100%; height: auto; display: block; }

/* =========================================================
   HEADER / NAV (FORZADO PARA QUE NO QUEDE BLANCO)
========================================================= */
header {
  background-image: none !important;
  background: linear-gradient(90deg, var(--brand-a) 0%, var(--brand-b) 100%) !important;
  padding: 14px 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  color: #fff;
}

nav {
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* Logo dentro de header/nav: capado SIEMPRE */
header img,
nav img {
  max-height: 56px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

/* Por si tienes contenedores típicos */
.logo, .brand, .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-height: 56px;
}

/* Menú en UL */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Links */
nav a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(0,0,0,0.22);
}

nav a:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

nav a.active,
nav a[aria-current="page"] {
  background: rgba(255,255,255,0.28);
}

/* Botón suave en menú */
.btn-soft{
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 8px 14px;
  border-radius: 999px;
}

/* =========================================================
   MAIN + FONDO FARMACIA (MENOS “BLANCO” Y MÁS CONTRASTE)
========================================================= */
main {
  min-height: calc(100vh - 160px);

  background-image: url("../img/hero-farmacia.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  position: relative;
}

/* Antes estaba demasiado blanco: bajamos opacidad */
main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.62);
  pointer-events: none;
  z-index: 0;
}

main > * {
  position: relative;
  z-index: 1;
}

/* CONTRASTE GLOBAL dentro de main */
main h1, main h2, main h3, main h4 {
  color: var(--text) !important;
}

main p, main li, main span, main small {
  color: var(--muted2);
}

/* Si algún bloque venía con texto blanco, lo corregimos en main */
main .text-white,
main [style*="color: #fff"],
main [style*="color:#fff"],
main [style*="color: white"]{
  color: var(--text) !important;
}

/* =========================================================
   SECCIONES / CONTENEDORES
========================================================= */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 20px;
}

p { line-height: 1.65; }

.muted{ color: var(--muted); }

/* Tarjeta genérica */
.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

/* =========================================================
   HERO SLIDER (si ya lo tienes, esto es compatible)
========================================================= */
.hero-slider{
  width: 100%;
  max-width: none;
  padding: 0;
}

.slider{
  position: relative;
  width: 100%;
  height: clamp(360px, 55vh, 720px);
  overflow: hidden;
}

.slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}

.slide.active{ opacity: 1; }

.slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.12) 55%, rgba(0,0,0,0.05) 100%);
  pointer-events:none;
}

.slide-content{
  position:absolute;
  left: max(28px, calc((100vw - 1200px)/2 + 20px));
  top: 50%;
  transform: translateY(-50%);
  max-width: 720px;
  color:#fff;
  z-index:2;
  padding-right: 20px;
}

.slide-content span{
  display:inline-block;
  font-weight:700;
  opacity:.95;
  margin-bottom: 10px;
  text-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.slide-content h1{
  color:#fff !important;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.05;
  margin-bottom: 18px;
  text-shadow: 0 14px 38px rgba(0,0,0,0.40);
}

.buttons{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary{
  display:inline-block;
  text-decoration:none;
  font-weight:800;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
}

.btn-primary{
  background: linear-gradient(90deg, var(--brand-a) 0%, #8fd3e3 100%);
  color:#fff !important;
}

.btn-secondary{
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.22);
  color:#fff !important;
}

.arrow{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  cursor:pointer;
  background: rgba(255,255,255,0.20);
  color:#fff;
  font-size: 30px;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:3;
}

.arrow:hover{ background: rgba(255,255,255,0.28); }
.arrow.prev{ left: 18px; }
.arrow.next{ right: 18px; }

.slider-dots{
  position:absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display:flex;
  gap: 10px;
  z-index:3;
  pointer-events:none;
}

.slider-dots .dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}

.slider-dots .dot.active{
  background: rgba(255,255,255,0.95);
}

/* Responsive: centra mejor el contenido del slider en móvil */
@media (max-width: 900px){
  .slide-content{
    left: 20px;
    right: 20px;
    max-width: 720px;
  }
}

/* =========================================================
   BLOQUE “CUADROS BONITOS” DEBAJO DEL SLIDER
========================================================= */
.intro-cards{
  padding-top: 40px;
}

.intro-grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: auto;
  gap: 26px;
  align-items: stretch;
}

.intro-main{
  min-height: 240px;
}

.intro-main h2{
  font-size: clamp(26px, 2.4vw, 38px);
  margin-bottom: 10px;
}

.intro-main .lead{
  font-size: 16px;
  color: var(--muted2);
  margin-bottom: 16px;
}

.intro-badges{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 18px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(79,179,198,0.12);
  border: 1px solid rgba(79,179,198,0.20);
  font-weight: 800;
  color: #0f2b36;
}

.intro-cta{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.intro-cta.small .btn-primary,
.intro-cta.small .btn-secondary{
  padding: 11px 18px;
  font-weight: 800;
}

.intro-side{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.intro-side h3{
  font-size: 18px;
  margin-bottom: 2px;
}

.check-list{
  list-style: none;
  display:flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.check-list li{
  position: relative;
  padding-left: 26px;
  color: var(--muted2);
  line-height: 1.4;
}

.check-list li::before{
  content:"✓";
  position:absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: #0b1220;
  background: rgba(79,179,198,0.18);
  border: 1px solid rgba(79,179,198,0.25);
}

.mini-links{
  display:flex;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.mini-links a{
  font-weight: 800;
  color: #0b1220;
  text-decoration: none;
  border-bottom: 2px solid rgba(79,179,198,0.45);
}

.mini-links a:hover{
  border-bottom-color: rgba(79,179,198,0.85);
}

/* En desktop, las 2 tarjetas de la derecha se apilan */
.intro-grid .intro-side{ }
.intro-commitment{ }

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

/* =========================================================
   “POR QUÉ ELEGIRNOS” / CARDS
========================================================= */
.card,
.box,
.feature,
.feature-card,
.why-card,
.service-card {
  background: rgba(255,255,255,0.88);
  box-shadow: 0 18px 45px rgba(0,0,0,0.14);
  border-radius: 18px;
}

.card p,
.box p,
.feature p,
.feature-card p,
.why-card p,
.service-card p {
  color: #334155;
}

.why h2{
  margin-bottom: 18px;
}

.why-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

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

/* =========================================================
   SERVICIOS HOME
========================================================= */
.services-home h2{ margin-bottom: 10px; }

.services-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.services-grid .service-card{
  min-height: 180px;
}

.services-grid h3{
  margin-bottom: 10px;
}

@media (max-width: 1100px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .services-grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   NUESTROS TRABAJOS (GRID)
========================================================= */
.trabajos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 34px;
}

.trabajo-item {
  background: rgba(255,255,255,0.92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trabajo-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 992px) {
  .trabajos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .trabajos-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   CONTACTO (defensivo, sin tocar HTML)
========================================================= */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 20px;
}

.contacto-grid img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.22);
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  width: 100%;
  padding: 14px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 0;
  outline: none;
  background: #4b5563;
  color: #ffffff;
}

.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
  color: rgba(255,255,255,0.65);
}

.contacto-form button {
  background: linear-gradient(90deg, var(--brand-a) 0%, #8fd3e3 100%);
  color: #ffffff;
  border: 0;
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(0,0,0,0.18);
}

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

/* =========================================================
   FOOTER (SIMÉTRICO AL HEADER)
========================================================= */
footer {
  background-image: none !important;
  background: linear-gradient(90deg, var(--brand-a) 0%, var(--brand-b) 100%) !important;
  color: #ffffff;
  padding: 22px 28px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.10);
}

footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

footer a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  margin-left: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.20);
}

footer a:hover { text-decoration: underline; }

/* =====================================================
   HERO SLIDER – CAJA GLASS GLOBAL (TODOS LOS SLIDES)
   ===================================================== */

.hero-slider .slide-content{
  max-width: 720px;
  padding: 22px 24px;

  /* efecto glass */
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

/* Texto principal */
.hero-slider .slide-content h1{
  line-height: 1.05;
  text-shadow: 0 8px 28px rgba(0,0,0,0.65);
}

/* Subtítulo */
.hero-slider .slide-content span{
  opacity: 0.95;
}

/* Botones */
.hero-slider .slide-content .buttons{
  margin-top: 18px;
}

/* ===============================
   Cookie banner (simple)
   =============================== */
.cookiebar{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
}
.cookiebar-inner{
  max-width: 1100px;
  margin: 0 auto;
  display:flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,15,22,0.86);
  backdrop-filter: blur(12px);
  color: #fff;
  box-shadow: 0 18px 55px rgba(0,0,0,0.35);
}
.cookiebar-text{
  display:flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.35;
  font-size: 14px;
  color: rgba(255,255,255,0.82);
}
.cookiebar-text strong{
  font-size: 15px;
  color:#fff;
}
.cookiebar-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.cookiebar-btn{
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color:#fff;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor:pointer;
}
.cookiebar-accept{
  background: linear-gradient(135deg, rgba(57,217,138,0.9), rgba(58,167,255,0.85));
  border: none;
  color:#0a0f16;
}
.cookiebar-link{
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  font-weight: 800;
  padding: 8px 6px;
}
@media (max-width: 820px){
  .cookiebar-inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .cookiebar-actions{
    width: 100%;
    justify-content: flex-start;
  }
}

/* ===============================
   BOTÓN SECUNDARIO – ESTILO GLASS
   =============================== */
.btn-secondary,
.btn-light,
a.btn-secondary {
  background: rgba(20, 30, 45, 0.75);   /* gris oscuro elegante */
  color: #ffffff;                      /* texto blanco */
  border: 1px solid rgba(255,255,255,0.25);
  font-weight: 800;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Hover */
.btn-secondary:hover,
.btn-light:hover,
a.btn-secondary:hover {
  background: rgba(20, 30, 45, 0.9);
  color: #ffffff;
}

/* ===============================
   WhatsApp Floating Button (HC)
   =============================== */
.hc-wa{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  color: #0a0f16;
  background: linear-gradient(135deg, #39d98a, #3aa7ff);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.hc-wa-label{
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  background: rgba(0,0,0,0.55);
  padding: 4px 10px;
  border-radius: 999px;
}

.hc-wa:hover{
  filter: brightness(1.05);
}

.hc-wa svg{
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.hc-wa span{
  display: inline-block;
  line-height: 1;
}

@media (max-width: 520px){
  .hc-wa span{ display:none; }
  .hc-wa{ padding: 12px; }
}


.seo-block {
  padding: 60px 20px;
  background: #ffffff;
  color: #1b1b1b;
}

.seo-block .container {
  max-width: 1000px;
  margin: 0 auto;
}

.seo-block h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

.seo-block p {
  margin-bottom: 18px;
  line-height: 1.7;
}
