
/* Static CSS for Villa Mar */
:root {
  --background: hsl(0 0% 98%);
  --foreground: hsl(0 0% 10%);
  --card: hsl(0 0% 100%);
  --muted: hsl(0 0% 94%);
  --muted-foreground: hsl(0 0% 40%);
  --accent: hsl(43 74% 66%);
  --accent-foreground: hsl(0 0% 10%);
  --dark: hsl(0 0% 8%);
  --radius: 4px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: 'Lora', serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  margin: 0 0 0.5em;
}

p { line-height: 1.7; margin: 0 0 1em; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 720px; margin: 0 auto; }
.section { padding: 4rem 0; }
.text-center { text-align: center; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-8 { margin-top: 2rem; }
.max-600 { max-width: 600px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-12 { gap: 3rem; }
.gap-8 { gap: 2rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
.align-center { align-items: center; }
.order-1 { order: 1; }
.order-2 { order: 2; }

@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.lead { color: var(--muted-foreground); font-size: 1.125rem; }
.note { color: var(--muted-foreground); font-size: 0.95rem; }
.muted { color: color-mix(in srgb, var(--foreground), transparent 40%); }
.space-3 > * + * { margin-top: 0.75rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.inline { display: inline; }
.list { list-style: none; padding: 0; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.4rem; border-radius: var(--radius); border: none; cursor: pointer;
  font-family: 'Lora', serif; font-size: 1rem; transition: var(--transition);
}
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-foreground); }
.btn--accent:hover { filter: brightness(0.95); transform: translateY(-1px); }

/* Hero */
.hero { position: relative; height: 100vh; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%); }
.hero__content { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 1rem; color: #fff; }
.hero__content h1 { font-size: clamp(2.5rem, 7vw, 6rem); margin-bottom: 0.5rem; }
.hero__content p { font-size: clamp(1.125rem, 3vw, 1.75rem); opacity: 0.9; margin-bottom: 2rem; }
.hero__scroll { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); animation: bounce 1.8s infinite; z-index: 1; }
.mouse { width: 24px; height: 40px; border: 2px solid rgba(255,255,255,0.5); border-radius: 20px; display: flex; align-items: flex-start; justify-content: center; padding: 6px; }
.mouse span { width: 4px; height: 10px; background: rgba(255,255,255,0.5); border-radius: 2px; }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

/* Media blocks */
.media { position: relative; height: 500px; overflow: hidden; border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.media:hover img { transform: scale(1.05); }

/* Cards */
.card { background: var(--card); border: 1px solid hsl(0 0% 90%); padding: 2rem; border-radius: var(--radius); transition: var(--transition); }
.card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.icon-circle { width: 56px; height: 56px; border-radius: 999px; background: color-mix(in srgb, var(--accent), transparent 80%); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.25rem; }

/* Background helpers */
.bg-background { background: var(--background); }
.bg-light { background: hsl(0 0% 96%); }

/* Gallery */
#gallery-grid { grid-auto-rows: 1fr; }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.thumb:hover img { transform: scale(1.1); }
.thumb::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--dark), transparent 80%); opacity: 0; transition: var(--transition); }
.thumb:hover::after { opacity: 1; }
.thumb figcaption { position: absolute; left: 0.75rem; bottom: 0.5rem; color: #fff; font-size: 0.9rem; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }

.lightbox { position: fixed; inset: 0; background: color-mix(in srgb, var(--dark), transparent 5%); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 95vw; max-height: 85vh; object-fit: contain; }
.lightbox__close { position: absolute; top: 1rem; right: 1rem; font-size: 2rem; background: none; border: none; color: white; cursor: pointer; }
.lightbox__dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.4rem; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.5); transition: var(--transition); }
.dot.active { width: 32px; background: var(--accent); }

/* Forms */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
label { font-family: 'Lora', serif; font-size: 1rem; }
input, textarea { font-family: 'Lora', serif; font-size: 1rem; padding: 0.8rem 0.9rem; border-radius: var(--radius); border: 1px solid hsl(0 0% 90%); outline: none; transition: var(--transition); background: var(--card); color: var(--foreground); }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), white 80%); }
.error { color: #b00020; min-height: 1.2em; display: block; }

/* Footer */
.footer {
  position: relative;
  color: white;
  background: radial-gradient(1200px 600px at 10% -20%, rgba(255,255,255,.06), transparent 60%),
              radial-gradient(1000px 600px at 110% 10%, rgba(255,255,255,.05), transparent 55%),
              linear-gradient(180deg, hsl(222 18% 10%) 0%, hsl(222 18% 6%) 100%);
  overflow: clip;
}
.footer::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%; height: 260px;
  background: conic-gradient(from 200deg, color-mix(in srgb, var(--accent), transparent 30%) 0 40%, transparent 40% 100%);
  filter: blur(40px) saturate(120%);
  opacity: .25; pointer-events: none;
}
.footer .container { padding-top: 3.5rem; padding-bottom: 2.75rem; }
.footer .brand {
  font-size: clamp(1.6rem, 2.1vw, 2rem);
  background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--accent), white 15%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer h4 { font-weight: 700; letter-spacing: .2px; margin: 0 0 .9rem; font-size: 1.05rem; }
.footer p, .footer address { color: color-mix(in srgb, #fff, transparent 35%); margin: 0; }
.footer .row .icon { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  background: rgba(255,255,255,.08); margin-right: .5rem; font-size: .95rem; }
.footer a { color: color-mix(in srgb, #fff, transparent 15%); text-decoration: none; }
.footer a:hover { color: white; text-decoration: underline; text-underline-offset: 3px; }
.footer nav .list li + li { margin-top: .45rem; }
.footer .socials { display: flex; gap: .65rem; }
.footer .socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,0.09); color: white; transition: var(--transition); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.footer .socials a:hover { background: var(--accent); color: var(--accent-foreground); box-shadow: none; transform: translateY(-1px); }
.footer .grid { align-items: start; }
.footer__bottom {
  margin-top: 2.25rem; padding-top: 1.15rem; border-top: 1px solid rgba(255,255,255,0.15);
  display: grid; grid-template-columns: 1fr; gap: .75rem; align-items: center;
}
.footer__links { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: color-mix(in srgb, #fff, transparent 25%); }
.footer__links a:hover { color: white; }
@media (min-width: 768px) {
  .footer__bottom { grid-template-columns: 1fr auto; }
  .footer__links { justify-content: end; gap: 1.25rem; }
}

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Language switch (modern dropdown) */
.lang-switch { position: fixed; top: 14px; right: 14px; z-index: 1000; }
.lang-switch .lang-btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; border: 1px solid rgba(0,0,0,.08);
  padding: .45rem .7rem .45rem .6rem; border-radius: 10px; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.2) blur(6px); box-shadow: 0 6px 18px rgba(0,0,0,.08);
  color: var(--foreground); font: 600 0.95rem/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
.lang-switch .lang-btn .chev { transition: transform .2s ease; opacity: .65; }
.lang-switch[data-open="true"] .lang-btn .chev { transform: rotate(180deg); }
.lang-switch .flag { font-size: 1rem; }
.lang-switch .lang-label { letter-spacing: .2px; }

.lang-switch .lang-menu {
  position: absolute; right: 0; margin-top: 6px; min-width: 220px; list-style: none; padding: .4rem;
  background: white; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.12);
  display: none;
}
.lang-switch[data-open="true"] .lang-menu { display: block; }
.lang-switch .lang-menu li { list-style: none; }
.lang-switch .lang-menu a {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: 8px;
  color: inherit; text-decoration: none; font: 600 .95rem/1.2 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
.lang-switch .lang-menu a:hover,
.lang-switch .lang-menu a:focus { background: var(--muted); outline: none; }

/* No-JS fallback inline list */
.lang-noscript { background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.08); border-radius: 10px; padding: .35rem .6rem; }




/* ===== Navegación (desktop + móvil) ===== */
.site-header { position: sticky; top: 0; z-index: 2000; backdrop-filter: saturate(1.2) blur(6px); color: #1f1f1f; background: rgba(255,255,255,.9); border-bottom: 1px solid rgba(0,0,0,.06); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; position: relative; }
.brand-logo { font-weight: 700; letter-spacing: .3px; font-family: 'Playfair Display', serif; font-size: 1.35rem; color: #111; text-decoration: none; }

.nav { display: none; }
.nav ul { display: flex; gap: 1rem; align-items: center; }
.nav a { text-decoration: none; color: #222; padding: .45rem .6rem; border-radius: 8px; font-size: 1.08rem; }
.nav a:hover { background: rgba(0,0,0,.06); text-decoration: none; }

.nav-toggle { display: inline-flex; width: 44px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); background: rgba(255,255,255,.95); color: #222; cursor: pointer; }
.nav-toggle .bars { width: 20px; height: 14px; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after, .nav-toggle .bar { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle .bar { top: 6px; }
.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars::after { bottom: 0; }
.site-header[data-open="true"] .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle .bar { opacity: 0; }
.site-header[data-open="true"] .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-drawer { display: none; position: fixed; inset: 60px 12px auto 12px; background: white; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.12); padding: .6rem; z-index: 1000; pointer-events: auto; }
.nav-drawer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.nav-drawer a { display: block; padding: .85rem 1rem; border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.nav-drawer a:hover { text-decoration: none; }
.nav-drawer a:hover { background: var(--muted); }
.site-header[data-open="true"] .nav-drawer { display: block; }

/* Cuando el selector está dentro del header, no debe ser fixed */
.site-header .lang-switch { position: relative; top: auto; right: auto; z-index: 4001; margin-left: .5rem; }
.site-header .lang-btn { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.08); color: inherit; position: relative; z-index: 4002; }
.site-header .lang-menu { right: 0; z-index: 4003; pointer-events: auto; }
/* asegurar que el botón burger no tape el selector */
.site-header .nav-toggle { position: relative; z-index: 1000; }

/* Asegurar que la capa de overlay del hero no capture clics */
.hero .overlay { pointer-events: none; }
@media (max-width: 991.98px) {
  .site-header__bar { gap: .75rem; padding: .75rem 1rem; }
  .site-header .lang-switch { margin-left: .5rem; }
  .nav-toggle { margin-right: 0; margin-left: .5rem; }
}

@media (min-width: 992px) {
  .nav { display: block; }
  .nav-toggle, .nav-drawer { display: none; }
}
/* Ensure anchored sections are visible below sticky header */
section[id] { scroll-margin-top: 90px; }
/* ===== Footer Moderno ===== */
.footer--modern {
    background: radial-gradient(1200px 600px at 80% -20%, rgba(255,255,255,0.06), transparent 60%),
    linear-gradient(180deg, hsl(0 0% 10%) 0%, hsl(0 0% 6%) 100%);
    color: #fff;
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer--modern a { color: rgba(255,255,255,0.9); text-decoration: none; }
.footer--modern a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.footer__claim {
    display: grid;
    gap: .8rem;
    text-align: center;
    margin-bottom: 2.5rem;
}
.footer__headline {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: .3px;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    margin: 0;
}
.footer__sub {
    color: rgba(255,255,255,.75);
    margin: 0 auto;
    max-width: 740px;
}
.footer__cta {
    justify-self: center;
    margin-top: .4rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .footer__grid { grid-template-columns: 1.2fr .8fr .9fr .7fr; }
}

.footer__col { display: grid; gap: .75rem; }
.footer__brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0;
}
.footer__title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .2px;
    margin: 0 0 .25rem;
}
.footer__text, .footer__note {
    color: rgba(255,255,255,.75);
    line-height: 1.7;
    margin: 0;
}
.footer__note { font-size: .95rem; }

.footer__links,
.footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer__links a { display: inline-block; padding: .1rem 0; }
.footer__contact .row { align-items: start; }
.footer__contact .icon { width: 1.25rem; display: inline-flex; justify-content: center; opacity: .9; }

.footer__social { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; gap: .6rem; }
.footer__social .soc {
    width: 40px; height: 40px; border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.footer__social .soc:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); border-color: rgba(255,255,255,.2); }

.footer__bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(255,255,255,.15);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
}
.footer__bottom p { color: rgba(255,255,255,.7); margin: 0; }
.footer__bottom-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.footer__bottom-links a {
    font-size: .95rem; padding: .2rem .45rem;
    border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
}
.footer__bottom-links a:hover { background: rgba(255,255,255,.12); }

@media (min-width: 768px) {
    .footer__bottom { flex-direction: row; }
}
