/* ==========================================================================
   Comercial Romanini — styles.css
   Simple, clara, legible. Palette neutra + azul de marca.
   ========================================================================== */

:root {
  --bg:        #f7f6f3;
  --bg-alt:    #ffffff;
  --ink:       #17203a;
  --ink-soft:  #3d4a66;
  --ink-mute:  #6b7280;
  --accent:    #1d3f8f;
  --accent-2:  #14265c;
  --gold:      #e8a53d;
  --line:      rgba(23, 32, 58, 0.12);
  --radius:    14px;
  --shadow:    0 10px 30px rgba(23, 32, 58, 0.10);
  --nav-h:     86px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-soft); }
ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: #fff;
  padding: 0.75em 1.25em;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus {
  left: 1em;
  top: 1em;
}

/* Defensive: split/reveal combos never vanish */
.reveal[data-split] { opacity: 1; transform: none; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.5em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1.5px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(29, 63, 143, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29, 63, 143, 0.34); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 0.6em 1.1em; font-size: 0.88rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.6em;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  max-width: 28ch;
}
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(10px)) {
  .nav { background: var(--bg); }
}
.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-brand { display: flex; align-items: center; margin-left: -0.85rem; }
.nav-logo { height: 62px; width: auto; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 0.35em 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Botones-icono de la barra superior */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.icon-btn svg { width: 21px; height: 21px; display: block; }
.icon-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.icon-wa { background: #25D366; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35); }
.icon-ig { background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%); box-shadow: 0 6px 16px rgba(220, 39, 67, 0.32); }
.icon-mail { background: var(--accent); box-shadow: 0 6px 16px rgba(29, 63, 143, 0.32); }
.icon-tel { background: var(--accent-2); box-shadow: 0 6px 16px rgba(20, 38, 92, 0.32); }
.icon-pin { background: #e04434; box-shadow: 0 6px 16px rgba(224, 68, 52, 0.32); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s 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); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 2.5rem 1.5rem 3.5rem;
}
.hero-tagline {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 1.9rem;
  text-shadow: 0 2px 18px rgba(10, 14, 28, 0.65), 0 1px 3px rgba(10, 14, 28, 0.5);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 38, 0.45) 0%, rgba(15, 20, 38, 0.28) 50%, rgba(15, 20, 38, 0.5) 100%);
}

/* ---------- FRANJA DE MARCAS ---------- */
.brands-strip {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 2.2rem;
  padding: 1.1rem 1.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(15, 20, 38, 0.2);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 1.5rem;
}
.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  min-width: 0;
}
/* Los logos anchos llenan la celda solos; los mas cuadrados necesitan mas alto
   para pesar visualmente lo mismo */
.brand-item.b-sm { height: 78px; }
.brand-item.b-md { height: 88px; }
.brand-item.b-lg { height: 94px; }
.brand-item.b-xl { height: 106px; }
.brand-item img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- TILES ---------- */
.tiles {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.tile {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 20, 38, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-7px);
  box-shadow: 0 24px 44px rgba(15, 20, 38, 0.38);
}
.tile-media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #fff;
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.tile:hover .tile-media img { transform: scale(1.07); }
.tile-label {
  padding: 0.9rem 0.3rem 1rem;
  text-align: center;
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(0.8rem, 1.15vw, 1.15rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- CATEGORY SECTIONS ---------- */
.category { background: var(--bg-alt); scroll-margin-top: var(--nav-h); }
.category-alt { background: var(--bg); }
.category-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
.category-grid-rev { grid-template-columns: 1.1fr 0.9fr; }
.category-grid-rev .category-media { order: 2; }
.category-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.category-media-tall img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.category-text p { max-width: 52ch; }

/* ---------- BRANDS ---------- */
.brands-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}
.brand-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.4rem;
  height: 84px;
}
.brand-chip img {
  max-height: 50px;
  max-width: 168px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.brand-chip.chip-lg { height: 104px; }
.brand-chip.chip-lg img { max-height: 72px; max-width: 200px; }

/* ---------- ADVICE BANNER ---------- */
.advice { background: var(--accent-2); }
.advice-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 3rem 1.5rem;
  flex-wrap: wrap;
}
.advice-icon { font-size: 2.5rem; }
.advice-title { color: #fff; margin-bottom: 0.3em; font-size: 1.4rem; }
.advice-inner p { color: rgba(230, 235, 247, 0.85); margin: 0; max-width: 52ch; }
.advice-inner .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); flex-shrink: 0; margin-left: auto; }
.advice-inner .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ---------- REVIEWS ---------- */
.reviews { background: var(--bg-alt); }
.reviews-sub { margin-top: -0.5em; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.review-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}
.review-stars {
  color: var(--gold);
  letter-spacing: 0.15em;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.review-text {
  font-size: 0.96rem;
  color: var(--ink);
  flex: 1;
}
.review-author {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  color: var(--ink);
}
.review-meta {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0.15rem 0 0;
}

/* ---------- LOCATION ---------- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
.location-address, .location-phone {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.location-phone a:hover { color: var(--accent); }
.location-map {
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ---------- CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
  margin-top: 2.25rem;
}
.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-icon { font-size: 1.8rem; display: block; margin-bottom: 0.5rem; }
.contact-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.contact-value { display: block; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.contact-value-sm { font-size: 0.82rem; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--accent-2);
  color: #e6ebf7;
  padding: 3.5rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(230, 235, 247, 0.16);
}
.footer-logo {
  height: 40px;
  border-radius: 8px;
  background: #fff;
  padding: 4px 8px;
  margin-bottom: 0.75rem;
}
.footer-brand p { color: rgba(230, 235, 247, 0.75); margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links a { color: rgba(230, 235, 247, 0.85); font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-contact p { margin: 0 0 0.5rem; color: rgba(230, 235, 247, 0.85); font-size: 0.95rem; }
.footer-contact a:hover { color: #fff; }
.footer-copy {
  max-width: 1120px;
  margin: 1.5rem auto 0;
  font-size: 0.82rem;
  color: rgba(230, 235, 247, 0.6);
  text-align: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1320px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.84rem; }
}

@media (max-width: 1180px) {
  .nav-links { gap: 0.7rem; }
  .nav-links a { font-size: 0.8rem; }
  .nav-actions { gap: 0.4rem; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 19px; height: 19px; }
}

@media (max-width: 1080px) {
  .nav-logo { height: 48px; }
  .nav-links { gap: 0.55rem; }
  .nav-links a { font-size: 0.75rem; }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .tile-label { font-size: 1rem; padding: 0.9rem 0.4rem 1rem; }
  .brands-strip {
    grid-template-columns: repeat(3, 1fr);
    max-width: 760px;
    gap: 1.2rem 1.6rem;
    padding: 1.2rem 1.5rem;
  }
  .brand-item { height: 52px; }
  .brand-item.b-sm { height: 64px; }
  .brand-item.b-md { height: 72px; }
  .brand-item.b-lg { height: 78px; }
  .brand-item.b-xl { height: 88px; }
}

/* Bajo este ancho el menu de texto ya no cabe junto al logo y los 5 iconos */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links a { font-size: 1rem; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-alt);
    padding: 1.25rem 1.5rem 1.75rem;
    border-bottom: 1px solid var(--line);
    gap: 1rem;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 980px) {
  .category-grid, .category-grid-rev { grid-template-columns: 1fr; }
  .category-grid-rev .category-media { order: 0; }
  .category-media-tall img { aspect-ratio: 4 / 3; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: 1fr; }
  .location-map { min-height: 280px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-actions { gap: 0.35rem; }
  .nav-logo { height: 44px; }
  .section-inner { padding: 3.5rem 1.25rem; }
  .hero { padding: 2rem 1rem 2.5rem; }
  .brands-strip {
    max-width: 100%;
    gap: 0.9rem 1.1rem;
    padding: 1rem;
    border-radius: 14px;
    margin-bottom: 1.7rem;
  }
  .brand-item { height: 40px; }
  .brand-item.b-sm { height: 50px; }
  .brand-item.b-md { height: 56px; }
  .brand-item.b-lg { height: 60px; }
  .brand-item.b-xl { height: 68px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .tile-label { font-size: 0.9rem; padding: 0.8rem 0.3rem 0.9rem; }
  .brand-chip { height: 68px; padding: 0.7rem 1.1rem; }
  .brand-chip img { max-height: 40px; max-width: 130px; }
  .brand-chip.chip-lg { height: 88px; }
  .brand-chip.chip-lg img { max-height: 58px; max-width: 160px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .advice-inner { flex-direction: column; align-items: flex-start; }
  .advice-inner .btn-ghost { margin-left: 0; }
}

/* Movil angosto: la barra pasa a dos filas — logo + menu arriba, iconos abajo */
@media (max-width: 560px) {
  :root { --nav-h: 116px; }
  .nav-inner {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 0.45rem;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
  }
  .nav-brand { order: 1; margin-left: 0; }
  .nav-toggle { order: 2; margin-left: auto; }
  .nav-actions { order: 3; width: 100%; justify-content: center; gap: 0.55rem; }
  .nav-logo { height: 42px; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 20px; height: 20px; }
}

@media (max-width: 430px) {
  .nav-logo { height: 38px; }
  .icon-btn { width: 35px; height: 35px; }
  .icon-btn svg { width: 19px; height: 19px; }
  .brands-strip { grid-template-columns: repeat(2, 1fr); }
  .brand-item { height: 36px; }
  .brand-item.b-sm { height: 44px; }
  .brand-item.b-md { height: 48px; }
  .brand-item.b-lg { height: 52px; }
  .brand-item.b-xl { height: 60px; }
  .tile-label { font-size: 0.78rem; padding: 0.7rem 0.2rem 0.8rem; letter-spacing: 0.02em; }
}

/* ---------- CREDITS PAGE ---------- */
.credits-main { padding-top: 3.5rem; }
.credits-list { margin-top: 2rem; }
.credits-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.credits-list a { color: var(--accent); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


/* ==========================================================================
   Ajustes para WordPress (tema hijo de Avada)
   ========================================================================== */

/* Barra negra de administración (solo la ves tú cuando estás conectado) */
.admin-bar .nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .nav { top: 46px; } }
@media (max-width: 600px) { .admin-bar .nav { top: 0; } }

/* Emojis que WordPress convierte en imágenes: que sigan en línea con el texto */
img.emoji { display: inline !important; }
