/* ============================================================
   MIRADOR — Plantilla Joomla 3 para El Mirador de Alquezar
   Diseño visual premium · v2.0
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
    --color-primary:       #4a7a2e;
    --color-primary-dark:  #2e5018;
    --color-primary-light: #6ca348;
    --color-accent:        #c8a96e;
    --color-accent-dark:   #a8843e;
    --color-accent-light:  #e0c896;
    --color-bg:            #fafaf7;
    --color-bg-alt:        #f4f2ec;
    --color-bg-dark:       #111210;
    --color-text:          #1e1e1c;
    --color-text-light:    #6b6b62;
    --color-border:        #e4e0d6;
    --color-white:         #ffffff;
    --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 6px 24px rgba(0,0,0,.10);
    --shadow-lg:  0 16px 48px rgba(0,0,0,.16);
    --shadow-xl:  0 24px 64px rgba(0,0,0,.22);
    --radius:     6px;
    --radius-lg:  14px;
    --max-width:  1160px;
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --header-h:   150px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Iframes responsive (mapas Google, etc.) */
iframe { max-width: 100%; width: 100% !important; display: block; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  {
    font-family: var(--font-sans);
    background:  var(--color-bg);
    color:       var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}
img        { display: block; max-width: 100%; }
a          { color: inherit; text-decoration: none; }
ul, ol     { list-style: none; }
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-serif);
    line-height: 1.15;
    letter-spacing: -.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
p  { max-width: 68ch; }

/* ===== CONTENEDOR ===== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
    padding-left: 2rem; padding-right: 2rem;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 2rem;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-accent  { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: var(--color-accent-dark); }

.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.7);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,.12);
    border-color: #fff;
}

/* ===== TOPBAR ===== */
.topbar {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,.65);
    font-size: .78rem;
    padding-top: .45rem; padding-bottom: .45rem;
    position: relative;
    z-index: 200;
}
.topbar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

/* FaLang — ul.lang-inline */
.topbar .lang-inline,
.topbar .mod-languages ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.topbar .lang-inline li,
.topbar .mod-languages ul li { display: flex; align-items: center; }
.topbar .lang-inline a,
.topbar .mod-languages ul a {
    display: flex;
    align-items: center;
    padding: .2rem .3rem;
    border-radius: 3px;
    opacity: .6;
    transition: opacity var(--transition), background var(--transition);
}
.topbar .lang-inline a:hover,
.topbar .mod-languages ul a:hover,
.topbar .lang-active a { opacity: 1; background: rgba(255,255,255,.1); }
.topbar img { width: 26px; height: auto; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.topbar .lang-inline li + li::before,
.topbar .mod-languages ul li + li::before {
    content: '';
    width: 1px; height: 12px;
    background: rgba(255,255,255,.2);
    margin-left: .2rem; margin-right: .2rem;
}

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 300;
    height: var(--header-h);
    transition: background var(--transition), box-shadow var(--transition), height var(--transition);
    /* Transparente sobre hero */
    background: transparent;
}
/* Cuando topbar existe, desplazar header */
.topbar ~ .site-header { top: 0; }

.site-header.scrolled {
    background: rgba(255,255,255,.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--color-border), var(--shadow-sm);
    height: 90px;
}
/* En páginas interiores (sin hero) el header siempre sólido */
body.is-interior .site-header {
    background: rgba(255,255,255,.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-text  { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name  {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
    transition: color var(--transition);
}
.logo-sub   {
    font-family: var(--font-serif);
    font-size: .78rem;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-accent-light);
    transition: color var(--transition);
}
.scrolled .logo-name,
body.is-interior .site-header .logo-name { color: var(--color-text); }
.scrolled .logo-sub,
body.is-interior .site-header .logo-sub  { color: var(--color-accent); }

/* Nav principal */
.main-nav { margin-left: auto; }
.nav-list  { display: flex; align-items: center; gap: .25rem; }
.nav-item > a {
    display: block;
    padding: .5rem .85rem;
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .04em;
    border-radius: 3px;
    color: rgba(255,255,255,.88);
    transition: color var(--transition), background var(--transition);
}
.nav-item > a:hover,
.nav-item.current > a,
.nav-item.active > a {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.scrolled .nav-item > a,
body.is-interior .site-header .nav-item > a { color: var(--color-text); }
.scrolled .nav-item > a:hover,
.scrolled .nav-item.current > a,
body.is-interior .site-header .nav-item > a:hover,
body.is-interior .site-header .nav-item.current > a {
    color: var(--color-primary);
    background: transparent;
}

/* Dropdown */
.nav-item.has-children { position: relative; }
.nav-item .nav-dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 200px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 50;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown li a {
    display: block;
    padding: .65rem 1.1rem;
    font-size: .85rem;
    color: var(--color-text);
    transition: color var(--transition), background var(--transition);
}
.nav-dropdown li a:hover { color: var(--color-primary); background: var(--color-bg-alt); }
.nav-dropdown li:first-child a { border-radius: var(--radius) var(--radius) 0 0; }
.nav-dropdown li:last-child  a { border-radius: 0 0 var(--radius) var(--radius); }

/* CTA Reservar */
.header-cta {
    flex-shrink: 0;
    padding: .55rem 1.4rem;
    font-size: .82rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.header-cta:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Toggle móvil */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.scrolled .nav-toggle span,
body.is-interior .site-header .nav-toggle span { background: var(--color-text); }
.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 ===== */
.site-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: flex-end;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.25) 0%,
        rgba(0,0,0,.1)  30%,
        rgba(0,0,0,.4)  65%,
        rgba(0,0,0,.75) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 6rem;
    width: 100%;
}
.hero-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--color-accent-light);
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeUp .8s .2s forwards;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeUp .8s .4s forwards;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.82);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp .8s .6s forwards;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp .8s .8s forwards;
}
.hero-phones {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    font-size: .85rem;
    color: rgba(255,255,255,.7);
    opacity: 0;
    animation: fadeUp .8s 1s forwards;
}
.hero-phones a {
    color: rgba(255,255,255,.85);
    transition: color var(--transition);
}
.hero-phones a:hover { color: #fff; }
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    animation: bounce 2s 1.5s infinite;
    z-index: 2;
}
.hero-scroll:hover { color: #fff; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ===== SECCIÓN FEATURES (3 pilares) ===== */
.section-features {
    padding-top: 0; padding-bottom: 0;
    position: relative;
    z-index: 2;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 3px solid var(--color-accent);
}
.feature-card {
    padding: 3rem 2.5rem;
    background: #fff;
    border-right: 1px solid var(--color-border);
    transition: background var(--transition);
}
.feature-card:last-child { border-right: none; }
.feature-card:hover { background: var(--color-bg-alt); }
.feature-icon {
    width: 48px; height: 48px;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}
.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .75rem;
    color: var(--color-text);
}
.feature-card p {
    font-size: .92rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-width: none;
}

/* ===== SECCIONES GENÉRICAS ===== */
.section {
    padding-top: 6rem; padding-bottom: 6rem;
}
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-bg-dark); color: #fff; }

.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.section-title {
    margin-bottom: 1.25rem;
}
.section-lead {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Fade-in al hacer scroll */
.fade-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs-bar {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    padding-top: .9rem; padding-bottom: .9rem;
    margin-top: calc(var(--header-h) + 36px); /* header + topbar */
}
body.is-interior .breadcrumbs-bar { margin-top: calc(var(--header-h) + 36px); }
.breadcrumbs-bar ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    font-size: .8rem;
    color: var(--color-text-light);
    list-style: none;
}
.breadcrumbs-bar ol li { display: flex; align-items: center; gap: .5rem; }
.breadcrumbs-bar ol li + li::before { content: '›'; opacity: .4; }
.breadcrumbs-bar a { color: var(--color-primary); }
.breadcrumbs-bar a:hover { text-decoration: underline; }

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content { padding-top: 4rem; padding-bottom: 4rem; }
body.is-home .main-content { padding-top: 0; padding-bottom: 0; }

/* Layout con sidebars */
.content-wrapper { width: 100%; }
.layout-full .content-main { width: 100%; }

.layout-sidebar {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}
.layout-sidebar-right  { grid-template-columns: 1fr 280px; }
.layout-sidebar-left   { grid-template-columns: 280px 1fr; }
.layout-both-sidebars  { grid-template-columns: 240px 1fr 240px; }

/* Módulos main-top / main-bottom */
.module-main-top  { padding-top: 3rem; padding-bottom: 0; }
.module-main-bottom { padding-top: 0; padding-bottom: 3rem; }

/* ===== SIDEBAR ===== */
.sidebar { font-size: .9rem; }
.sidebar .module { margin-bottom: 2rem; }
.sidebar .module-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--color-accent);
    color: var(--color-text);
}

/* ===== ARTÍCULOS / CONTENIDO ===== */
.content-main h1,
.content-main h2,
.content-main h3 { margin-bottom: 1rem; }
.content-main h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.content-main p  { margin-bottom: 1.25rem; color: var(--color-text-light); }
.content-main ul,
.content-main ol { padding-left: 1.5rem; margin-bottom: 1.25rem; list-style: revert; }
.content-main li { margin-bottom: .4rem; }
.content-main img { border-radius: var(--radius); box-shadow: var(--shadow-md); margin-top: 1.5rem; margin-bottom: 1.5rem; }
.content-main a   { color: var(--color-primary); text-decoration: underline; }
.content-main table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}
.content-main th,
.content-main td { padding: .75rem 1rem; border: 1px solid var(--color-border); text-align: left; }
.content-main th { background: var(--color-bg-alt); font-weight: 600; }

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.pagination .page-link,
.pagination .page-item a,
.pagination .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding-left: .5rem; padding-right: .5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .85rem;
    color: var(--color-text);
    background: #fff;
    transition: all var(--transition);
}
.pagination .page-item a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .page-item.active a,
.pagination .active span {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ===== FORMULARIOS ===== */
.form-group  { margin-bottom: 1.25rem; }
label        { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--color-text); }
input[type="text"], input[type="email"], input[type="tel"],
input[type="password"], textarea, select {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: .95rem;
    color: var(--color-text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74,122,46,.12);
}
textarea { resize: vertical; min-height: 140px; }

/* ===== ALERTAS / MENSAJES ===== */
.alert, .message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: .9rem;
    border-left: 4px solid;
}
.alert-success, .message-success { background: #f0faf4; border-color: #34a853; color: #1e6e35; }
.alert-danger,  .alert-error     { background: #fff0f0; border-color: #e53e3e; color: #8b1a1a; }
.alert-warning                   { background: #fffbeb; border-color: #f59e0b; color: #7c4a00; }
.alert-info                      { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,.7);
    font-size: .875rem;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 4rem;
    padding-top: 5rem; padding-bottom: 5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .footer-logo {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .75rem;
    letter-spacing: -.01em;
}
.footer-brand p {
    color: rgba(255,255,255,.5);
    max-width: none;
    line-height: 1.7;
    font-size: .875rem;
}
.footer-col-title {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}
.footer-nav ul,
.footer-nav .nav-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.footer-nav a {
    color: rgba(255,255,255,.55);
    transition: color var(--transition);
    font-size: .875rem;
}
.footer-nav a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: .5rem; }
.footer-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: .75rem;
}
.footer-contact a {
    color: rgba(255,255,255,.55);
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.footer-contact a:hover { color: #fff; }
.footer-whatsapp {
    margin-top: .75rem;
    color: #4ade80 !important;
    font-weight: 600;
}
.footer-whatsapp:hover { color: #86efac !important; }
.footer-bottom {
    padding-top: 1.5rem; padding-bottom: 1.5rem;
    font-size: .78rem;
    color: rgba(255,255,255,.3);
}
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.85); }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }

/* ===== SECCIONES HOME (artículo portada) ===== */
.home-section {
    padding-top: 5rem; padding-bottom: 5rem;
}
.home-section--dark {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    min-height: 480px;
    padding-top: 6rem; padding-bottom: 6rem;
}
.home-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.45) 100%);
}
.home-section__cta {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
    padding-left: 2rem; padding-right: 2rem;
}

/* Split imagen + texto */
.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
    padding-left: 2rem; padding-right: 2rem;
}
.home-split__img img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}
.home-split__text .section-label { margin-bottom: .75rem; }
.home-split__text .section-title { margin-bottom: 1rem; }
.home-split__text p { color: var(--color-text-light); margin-bottom: .85rem; }

/* Galería 3 columnas */
.home-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
    padding-left: 2rem; padding-right: 2rem;
}
.home-gallery img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.home-gallery img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .home-split { grid-template-columns: 1fr; gap: 2rem; padding-left: 1.25rem; padding-right: 1.25rem; }
    .home-split__img img { height: 280px; }
    .home-gallery { grid-template-columns: repeat(2, 1fr); padding-left: 1.25rem; padding-right: 1.25rem; }
    .home-gallery img { height: 180px; }
    .home-section--dark { background-attachment: scroll; }
}
@media (max-width: 480px) {
    .home-gallery { grid-template-columns: 1fr; }
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,.45);
    z-index: 300;
    transition: transform var(--transition), box-shadow var(--transition);
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37,211,102,.6);
}
.whatsapp-float svg { width: 28px; height: 28px; }

/* ===== CHROME DE MÓDULO MIRADOR ===== */
.mirador-module { margin-bottom: 2rem; }
.mirador-module .module-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    padding-bottom: .6rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent);
    color: var(--color-text);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner  { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .footer-brand  { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root { --header-h: 68px; }

    /* En móvil el header siempre sólido.
       SIN backdrop-filter en ningún estado: crearía un containing block para
       position:fixed y el menú quedaría anclado al header en vez del viewport. */
    .site-header,
    .site-header.scrolled,
    body.is-interior .site-header {
        background: #fff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        box-shadow: 0 1px 0 var(--color-border);
        height: var(--header-h);
    }
    .logo-name { color: var(--color-text) !important; }
    .logo-sub  { color: var(--color-accent) !important; }
    .nav-toggle span { background: var(--color-text) !important; }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1100;
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .main-nav {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(17,18,16,.98);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }
    .main-nav.is-open {
        display: flex;
    }
    .nav-list { flex-direction: column; gap: .5rem; text-align: center; }
    .nav-item > a,
    .scrolled .nav-item > a,
    body.is-interior .site-header .nav-item > a {
        font-size: 1.4rem;
        color: rgba(255,255,255,.85) !important;
        padding: .75rem 2rem;
    }
    .nav-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        background: rgba(255,255,255,.05);
        box-shadow: none;
        border: none;
        margin-top: .25rem;
    }
    .nav-dropdown li a { color: rgba(255,255,255,.6); text-align: center; }

    .header-cta { display: none; }

    .features-grid { grid-template-columns: 1fr; }
    .feature-card  { border-right: none; border-bottom: 1px solid var(--color-border); }

    .layout-sidebar,
    .layout-sidebar-right,
    .layout-sidebar-left,
    .layout-both-sidebars { grid-template-columns: 1fr; }

    .sidebar-left  { order: 2; }
    .content-main  { order: 1; }
    .sidebar-right { order: 3; }

    .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .footer-brand { grid-column: auto; }
    .footer-bottom .container { flex-direction: column; gap: .5rem; text-align: center; }

    .hero-title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
    .site-hero  { background-attachment: scroll; background-position: center 20%; }

    .section { padding-top: 4rem; padding-bottom: 4rem; }
}

@media (max-width: 480px) {
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { text-align: center; justify-content: center; }
    .whatsapp-float { bottom: 1.25rem; right: 1.25rem; width: 50px; height: 50px; }
}

/* ===== RESEÑAS DE GOOGLE ===== */
.reviews-section {
    background: var(--color-bg-alt);
    padding-top: 5rem; padding-bottom: 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}
.section-header .section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--color-text);
    margin-bottom: 1rem;
}
.google-rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.stars-big {
    font-size: 1.4rem;
    color: #f5aa00;
    letter-spacing: .05em;
}
.rating-text {
    font-size: .95rem;
    color: var(--color-text-light);
}
.rating-text a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: text-decoration var(--transition);
}
.rating-text a:hover { text-decoration: underline; }

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
    padding-left: 2rem; padding-right: 2rem;
}

.review-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.review-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: .85rem;
}
.reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .04em;
}
.reviewer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.reviewer-name {
    font-size: .9rem;
    color: var(--color-text);
    font-weight: 600;
}
.review-date {
    font-size: .78rem;
    color: var(--color-text-light);
}
.google-logo {
    margin-left: auto;
    flex-shrink: 0;
    opacity: .8;
}

.review-stars {
    font-size: 1rem;
    color: #f5aa00;
    letter-spacing: .05em;
    line-height: 1;
}
.review-stars .star-empty { color: #ddd; }

.review-text {
    font-size: .9rem;
    line-height: 1.75;
    color: var(--color-text-light);
    margin: 0;
    font-style: italic;
}

.reviews-cta {
    text-align: center;
    margin-top: 3rem;
}
.btn-outline {
    display: inline-block;
    padding: .7rem 2rem;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

@media (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        padding-left: 1.25rem; padding-right: 1.25rem;
    }
    .reviews-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ===== SAFARI / iOS: background-attachment:fixed no funciona en dispositivos táctiles ===== */
@media (hover: none) {
    .site-hero        { background-attachment: scroll; }
    .home-section--dark { background-attachment: scroll; }
}

/* ===== iOS Safari: fix menú móvil (overscroll y altura viewport) ===== */
@supports (-webkit-touch-callout: none) {
    .main-nav {
        /* En iOS 100vh no incluye la barra del navegador; usar -webkit-fill-available */
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}
