:root {
  --stone: #3d3229;
  --stone-light: #5a4a3a;
  --cream: #f5f0e8;
  --parch: #ebe4d4;
  --terra: #c4744a;
  --terra-l: #d4885e;
  --green: #4a6741;
  --green-l: #5a7a51;
  --gold: #c9a84c;
  --td: #2a2118;
  --tm: #5a4a3a;
  --tl: #8a7a6a;
  --base: https://agermagi.com;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3',sans-serif;
  color: var(--td);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--cream);
  transition: all .6s ease-out;
  width: 100%;
  height: 100vh;
}

#preloader::after {
  animation-delay: -.5s;
}

#preloader::before,
#preloader::after {
  content: '';
  position: absolute;
  border: 4px solid #59bec5;
  border-radius: 50%;
  animation: animate-preloader 2s cubic-bezier(0,.2,.8,1) infinite;
}

@keyframes animate-preloader {
  0% {
    width: 10px;
    height: 10px;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    opacity: 1;
  }

  100% {
    width: 72px;
    height: 72px;
    top: calc(50% - 36px);
    left: calc(50% - 36px);
    opacity: 0;
  }
}

.skiptranslate {
  opacity: 0;
  display: none;
  position: absolute!important;
  top: -5000px;
}

::selection {
  background: var(--terra);
  color: #fff;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: 'Source Sans 3',sans-serif;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.anim {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease,transform .7s ease;
}

.js .anim {
  opacity: 0;
  transform: translateY(30px);
}

.js .anim.v {
  opacity: 1;
  transform: translateY(0);
}

/* NAV - ALWAYS LIGHT */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(245,240,232,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--parch);
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
  transition: all .3s;
}

.nav.sc {
  padding: 10px 0;
}

.ni {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nl {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.nl-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
}

.nlc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--terra);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Playfair Display',serif;
  font-size: 18px;
  font-weight: 700;
}

.nlt {
  font-family: 'Playfair Display',serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--stone);
}

.nls {
  display: flex;
  gap: 2px;
  align-items: center;
}

.nk {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all .3s;
  color: var(--stone);
  background: 0 0;
  border: none;
}

.nk.a {
  font-weight: 600;
  color: var(--terra);
  background: rgba(196,116,74,.1);
}

.nk:hover {
  color: var(--terra);
}

.ncta {
  margin-left: 8px;
  padding: 9px 18px;
  border-radius: 6px;
  background: var(--terra);
  color: #fff!important;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: none;
  transition: all .3s;
}

.ncta:hover {
  background: var(--terra-l);
}

.ncta-wrap {
  position: relative;
  margin-left: 8px;
}

.ncta-wrap .ncta {
  margin-left: 0;
}

.ncta-toggle::after {
  content: '▾';
  margin-left: 8px;
  font-size: 10px;
}

.ncta-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--parch);
  border-radius: 10px;
  background: rgba(245,240,232,.98);
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
  display: none;
  flex-direction: column;
  gap: 4px;
}

.ncta-wrap.open .ncta-menu {
  display: flex;
}

.ncta-item {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--stone);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s,color .2s;
}

.ncta-item:hover {
  background: rgba(196,116,74,.1);
  color: var(--terra);
}

.ncta-alt {
  background: var(--green);
}

.ncta-alt:hover {
  background: var(--green-l);
}

.nt {
  display: none;
  padding: 8px;
  background: 0 0;
  border: none;
}

.nt span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--stone);
  margin-bottom: 6px;
  transition: all .3s;
}

.nt span:last-child {
  width: 18px;
  margin-bottom: 0;
}

.nm {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(245,240,232,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 24px;
  border-bottom: 1px solid var(--parch);
  box-shadow: 0 8px 30px rgba(0,0,0,.1);
}

.nm.open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm .nk {
  color: var(--stone);
  padding: 12px 16px;
  font-size: 16px;
}

.nm .ncta {
  margin: 8px 0 0;
  text-align: center;
}

.nm-reserve {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 0;
}

.nm-reserve-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--tl);
}

.nm-reserve-link {
  margin: 0;
}

@media (max-width:768px) {
  .nls {
    display: none;
  }
}

.tax-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 28px;
}

.tax-feedback {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(42,33,24,.06);
}

.tax-feedback.ok {
  background: rgba(74,103,65,.12);
  color: var(--green);
  border: 1px solid rgba(74,103,65,.18);
}

.tax-feedback.warn {
  background: rgba(196,116,74,.12);
  color: var(--terra);
  border: 1px solid rgba(196,116,74,.18);
}

.tax-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 14px 36px rgba(42,33,24,.08);
}

.tax-card-info {
  background: linear-gradient(180deg, #fff 0%, #f7f1e8 100%);
}

.tax-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196,116,74,.12);
  font-size: 30px;
  margin-bottom: 20px;
}

.tax-title {
  font-family: 'Playfair Display',serif;
  font-size: 32px;
  line-height: 1.15;
  color: var(--stone);
  margin-bottom: 14px;
}

.tax-copy {
  color: var(--tm);
  line-height: 1.75;
  margin-bottom: 18px;
}

.tax-highlight {
  border-left: 4px solid var(--terra);
  padding: 14px 16px;
  background: rgba(196,116,74,.08);
  border-radius: 0 12px 12px 0;
  color: var(--stone);
  margin-bottom: 20px;
}

.tax-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 10px;
}

.tax-list li {
  padding-left: 26px;
  position: relative;
  color: var(--tm);
}

.tax-list li::before {
  content: '•';
  position: absolute;
  left: 10px;
  color: var(--terra);
  font-size: 22px;
  line-height: 1;
}

.tax-note {
  padding-top: 16px;
  border-top: 1px solid var(--parch);
  color: var(--tl);
}

.tax-form {
  display: grid;
  gap: 18px;
}

.tax-field {
  display: grid;
  gap: 8px;
  color: var(--stone);
  font-weight: 600;
}

.tax-field .form-control {
  min-height: 52px;
  border: 1px solid var(--parch);
  border-radius: 12px;
  background: #fff;
  color: var(--stone);
}

.tax-field .form-control:focus {
  border-color: rgba(196,116,74,.6);
  box-shadow: 0 0 0 4px rgba(196,116,74,.12);
}

.tax-error {
  min-height: 24px;
  color: #a43f2c;
  font-weight: 600;
}

.tax-summary,
.tax-modal-summary {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: var(--cream);
}

.tax-summary div,
.tax-modal-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tax-summary span,
.tax-modal-summary span {
  color: var(--tm);
}

.tax-summary strong,
.tax-modal-summary strong {
  color: var(--stone);
  font-size: 18px;
}

.tax-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tax-btn-primary {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
}

.tax-btn-primary {
  background: var(--terra);
  color: #fff;
}

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

.tax-modal {
  border: none;
  border-radius: 20px;
}

.tax-modal .modal-header,
.tax-modal .modal-footer {
  border-color: var(--parch);
}

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

@media (max-width: 640px) {
  .tax-card {
    padding: 24px;
  }

  .tax-title {
    font-size: 28px;
  }

  .tax-actions {
    flex-direction: column;
  }
}

.security-main {
  background: var(--cream);
}

.security-hero {
  min-height: 54vh;
}

.security-hero p {
  color: rgba(255,255,255,.92);
  max-width: 620px;
  margin-top: 16px;
  line-height: 1.7;
}

.security-hero-caseta .ph-bg,
.security-hero-casagran .ph-bg {
  display: block;
}

.security-hero-caseta {
  background-image: linear-gradient(rgba(42,33,24,.42),rgba(42,33,24,.58)),url('../img/caseta/caseta-calidesa.jpg');
  background-position: center;
  background-size: cover;
}

.security-hero-casagran {
  background-image: linear-gradient(rgba(42,33,24,.42),rgba(42,33,24,.58)),url('../img/casagran/2024-06/005_artitecturephoto_DSF7690-HDR-3.jpg');
  background-position: center;
  background-size: cover;
}

.clean-block.clean-form.dark {
  padding: 80px 24px 100px;
}

.clean-block.clean-form.dark .container {
  max-width: 1100px;
  margin: 0 auto;
}

.block-heading {
  text-align: center;
  margin: 0 auto 38px;
}

.header-caseta {
  font-family: 'Playfair Display',serif;
  font-size: clamp(32px,4vw,48px);
  color: var(--stone);
  margin-bottom: 12px;
}

.block-heading h5 {
  color: var(--terra);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 14px;
}

.block-heading p {
  max-width: 560px!important;
  width: auto!important;
  margin: 0 auto;
  color: var(--tm);
  line-height: 1.75;
}

.security-page .nav-tabs {
  position: static;
  inset: auto;
  z-index: auto;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom: none;
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.security-page .nav-tabs .nav-link {
  border: 1px solid var(--parch);
  border-radius: 999px;
  color: var(--stone);
  font-weight: 600;
  padding: 10px 20px;
  background: rgba(255,255,255,.78);
}

.security-page .nav-tabs .nav-link.active {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
}

.security-page .tab-content {
  max-width: 760px;
  margin: 0 auto;
}

.security-page form {
  background: #fff;
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(42,33,24,.08);
}

.security-page .form-control,
.security-page .form-select {
  min-height: 48px;
  border: 1px solid var(--parch);
  border-radius: 12px;
  color: var(--stone);
}

.security-page .form-control:focus,
.security-page .form-select:focus {
  border-color: rgba(196,116,74,.6);
  box-shadow: 0 0 0 4px rgba(196,116,74,.12);
}

.security-page .form-label {
  color: var(--stone);
  font-weight: 600;
}

.security-page .form-control.is-invalid,
.security-page .form-select.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220,53,69,.12);
}

.security-field-error {
  display: none;
  margin-top: 8px;
  color: #b42318;
  font-size: 14px;
  line-height: 1.4;
}

.security-page .step {
  gap: 12px;
}

.security-page .btn.btn-primary {
  background: var(--terra);
  border-color: var(--terra);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
}

.security-page .btn.btn-primary:hover {
  background: var(--terra-l);
  border-color: var(--terra-l);
}

.security-page .btn.btn-secondary {
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
}

.response1,
.response1_es {
  min-height: 10px;
}

@media (max-width: 768px) {
  .clean-block.clean-form.dark {
    padding: 64px 16px 80px;
  }

  .security-page form {
    padding: 20px;
  }
}

@media (max-width:768px) {
  .nt {
    display: block;
  }
}

/* HERO */

.hero {
  position: relative;
  min-height: 100vh;
  background: #2a1f15;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/excursions/ager-portada.jpg') center/cover no-repeat;
}

.hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,rgba(25,18,12,.34) 0%,rgba(25,18,12,.48) 52%,rgba(25,18,12,.62) 100%);
}

.hc {
  text-align: center;
  padding: 20px 22px;
  animation: fadeInUp 1s ease forwards;
  max-width: 720px;
  position: relative;
  z-index: 1;
  border-radius: 18px;
  background: linear-gradient(180deg,rgba(15,10,7,.2) 0%,rgba(15,10,7,.32) 100%);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hbadge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.25);
  margin-bottom: 28px;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

.hero h1 {
  font-family: 'Playfair Display',serif;
  font-size: clamp(40px,7vw,72px);
  color: #fff;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.hero h1 em {
  color: var(--terra-l);
  font-style: italic;
}

.hsub {
  font-size: clamp(17px,2.5vw,20px);
  color: rgba(255,255,255,.9);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.hbtns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hb {
  padding: 16px 36px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .3s;
  border: none;
  font-family: 'Source Sans 3',sans-serif;
}

.hb.p {
  background: var(--terra);
  color: #fff;
}

.hb.p:hover {
  background: var(--terra-l);
}

.hb.s {
  background: 0 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}

.hb.s:hover {
  border-color: rgba(255,255,255,.6);
}

.hhl {
  margin-top: 60px;
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}

.hhl div {
  color: rgba(255,255,255,.9);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

.hhl span {
  font-size: 18px;
}

.hscr {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 1.5s ease 1s both;
}

.hscr small {
  color: rgba(255,255,255,.68);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hscrl {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom,rgba(255,255,255,.3),transparent);
}

/* PHOTO GALLERY */

.gallery {
  display: grid;
  gap: 8px;
  border-radius: 12px;
  overflow: hidden;
}

.gallery.g3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.gallery.g3 .gi:first-child {
  grid-row: 1/3;
}

.gallery.g4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 250px 250px;
}

.gallery.g5 {
  grid-template-columns: 3fr 2fr 2fr;
  grid-template-rows: 220px 220px;
}

.gallery.g5 .gi:first-child {
  grid-row: 1/3;
}

.gi {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 180px;
}

.gi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.gi:hover img {
  transform: scale(1.05);
}

.gi-cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent,rgba(0,0,0,.6));
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity .3s;
}

.gi:hover .gi-cap {
  opacity: 1;
}

.gallery-more {
  text-align: center;
  margin-top: 16px;
}

.gallery-more button {
  padding: 10px 24px;
  border-radius: 6px;
  border: 1px solid var(--parch);
  background: #fff;
  color: var(--tm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .3s;
}

.gallery-more button:hover {
  border-color: var(--terra);
  color: var(--terra);
}

/* LIGHTBOX */

.lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lb.open {
  display: flex;
}

.lb img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lb-cap {
  color: rgba(255,255,255,.8);
  font-size: 16px;
  margin-top: 16px;
  text-align: center;
  max-width: 600px;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .3s;
}

.lb-close:hover {
  background: rgba(255,255,255,.1);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  background: rgba(255,255,255,.1);
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s;
}

.lb-nav:hover {
  background: rgba(255,255,255,.2);
}

.lb-prev {
  left: 16px;
}

.lb-next {
  right: 16px;
}

.lb-counter {
  position: absolute;
  bottom: 20px;
  color: rgba(255,255,255,.5);
  font-size: 14px;
}

/* SECTIONS */

.sec {
  padding: 100px 24px;
}

.sec-sm {
  padding: 60px 24px;
}

.si {
  max-width: 1000px;
  margin: 0 auto;
}

.sw {
  max-width: 1200px;
  margin: 0 auto;
}

.sn {
  max-width: 700px;
  margin: 0 auto;
}

.sh {
  text-align: center;
  margin-bottom: 60px;
}

.sl {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--terra);
  font-weight: 600;
}

.sl.g {
  color: var(--green);
}

.sl.w {
  color: var(--terra-l);
}

.st {
  font-family: 'Playfair Display',serif;
  font-size: clamp(28px,4vw,44px);
  font-weight: 600;
  color: var(--stone);
  margin-top: 12px;
}

.st.w {
  color: #fff;
}

/* CARDS */

.cds {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.cd {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,.06);
  transition: all .4s;
  cursor: pointer;
  flex: 1 1 400px;
  max-width: 560px;
}

.cd:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
}

.cdi {
  height: 280px;
  overflow: hidden;
  position: relative;
}

.cdi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s;
}

.cd:hover .cdi img {
  transform: scale(1.06);
}

.cdbg {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--terra);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1;
}

.cdb {
  padding: 28px 32px 32px;
}

.cdb h3 {
  font-family: 'Playfair Display',serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--stone);
}

.cdb > p {
  color: var(--tm);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.tgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tg {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--cream);
  font-size: 13px;
  color: var(--tm);
  font-weight: 500;
}

.cdl {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.cdl a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--terra);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background .25s ease,transform .2s ease;
}

.cdl a::after {
  content: " \2192";
  margin-left: 6px;
}

.cdl a:hover {
  background: var(--terra-l);
  transform: translateY(-1px);
}

.cdl a:focus-visible {
  outline: 2px solid var(--stone);
  outline-offset: 2px;
}

/* ABOUT */

.abg {
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.abi {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.abt {
  flex: 1;
  min-width: 300px;
}

.pr {
  margin-bottom: 24px;
}

.pr:last-child {
  margin-bottom: 0;
}

.pr h4 {
  font-family: 'Playfair Display',serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 4px;
}

.pr p {
  color: var(--tm);
  line-height: 1.7;
}

/* ACTIVITY GRID */

.ag {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 20px;
}

.ac {
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px solid var(--parch);
  transition: all .3s;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ac:hover {
  border-color: var(--terra);
  background: rgba(196,116,74,.03);
}

.ace {
  font-size: 32px;
  flex-shrink: 0;
}

.ac h4 {
  font-family: 'Playfair Display',serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 6px;
}

.ac p {
  color: var(--tm);
  font-size: 14px;
  line-height: 1.6;
}

/* TESTIMONIALS */

.tg2 {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 24px;
}

.te {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tes {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 2px;
}

.tet {
  color: var(--tm);
  line-height: 1.7;
  font-size: 15px;
  font-style: italic;
  flex: 1;
}

.tea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tea-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tea-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--parch);
  background: #fff;
}

.tea-person strong {
  display: block;
  color: var(--stone);
  font-size: 14px;
  line-height: 1.2;
}

.tea-person span {
  display: block;
  color: var(--tl);
  font-size: 13px;
  line-height: 1.2;
}

.te-src {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--terra);
  background: rgba(196,116,74,.1);
  border: 1px solid rgba(196,116,74,.2);
  border-radius: 999px;
  padding: 4px 10px;
}

/* CONTACT */

.contact {
  padding: 100px 24px;
  background: var(--stone);
}

.cin {
  max-width: 800px;
  margin: 0 auto;
}

.contact h2 {
  font-family: 'Playfair Display',serif;
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  margin-top: 12px;
}

.contact .desc {
  color: rgba(255,255,255,.6);
  margin-top: 12px;
  font-size: 16px;
}

.cf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cf input, .cf textarea {
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 15px;
  font-family: 'Source Sans 3',sans-serif;
  outline: none;
  transition: border-color .3s;
}

.cf input:focus, .cf textarea:focus {
  border-color: rgba(255,255,255,.4);
}

.cf input::placeholder, .cf textarea::placeholder {
  color: rgba(255,255,255,.35);
}

.cf textarea {
  grid-column: 1/-1;
  resize: vertical;
  min-height: 100px;
}

.cf button {
  grid-column: 1/-1;
  padding: 16px;
  border-radius: 8px;
  background: var(--terra);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .5px;
  transition: all .3s;
}

.cf button:hover {
  background: var(--terra-l);
}

.cok {
  text-align: center;
  padding: 40px;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  display: none;
}

.cok p {
  color: #fff;
  font-size: 18px;
  margin-top: 16px;
  font-weight: 500;
}

.cft {
  text-align: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.cft p {
  color: rgba(255,255,255,.5);
  font-size: 14px;
}

.cft a {
  color: var(--terra-l);
  margin-left: 8px;
}

/* PAGE HERO */

.ph {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.ph-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.ph-ov {
  position: absolute;
  inset: 0;
}

.ph.cas .ph-bg {
  background-image: url('../img/caseta/caseta-natura-3.jpg');
}

.ph.cas {
  min-height: 82vh;
}

.ph.cas .ph-ov {
  background: linear-gradient(180deg,rgba(42,31,21,.3) 0%,rgba(42,31,21,.45) 50%,rgba(42,31,21,.62) 100%);
}

.ph.cg .ph-bg {
  background-image: url('../img/casagran/2024-06/002_artitecturephoto_DSF7816-HDR-5.jpg');
}

.ph.cg {
  min-height: 82vh;
}

.ph.cg .ph-ov {
  background: linear-gradient(180deg,rgba(45,66,40,.28) 0%,rgba(45,66,40,.42) 50%,rgba(45,66,40,.58) 100%);
}

.ph.exc .ph-bg {
  background-image: url('../img/caseta/congost_montrrebei_ager.jpeg');
}

.ph.exc {
  min-height: 82vh;
}

.ph.exc .ph-ov {
  background: linear-gradient(180deg,rgba(58,74,90,.24) 0%,rgba(58,74,90,.38) 50%,rgba(58,74,90,.54) 100%);
}

.ph.rest .ph-bg {
  background-image: url('../img/restaurants/panadons.jpg');
  background-position: center;
}

.ph.rest .ph-ov {
  background: linear-gradient(180deg,rgba(74,48,30,.45) 0%,rgba(74,48,30,.58) 52%,rgba(74,48,30,.72) 100%);
}

.ph.hist .ph-bg {
  background-image: url('../img/histories/Arnau-Mir_dest.jpg');
  background-position: center 22%;
}

.ph.hist {
  min-height: 82vh;
}

.ph.hist .ph-ov {
  background: linear-gradient(180deg,rgba(62,48,34,.34) 0%,rgba(62,48,34,.48) 52%,rgba(62,48,34,.62) 100%);
}

.ph.ops .ph-ov {
  background: linear-gradient(135deg,rgba(61,50,41,.9),rgba(58,42,26,.85));
}

.phi {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.phb {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.ph h1 {
  font-family: 'Playfair Display',serif;
  font-size: clamp(32px,5vw,52px);
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.phi > p {
  font-size: 18px;
  color: rgba(255,255,255,.75);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

.phcta {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  transition: all .3s;
  cursor: pointer;
}

.phcta.tc {
  background: var(--terra);
  color: #fff;
}

.phcta.tc:hover {
  background: var(--terra-l);
}

.phcta.wh {
  background: #fff;
  color: var(--green);
}

.phcta.wh:hover {
  background: var(--cream);
}

.hlb {
  padding: 16px 24px;
  color: #fff;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}

.hlb.tc {
  background: var(--terra);
}

.hlb.gr {
  background: var(--green);
}

.quick-links {
  padding: 24px;
  background: #fff;
  border-bottom: 1px solid var(--parch);
}

.quick-links-cas {
  background: linear-gradient(180deg,#fff 0%,#fcf8f2 100%);
}

.quick-links-cg {
  background: linear-gradient(180deg,#fff 0%,#f3f7f2 100%);
}

.ql-title {
  text-align: center;
  color: var(--stone);
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 15px;
}

.ql-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
}

.ql-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(196,116,74,.26);
  background: rgba(196,116,74,.08);
  color: var(--stone);
  font-weight: 600;
  transition: all .25s;
}

.ql-btn:hover {
  background: rgba(196,116,74,.14);
  border-color: rgba(196,116,74,.45);
  transform: translateY(-1px);
}

.ql-btn-cg {
  border-color: rgba(74,103,65,.3);
  background: rgba(74,103,65,.1);
}

.ql-btn-cg:hover {
  background: rgba(74,103,65,.16);
  border-color: rgba(74,103,65,.5);
}

.ib {
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 24px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(201,168,76,.25);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--tm);
  line-height: 1.6;
}

/* FEATURES */

.fg {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 20px;
  margin-top: 48px;
}

.ft {
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  border: 1px solid var(--parch);
}

.fti {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}

.ft h4 {
  font-family: 'Playfair Display',serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 8px;
}

.ft p {
  color: var(--tm);
  font-size: 14px;
  line-height: 1.6;
}

/* BOOKING */

.bk {
  padding: 80px 24px;
  background: #fff;
  text-align: center;
}

.bki {
  max-width: 600px;
  margin: 0 auto;
}

.bkp {
  padding: 40px;
  border-radius: 12px;
  background: var(--cream);
  border: 2px dashed var(--parch);
  margin-top: 32px;
}

.bkp p {
  color: var(--tl);
  font-size: 15px;
}

/* RESTAURANT */

.rg {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: 24px;
}

.rc {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.04);
  border: 1px solid var(--parch);
}

.rci {
  margin: -8px -8px 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--parch);
  max-height: 96px;
}

.rci img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  filter: saturate(.92);
}

.rc h4 {
  font-family: 'Playfair Display',serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 4px;
}

.rc .rsub {
  font-size: 13px;
  color: var(--terra);
  font-weight: 600;
  margin-bottom: 12px;
}

.rc p {
  color: var(--tm);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.rc-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rc-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--terra);
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--parch);
  transition: all .3s;
}

.rc-links a:hover {
  border-color: var(--terra);
  background: rgba(196,116,74,.05);
}

/* HISTORY */

.hcard {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.04);
  margin-bottom: 32px;
  border: 1px solid var(--parch);
}

.hcard-img {
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--parch);
}

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

.hcard-img iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.hcard-img .video-container {
  width: 100%;
  height: 100%;
}

.hcard-body {
  padding: 32px;
}

.hcard h3 {
  font-family: 'Playfair Display',serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 16px;
}

.hcard p {
  color: var(--tm);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.hintro {
  margin-bottom: 14px;
}

.hacc {
  border: 1px solid var(--parch);
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,.7);
  margin-bottom: 14px;
}

.hacc summary {
  cursor: pointer;
  color: var(--stone);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}

.hacc summary::-webkit-details-marker {
  display: none;
}

.hacc summary::after {
  content: ' +';
  color: var(--terra);
  font-weight: 700;
}

.hacc[open] summary::after {
  content: ' -';
}

.hacc p {
  margin-top: 10px;
  margin-bottom: 0;
}

.hcard a {
  color: var(--terra);
  font-weight: 600;
  font-size: 14px;
}

/* Caseta instructions: keep original image proportions (no crop) */
.ins-cas .hcard-img {
  height: auto;
  background: #fff;
}

.ins-cas .hcard-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* STEPS & TRANSPORT */

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.step-txt h4 {
  font-family: 'Playfair Display',serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 6px;
}

.step-txt p {
  color: var(--tm);
  font-size: 15px;
  line-height: 1.6;
}

.step-img {
  width: 180px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--parch);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.step-img img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.trg {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 20px;
}

.tr {
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--parch);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.tr-ico {
  font-size: 32px;
  margin-bottom: 12px;
}

.tr h4 {
  font-family: 'Playfair Display',serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 8px;
}

.tr p {
  color: var(--tm);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.tr a {
  color: var(--terra);
  font-weight: 600;
  font-size: 14px;
}

/* FOOTER */

.footer {
  padding: 48px 24px 32px;
  background: #1a1410;
  color: rgba(255,255,255,.4);
  font-size: 14px;
}

.fbrand {
  font-family: 'Playfair Display',serif;
  font-size: 24px;
  color: rgba(255,255,255,.7);
  margin-bottom: 28px;
  text-align: center;
}

.fbrand-link {
  color: inherit;
  font-weight: 600;
  transition: color .3s;
}

.fbrand-link:hover {
  color: #fff;
}

.fbrand p {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255,255,255,.55);
}

.fgrid {
  max-width: 1100px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 28px;
  text-align: left;
}

.fcol h5 {
  font-family: 'Playfair Display',serif;
  font-size: 18px;
  color: rgba(255,255,255,.86);
  margin-bottom: 14px;
}

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

.fl {
  transition: color .3s;
  background: 0 0;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 14px;
  font-family: 'Source Sans 3',sans-serif;
  cursor: pointer;
}

.fl:hover {
  color: rgba(255,255,255,.8);
}

.fbot {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 20px;
  font-size: 13px;
  text-align: center;
}

@media (max-width:900px) {
  .fgrid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:600px) {
  .footer {
    padding: 40px 20px 28px;
  }

  .fgrid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .fcol {
    text-align: center;
  }
}

.page {
  display: none;
}

.page.active {
  display: block;
}

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

@media (max-width:600px) {
  .hc {
    padding: 16px 14px;
  }
}

@media (max-width:600px) {
  .hhl {
    gap: 24px;
  }
}

@media (max-width:600px) {
  .hlb {
    gap: 16px;
    font-size: 13px;
  }
}

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

@media (max-width:600px) {
  .cdi {
    height: 200px;
  }
}

@media (max-width:600px) {
  .step {
    flex-wrap: wrap;
    gap: 12px;
  }
  .step-img {
    width: 100%;
  }
  .step-img img {
    height: 180px;
  }
}

@media (max-width:600px) {
  .gallery.g5 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width:600px) {
  .gallery.g5 .gi:first-child {
    grid-row: auto;
    grid-column: 1/-1;
  }
}

/* EXCURSIONS PAGE */

.page-excursions .exc-hero-pills-wrap {
  display: inline-block;
  padding: 12px;
  border-radius: 12px;
  background: rgba(26,20,16,.55);
  backdrop-filter: blur(3px);
}

.page-excursions .btn-primary {
  background-color: var(--terra);
  border-color: var(--terra);
}

.page-excursions .btn-primary:hover,
.page-excursions .btn-primary:focus,
.page-excursions .btn-primary:active {
  background-color: var(--terra-l);
  border-color: var(--terra-l);
}

.page-excursions .btn-outline-primary {
  color: #fff;
  border-color: rgba(255,255,255,.75);
  background-color: rgba(61,50,41,.35);
}

.page-excursions .btn-outline-primary:hover,
.page-excursions .btn-outline-primary:focus,
.page-excursions .btn-outline-primary:active,
.page-excursions .btn-outline-primary.active {
  color: #fff;
  background-color: var(--terra);
  border-color: var(--terra);
}

.page-excursions .filter-feedback-active {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(196,116,74,.18);
  animation: filterPulse .55s ease;
}

@keyframes filterPulse {
  0% { transform: translateY(0); background: rgba(196,116,74,.12); }
  50% { transform: translateY(-1px); background: rgba(196,116,74,.3); }
  100% { transform: translateY(0); background: rgba(196,116,74,.18); }
}
