/* CanvasGlade — Land Listing Brand Stylesheet */

:root {
  --cnvs-themecolor: #FFE200;
  --cnvs-themecolor-rgb: 255,226,0;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --cg-ink: #0F1A0C;
  --cg-forest: #1C3020;
  --cg-amber: #FFE200;
  --cg-amber-light: #FFE200;
  --cg-text-accent: #96700A;
  --cg-cream: #F5EFE4;
  --cg-muted: #7A8C78;
  --cg-border: rgba(138,106,46,0.2);
}

/* Typography */
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', Georgia, serif; text-wrap: balance; }
body, p, nav, button, input, textarea, select { font-family: 'DM Sans', sans-serif; }

/* ── HEADER ── */
#header.transparent-header { --cnvs-header-height: 80px; }
#header:not(.dark) .menu-link { color: var(--cg-ink) !important; }
#header.dark #logo .logo-dark { filter: brightness(0) invert(1); }

.cg-cta-btn {
  background: var(--cnvs-themecolor);
  color: var(--cg-ink) !important;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background 200ms var(--ease-out), transform 160ms var(--ease-out);
  text-decoration: none;
  display: inline-block;
}
.cg-cta-btn:hover { background: var(--cg-amber-light); transform: translateY(-1px); color: var(--cg-ink) !important; }
.cg-cta-btn:active { transform: scale(0.97); }

/* ── HERO ── */
#home {
  min-height: 100vh;
  background: var(--cg-ink);
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.cg-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://assets.cnvs.site/images/ai/1ff9802a-b6ad-4d78-b1f5-c971ef39c300/834b8769a414929f.webp');
  background-size: cover;
  background-position: center 40%;
  animation: cg-zoom 18s ease-in-out infinite alternate;
}
@keyframes cg-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .cg-hero-bg { animation: none; } }

.cg-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,20,8,0.92) 0%, rgba(10,20,8,0.45) 50%, rgba(10,20,8,0.3) 100%);
}

.cg-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 5rem;
  width: 100%;
}
.is-expanded-menu .cg-hero-content { padding-top: calc(var(--cnvs-header-height) + 2rem); }

.cg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(138,106,46,0.25);
  border: 1px solid var(--cg-amber);
  color: var(--cg-amber-light);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.cg-hero-title {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.cg-hero-title span { color: var(--cg-amber-light); }

.cg-hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  max-width: 56ch;
  text-wrap: pretty;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cg-stats-row {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.cg-stat {
  padding: 1rem 2rem 1rem 0;
  margin-right: 2rem;
  border-right: 1px solid rgba(138,106,46,0.35);
}
.cg-stat:last-child { border-right: none; }
.cg-stat-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cg-amber-light);
  line-height: 1;
}
.cg-stat-label {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: .25rem;
}

.cg-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.cg-btn-ghost {
  border: 1px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.85) !important;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.cg-btn-ghost:hover { border-color: var(--cg-amber); color: var(--cg-amber-light) !important; }

/* Ghost button on light backgrounds (e.g. contact section) needs dark text/border instead of the light-on-dark default */
#contact .cg-btn-ghost { border-color: rgba(15,26,12,0.35); color: var(--cg-ink) !important; }
#contact .cg-btn-ghost:hover { border-color: var(--cg-ink); color: var(--cg-ink) !important; background: rgba(15,26,12,0.05); }

/* ── GALLERY SECTION ── */
#gallery { background: var(--cg-cream); }

.cg-gallery-intro {
  max-width: 52ch;
}

.cg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 260px 260px;
  gap: 10px;
}

.cg-gallery-grid .cg-photo:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.cg-photo {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 6px;
}
.cg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
  display: block;
}
.cg-photo:hover img { transform: scale(1.06); }
.cg-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,20,8,0);
  transition: background 300ms var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cg-photo:hover .cg-photo-overlay { background: rgba(10,20,8,0.35); }
.cg-photo-overlay i {
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}
.cg-photo:hover .cg-photo-overlay i { opacity: 1; transform: scale(1); }

@media (max-width: 767px) {
  .cg-gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
  }
  .cg-gallery-grid .cg-photo:first-child {
    grid-column: 1 / -1;
    grid-row: span 1;
  }
}

/* Section label accent */
.cg-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cg-text-accent);
  margin-bottom: .75rem;
}

.cg-section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--cg-ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ── LOCATION SECTION ── */
#location { background: #fff; }
#proyecto { background: #fff; }
#inversion { background: var(--cg-forest); }

.cg-location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 991px) {
  .cg-location-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.cg-location-img {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.cg-location-img img { width: 100%; height: 420px; object-fit: cover; display: block; }

.cg-feature-list { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.cg-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: .95rem;
  color: #444;
}
.cg-feature-list li:last-child { border-bottom: none; }
.cg-feature-list li i { color: var(--cg-text-accent); font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }

.cg-highlight-box {
  background: var(--cg-forest);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}
.cg-highlight-box h4 { color: var(--cg-amber-light); font-size: 1.2rem; margin-bottom: .75rem; font-family: 'Cormorant Garamond', serif; }
.cg-highlight-box p { color: rgba(255,255,255,0.75); font-size: .9rem; margin: 0; line-height: 1.7; }

/* ── ATTRACTIONS SECTION ── */
#attractions { background: var(--cg-cream); }

.cg-attractions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 767px) {
  .cg-attractions-grid { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .cg-attractions-grid { grid-template-columns: 1fr 1fr; }
}

.cg-attraction-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cg-attraction-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(10,20,8,0.12); }
}
.cg-attraction-img { height: 200px; overflow: hidden; }
.cg-attraction-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms var(--ease-out); }
.cg-attraction-card:hover .cg-attraction-img img { transform: scale(1.07); }
.cg-attraction-body { padding: 1.5rem; }
.cg-attraction-tag {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cg-text-accent);
  margin-bottom: .5rem;
}
.cg-attraction-body h3 { font-size: 1.25rem; color: var(--cg-ink); margin-bottom: .5rem; font-family: 'Cormorant Garamond', serif; }
.cg-attraction-body p { font-size: .88rem; color: #666; line-height: 1.7; margin: 0; }
.cg-distance-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--cg-muted);
  margin-top: .75rem;
}

/* ── DIRECTIONS SECTION ── */
#directions { background: var(--cg-forest); }

.cg-directions-header h2 { color: #fff; }
.cg-directions-header p { color: rgba(255,255,255,0.65); max-width: 56ch; }

.cg-directions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}
@media (max-width: 767px) {
  .cg-directions-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.cg-route-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(138,106,46,0.25);
  border-radius: 8px;
  padding: 2rem;
}
.cg-route-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--cg-amber-light);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.cg-route-card h3 i { font-size: 1.2rem; }

.cg-steps { list-style: none; padding: 0; margin: 0; }
.cg-steps li {
  display: flex;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: .9rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
}
.cg-steps li:last-child { border-bottom: none; }
.cg-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--cnvs-themecolor);
  color: var(--cg-ink);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .1rem;
}

.cg-map-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(138,106,46,0.25);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 3rem;
}
.cg-map-placeholder {
  background: rgba(255,255,255,0.04);
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  gap: 1rem;
}
.cg-map-placeholder i { font-size: 3rem; color: var(--cnvs-themecolor); }
.cg-map-placeholder p { font-size: .9rem; margin: 0; }
.cg-map-placeholder a {
  color: var(--cg-amber-light);
  text-decoration: underline;
  font-size: .85rem;
}

/* ── CONTACT / ENQUIRY SECTION ── */
#contact { background: #fff; }

.cg-enquiry-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: stretch;
}
@media (max-width: 991px) {
  .cg-enquiry-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.cg-enquiry-photo {
  border-radius: 10px;
  overflow: hidden;
  min-height: 320px;
}
.cg-enquiry-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 991px) {
  .cg-enquiry-photo { min-height: 260px; }
}

.cg-enquiry-info h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); color: var(--cg-ink); }
.cg-enquiry-info p { color: #555; line-height: 1.8; font-size: .95rem; margin-bottom: 1.75rem; }

.cg-contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: .9rem;
  color: #444;
}
.cg-contact-detail:last-child { border-bottom: none; }
.cg-contact-detail i { color: var(--cg-text-accent); font-size: 1.1rem; flex-shrink: 0; }

/* Form overrides */
.cg-form .form-control {
  border-color: rgba(0,0,0,0.12);
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
}
.cg-form .form-control:focus { border-color: var(--cnvs-themecolor); box-shadow: 0 0 0 3px rgba(var(--cnvs-themecolor-rgb),0.35); }
.cg-form .button { background: var(--cnvs-themecolor); color: var(--cg-ink) !important; border: none; font-family: 'DM Sans', sans-serif; letter-spacing: .06em; }
.cg-form .button:hover { background: var(--cg-amber-light); color: var(--cg-ink) !important; }

/* ── FOOTER ── */
#footer {
  --cnvs-footer-bg: #0F1A0C;
  --cnvs-footer-top-border: 1px solid rgba(138,106,46,0.2);
  --cnvs-copyrights-link-color: rgba(255,255,255,0.5);
}

.cg-footer-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.cg-footer-logo-text span { color: var(--cg-amber-light); }

.cg-footer-tagline { color: rgba(255,255,255,0.55); font-size: .88rem; line-height: 1.7; margin-top: .75rem; max-width: 36ch; }

.cg-footer-social { display: flex; gap: .75rem; margin-top: 1.5rem; }
.cg-footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: .85rem;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.cg-footer-social a:hover { border-color: var(--cg-amber); color: var(--cg-amber-light); }

.widget-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.25rem;
}

.cg-footer-links { list-style: none; padding: 0; margin: 0; }
.cg-footer-links li { margin-bottom: .6rem; }
.cg-footer-links a { color: rgba(255,255,255,0.6); font-size: .88rem; text-decoration: none; transition: color 200ms var(--ease-out); }
.cg-footer-links a:hover { color: var(--cg-amber-light); }

.cg-footer-contact-item { display: flex; gap: .75rem; margin-bottom: .75rem; font-size: .88rem; color: rgba(255,255,255,0.6); }
.cg-footer-contact-item i { color: var(--cnvs-themecolor); flex-shrink: 0; margin-top: .15rem; }

/* ── LIGHTBOX OVERLAY ── */
.cg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cg-lightbox.open { display: flex; }
.cg-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 4px; cursor: default; }
.cg-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: .7;
  transition: opacity 150ms;
}
.cg-lightbox-close:hover { opacity: 1; }

/* ── DATA-ANIMATE BASELINE (content always visible) ── */
[data-animate] { opacity: 1; }

/* ── ASPECT-RATIO (moved from invalid HTML attrs) ── */
.cg-photo img { aspect-ratio: 3 / 2; }
.cg-location-img img { aspect-ratio: 4 / 3; }
.cg-attraction-img img { aspect-ratio: 4 / 3; }

/* ── HERO INCLUDE-HEADER PADDING (desktop overlap compensation) ── */
.is-expanded-menu #home .container { padding-top: 7rem; }

/* ── HIGHLIGHT BOX (ensure readable text inside dark div in light section) ── */
.cg-highlight-box h4 { color: var(--cg-amber-light) !important; }
.cg-highlight-box p { color: rgba(255,255,255,0.92) !important; }

/* ── HEADER WORDMARK (text logo, replaces generic image logo) ── */
.cg-wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
.cg-wordmark .cg-wordmark-main { font-size: 1.5rem; letter-spacing: .01em; }
.cg-wordmark .cg-wordmark-sub {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cg-text-accent);
  margin-top: .1rem;
}
#header:not(.dark) .cg-wordmark,
#header.not-dark .cg-wordmark { color: var(--cg-ink); }

/* ── MASTERPLAN / TOUR VIRTUAL SECTION ── */
#masterplan { background: #fff; }

.cg-masterplan-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 8.2;
  background: var(--cg-ink);
  box-shadow: 0 24px 60px rgba(15,26,12,0.18);
}
.cg-masterplan-frame img,
.cg-masterplan-frame iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
.cg-masterplan-cta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: linear-gradient(to top, rgba(10,20,8,0.75) 0%, rgba(10,20,8,0.15) 45%, rgba(10,20,8,0.35) 100%);
  cursor: pointer;
  border: none;
  width: 100%;
  padding: 0;
}
.cg-masterplan-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--cg-text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: transform 220ms var(--ease-out), background 220ms var(--ease-out);
}
.cg-masterplan-cta:hover .cg-masterplan-play { transform: scale(1.08); background: #fff; }
.cg-masterplan-cta-label {
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cg-masterplan-note {
  margin-top: 1.25rem;
  font-size: .85rem;
  color: var(--cg-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.cg-masterplan-note a { color: var(--cg-text-accent); font-weight: 600; text-decoration: underline; }

/* ── VIDEO SECTION ── */
#video { background: var(--cg-cream); }
.cg-video-frame {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--cg-ink);
  box-shadow: 0 24px 60px rgba(15,26,12,0.18);
}
.cg-video-frame img,
.cg-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

/* ── GALLERY SECONDARY STRIP ── */
.cg-gallery-grid-secondary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.cg-gallery-grid-secondary .cg-photo img { aspect-ratio: 4 / 3; height: 170px; }
@media (max-width: 767px) {
  .cg-gallery-grid-secondary { grid-template-columns: 1fr 1fr; }
}

/* ── MAP EMBED (replaces static placeholder with real iframe) ── */
.cg-map-embed { width: 100%; height: 380px; border: 0; display: block; }

/* ── LOCATION HIGHLIGHT SPLIT (two stacked highlight blocks in one box) ── */
.cg-highlight-box + .cg-highlight-box { margin-top: 1rem; }
.cg-highlight-split { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 1.25rem; padding-top: 1.25rem; }

/* ── FLOATING WHATSAPP BUTTON ── */
.cg-whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 200ms var(--ease-out);
}
.cg-whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ── CONTRAST FIXES ── */
/* Map placeholder body text — raise from 0.4 to 0.85 opacity */
.cg-map-placeholder p { color: rgba(255,255,255,0.85); }
/* Map placeholder link — lighten amber to pass 4.5:1 on dark bg */
.cg-map-placeholder a { color: #D4A830; }
/* Distance badge — darken muted text to pass 4.5:1 on white bg */
.cg-distance-badge { color: #4A5549; }
/* Route card h3 — use white on near-black bg */
.cg-route-card h3 { color: #ffffff; }
