/* Navaja 1.1 - template para barberías (Joomla 6). Sin Bootstrap ni fuentes externas. */

/* Fuentes opcionales: si copias los .woff2 a media/fonts se usan; si no, se usa la fuente instalada o la alternativa. */
@font-face { font-family: "Oswald"; font-weight: 200 700; font-display: swap; src: local("Oswald"), url("../fonts/oswald.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: local("Roboto"), url("../fonts/roboto.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: local("Roboto Bold"), local("Roboto-Bold"), url("../fonts/roboto-bold.woff2") format("woff2"); }

:root {
  --nv-primary: #d9842f;
  --nv-header-bg: #333333;
  --nv-menu: #ffffff;
  --nv-drop-bg: #333333;
  --nv-drop-text: #ffffff;
  --nv-topbar-bg: #f5f6f7;
  --nv-topbar-text: #454545;
  --nv-topbar-link: #121212;
  --nv-footer-bg: #333333;
  --nv-head: #121212;
  --nv-text: #454545;
  --nv-bg: #ffffff;
  --nv-line: #e3e5e8;
  --nv-max: 1140px;
  --nv-header-h: 80px;
  --nv-font-head: Oswald, "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --nv-font-body: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--nv-bg); color: var(--nv-text); font: 400 1rem/1.7 var(--nv-font-body); }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--nv-head); text-decoration: none; transition: color .2s; }
a:hover { color: var(--nv-primary); }
:focus-visible { outline: 3px solid var(--nv-primary); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { font-family: var(--nv-font-head); font-weight: 600; color: var(--nv-head); line-height: 1.2; margin: 1.5em 0 .6em; text-transform: uppercase; letter-spacing: .02em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1.1rem; }
.item-page p { max-width: 75ch; }

.nv-container { width: 100%; max-width: var(--nv-max); margin-inline: auto; padding-inline: 15px; }

/* ---------- Barra superior ---------- */
.nv-topbar { background: var(--nv-topbar-bg); color: var(--nv-topbar-text); font-size: .875rem; }
.nv-topbar a { color: var(--nv-topbar-link); }
.nv-topbar a:hover { color: var(--nv-primary); }
.nv-topbar__row { display: flex; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; min-height: 2.75rem; flex-wrap: wrap; }
.nv-topbar__left, .nv-topbar__right { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nv-social { display: flex; gap: .9rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Cabecera ---------- */
.nv-header { background: var(--nv-header-bg); z-index: 100; width: 100%; }
.nv-header.is-sticky { position: sticky; top: 0; }
.nv-header__row { display: flex; align-items: center; gap: 1.5rem; min-height: var(--nv-header-h); }
.nv-brand { display: flex; align-items: center; gap: 1rem; margin-right: auto; }
.nv-brand__link { display: flex; align-items: center; }
.nv-brand__img { display: block; max-height: 3.25rem; width: auto; }
.nv-brand__name { font: 600 1.9rem/1 var(--nv-font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--nv-primary); }

.nv-nav .mod-menu { display: flex; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nv-nav .mod-menu > li { position: relative; }
.nv-nav .mod-menu a, .nv-nav .mod-menu .mod-menu__heading, .nv-nav .mod-menu .mod-menu__separator {
  display: block; padding: 0 .95rem; line-height: var(--nv-header-h); color: var(--nv-menu);
  font: 500 .9375rem/var(--nv-header-h) var(--nv-font-head); text-transform: uppercase; letter-spacing: .06em;
}
.nv-nav .mod-menu a:hover, .nv-nav .mod-menu li.active > a, .nv-nav .mod-menu li.current > a { color: var(--nv-primary); }
.nv-nav .mod-menu__sub {
  display: none; position: absolute; left: 0; top: 100%; min-width: 15rem; z-index: 110;
  list-style: none; margin: 0; padding: .5rem 0; background: var(--nv-drop-bg); box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
.nv-nav li:hover > .mod-menu__sub, .nv-nav li:focus-within > .mod-menu__sub { display: block; }
.nv-nav .mod-menu__sub a { line-height: 1.4; padding: .6rem 1.25rem; color: var(--nv-drop-text); font-size: .875rem; }

.nv-tools { display: flex; align-items: center; gap: .75rem; }
.nv-tools form { margin: 0; }
.nv-tools input[type="search"], .nv-tools input[type="text"] { width: 10rem; }

.nv-toggle { display: none; background: none; border: 0; color: var(--nv-menu); padding: .6rem; cursor: pointer; }
.nv-toggle__bars, .nv-toggle__bars::before, .nv-toggle__bars::after { display: block; width: 24px; height: 2px; background: currentColor; content: ""; position: relative; }
.nv-toggle__bars::before { position: absolute; top: -7px; }
.nv-toggle__bars::after { position: absolute; top: 7px; }

/* Cabecera superpuesta al banner: transparente hasta hacer scroll */
.header-overlap .nv-header { position: absolute; left: 0; right: 0; background: transparent; }
.header-overlap .nv-header .nv-brand__name, .header-overlap .nv-header .nv-menu { color: #fff; }
.header-overlap .nv-nav .mod-menu > li > a { color: #fff; }
.header-overlap .nv-nav .mod-menu > li > a:hover, .header-overlap .nv-nav .mod-menu > li.active > a { color: var(--nv-primary); }
.header-overlap .nv-header.is-sticky.is-stuck { position: fixed; top: 0; background: var(--nv-header-bg); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.header-overlap .nv-header.is-stuck .nv-nav .mod-menu > li > a { color: var(--nv-menu); }
.header-overlap .nv-header.is-stuck .nv-nav .mod-menu > li.active > a { color: var(--nv-primary); }
.nv-header.is-sticky.is-stuck { box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }

@media (max-width: 991px) {
  .nv-header__row { flex-wrap: wrap; gap: .5rem; min-height: 4.25rem; }
  .nv-toggle { display: inline-block; order: 3; }
  .nv-tools { order: 2; }
  .nv-nav { display: none; order: 5; flex: 1 0 100%; background: var(--nv-header-bg); }
  .nv-nav.is-open { display: block; }
  .nv-nav .mod-menu { flex-direction: column; padding-bottom: .75rem; }
  .nv-nav .mod-menu a, .nv-nav .mod-menu .mod-menu__heading { line-height: 1.4; padding: .75rem .25rem; }
  .nv-nav .mod-menu__sub { display: block; position: static; box-shadow: none; background: transparent; padding: 0 0 0 1rem; }
  .header-overlap .nv-header.is-stuck .nv-nav, .header-overlap .nv-nav.is-open { background: var(--nv-header-bg); }
  .header-overlap .nv-nav .mod-menu > li > a { color: var(--nv-menu); }
}

/* ---------- Banner y banda de título ---------- */
.nv-banner { position: relative; background: #1a1a1a; color: #fff; }
.nv-banner a:not(.btn) { color: #fff; }
.nv-banner h1, .nv-banner h2, .nv-banner h3 { color: #fff; }

.nv-hero {
  position: relative; min-height: min(92vh, 780px); display: flex; align-items: center;
  background: #1a1a1a center / cover no-repeat; color: #fff; padding: calc(var(--nv-header-h) + 3rem) 0 4rem;
}
.nv-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.nv-hero > .nv-container { position: relative; }
.nv-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); color: #fff; margin-bottom: .3em; }
.nv-hero p { max-width: 46ch; font-size: 1.2rem; }

.nv-title { background: #1a1a1a center / cover no-repeat; color: #fff; text-align: center; padding: 3.5rem 0; position: relative; }
.nv-title::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.nv-title > .nv-container { position: relative; }
.header-overlap .nv-title { padding-top: calc(var(--nv-header-h) + 3.5rem); }
.nv-title__text { color: #fff; margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); }
.nv-title .breadcrumb, .nv-title ol { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; list-style: none; margin: .75rem 0 0; padding: 0; font-size: .9rem; }
.nv-title a { color: #fff; }
.nv-title li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }

.nv-crumbs { background: #f5f6f7; font-size: .9rem; }
.nv-crumbs .breadcrumb, .nv-crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .7rem 0; }
.nv-crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }

/* ---------- Secciones reutilizables (para módulos HTML personalizados) ---------- */
.nv-section { padding: clamp(3rem, 8vw, 6rem) 0; }
.nv-section--alt { background: #f5f6f7; }
.nv-section--dark { background: #1a1a1a; color: #ddd; }
.nv-section--dark h2, .nv-section--dark h3 { color: #fff; }
.nv-section__head { text-align: center; max-width: 42rem; margin: 0 auto 3rem; }
.nv-section__head h2 { margin-top: 0; }
.nv-cards { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.nv-card { background: #fff; border: 1px solid var(--nv-line); padding: 1.75rem; }
.nv-card h3 { margin-top: 0; font-size: 1.3rem; }
.nv-price { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed #bbb; padding: .5rem 0; }
.nv-price strong { color: var(--nv-primary); font-family: var(--nv-font-head); }

/* ---------- Rejilla principal ---------- */
.nv-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); padding-block: 4rem; align-items: start; }
@media (min-width: 992px) {
  .nv-grid.has-left { grid-template-columns: 18rem minmax(0, 1fr); }
  .nv-grid.has-right { grid-template-columns: minmax(0, 1fr) 18rem; }
  .nv-grid.has-left.has-right { grid-template-columns: 16rem minmax(0, 1fr) 16rem; }
}
.nv-main { min-width: 0; }
.nv-main > .nv-panel { padding: 0; border: 0; }
.is-home .nv-grid { padding-block: 0; }
.is-home .nv-main > .nv-panel, .is-home .nv-main > * { max-width: none; }

.nv-panel { border: 1px solid var(--nv-line); padding: 1.5rem; margin-bottom: 1.75rem; }
.nv-panel__title { font-size: 1.2rem; margin: 0 0 1rem; padding-bottom: .7rem; border-bottom: 2px solid var(--nv-primary); }
.nv-panel ul { padding-left: 1.1rem; }
.nv-panel .mod-list, .nv-panel .list-unstyled { list-style: none; padding: 0; }

/* ---------- Artículos y blog ---------- */
.blog-items, .com-content-category-blog__items { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.blog-item { border: 1px solid var(--nv-line); padding: 1.5rem; }
.blog-item h2, .page-header h2 { font-size: 1.4rem; margin-top: 0; }
.article-info { list-style: none; padding: 0; color: #888; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.item-image img, .item-page img { display: block; }

/* ---------- Pie ---------- */
.nv-footer { background: var(--nv-footer-bg); color: #ccc; }
.nv-footer a { color: #fff; }
.nv-footer a:hover { color: var(--nv-primary); }
.nv-footer .nv-panel { background: transparent; border: 0; padding: 0; }
.nv-footer .nv-panel__title { color: #fff; border-bottom-color: var(--nv-primary); }
.nv-bottom { display: grid; gap: 2.5rem; padding-block: 4rem 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .nv-bottom--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nv-bottom--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nv-bottom--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .nv-bottom--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nv-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding-block: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem; }
.nv-legal__text { margin: 0; }

.nv-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 2.75rem; height: 2.75rem; border: 0; background: var(--nv-primary); color: #fff; font-size: 1.25rem; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); z-index: 90; }
.nv-top[hidden] { display: none; }

.nv-error__box { padding-block: 6rem; max-width: 40rem; text-align: center; }
.nv-error__code { font: 600 clamp(5rem, 16vw, 9rem)/1 var(--nv-font-head); color: var(--nv-primary); margin: 0; }

/* ---------- Capa de compatibilidad (Joomla usa clases tipo Bootstrap) ---------- */
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.d-none { display: none !important; }
.text-center { text-align: center; }
.float-start { float: left; } .float-end { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }
.list-unstyled { list-style: none; padding: 0; }

.row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.row > * { flex: 1 1 100%; min-width: 0; }
@media (min-width: 768px) {
  .row > .col-md-12 { flex-basis: 100%; }
  .row > .col-md-8 { flex-basis: calc(66.666% - .5rem); }
  .row > .col-md-6 { flex-basis: calc(50% - .75rem); }
  .row > .col-md-4 { flex-basis: calc(33.333% - 1rem); }
  .row > .col-md-3 { flex-basis: calc(25% - 1.125rem); }
}

.btn { display: inline-block; font: 500 .9375rem/1.2 var(--nv-font-head); text-transform: uppercase; letter-spacing: .08em; padding: .85rem 1.6rem; border: 1px solid #343a40; background: #343a40; color: #fff; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: transparent; color: #343a40; }
.btn-primary, .btn-success { background: var(--nv-primary); border-color: var(--nv-primary); color: #fff; }
.btn-primary:hover, .btn-success:hover { background: transparent; color: var(--nv-primary); }
.btn-secondary, .btn-outline-secondary { background: transparent; color: #343a40; }
.btn-secondary:hover, .btn-outline-secondary:hover { background: #343a40; color: #fff; }
.btn-outline-light { background: transparent; border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: #121212; }
.btn-danger { background: #a52a2a; border-color: #a52a2a; }
.btn-sm { padding: .45rem .9rem; font-size: .8rem; }
.nv-header .nv-cta { padding: .7rem 1.2rem; }
.nv-header .nv-cta:hover { color: #fff; background: rgba(255, 255, 255, .12); }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"],
input[type="url"], input[type="number"], input[type="date"], select, textarea, .form-control, .form-select {
  width: 100%; max-width: 100%; padding: .65rem .8rem; border: 1px solid #c5c9cf; background: #fff; color: var(--nv-text); font: inherit;
}
textarea { min-height: 8rem; }
label { font-weight: 500; }
fieldset { border: 1px solid var(--nv-line); margin: 0 0 1.25rem; padding: 1rem; }
legend { font-weight: 700; padding-inline: .4rem; }
.control-group { margin-bottom: 1rem; }

.alert { border: 1px solid var(--nv-line); border-left: 5px solid var(--nv-primary); background: #fff; padding: .9rem 1.1rem; margin-bottom: 1rem; }
.alert-danger, .alert-error { border-left-color: #a52a2a; }
.alert-success { border-left-color: #1e7a46; }

.table, table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.table th, .table td, table th, table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--nv-line); }
.table thead th, table thead th { border-bottom: 2px solid var(--nv-head); }

.pagination, .pagination__list { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 2rem 0; }
.page-link, .pagination a, .pagination span { display: block; padding: .45rem .8rem; border: 1px solid var(--nv-line); background: #fff; }
.page-item.active .page-link, .pagination .active > * { background: var(--nv-primary); color: #fff; border-color: var(--nv-primary); }
.badge { display: inline-block; padding: .15rem .55rem; background: var(--nv-primary); color: #fff; font-size: .8rem; }

.nv-gallery, .gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.nv-gallery img, .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
