/* ==========================================================================
   Ciudad Mayakoba — Guía de Inversión
   ========================================================================== */

:root {
  --dark-green: #1a322a;
  --light-green: #cbf696;
  --forest-green: #5cbb4f;
  --accent-green: #44e35a;
  --ink: #1c1c1c;
  --bg: #f8f8f8;
  --white: #ffffff;
  --text-muted: #4d5b55;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 88px;
  --max-width: 1240px;
  --font-display: "Poppins", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--forest-green);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--dark-green);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 6px 6px 6px 24px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}

/* Circular icon badge attached to the end of every pill button */
.icon-circle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-circle svg {
  width: 16px;
  height: 16px;
}

.icon-circle-light { background: var(--white); color: var(--dark-green); }
.icon-circle-dark { background: var(--dark-green); color: var(--white); }
.icon-circle-outline { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.7); color: var(--white); }
.icon-circle-outline-dark { background: transparent; border: 1.5px solid var(--dark-green); color: var(--dark-green); }
.icon-circle-dark-outline { background: var(--dark-green); color: var(--white); }

.btn-primary {
  background: var(--light-green);
  color: var(--dark-green);
}
.btn-primary:hover {
  background: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
  padding-right: 6px;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-dark {
  background: transparent;
  color: var(--dark-green);
  border-color: var(--dark-green);
}
.btn-outline-dark:hover {
  background: var(--dark-green);
  color: var(--white);
}

.btn-accent {
  background: var(--accent-green);
  color: var(--ink);
}
.btn-accent:hover {
  background: var(--light-green);
}

.btn-dark {
  background: var(--dark-green);
  color: var(--white);
}
.btn-dark:hover {
  background: #234339;
}

.btn-small {
  padding: 6px 6px 6px 20px;
  font-size: 14px;
}
.btn-small .icon-circle {
  width: 30px;
  height: 30px;
}

/* ---------------- Hero wrap (contenedor con margen, fondo de página) ---------------- */
.hero-wrap {
  background: var(--bg);
  padding: 20px 20px 0;
}

/* Header + Hero comparten una sola tarjeta redondeada, como en el diseño */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--dark-green);
  border-radius: var(--radius-lg);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(203, 246, 150, 0.12), transparent 55%),
    radial-gradient(circle at 85% 100%, rgba(92, 187, 79, 0.18), transparent 50%);
  pointer-events: none;
}

/* ---------------- Nav (dentro de la tarjeta hero, no flotante) ---------------- */
.hero-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
}

.logo img {
  height: 42px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  color: var(--white);
  font-size: 16px;
  position: relative;
  padding: 4px 0;
}

.main-nav a.active {
  color: var(--light-green);
  font-weight: 700;
}

.nav-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.nav-dropdown svg {
  width: 12px;
  height: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
}

@media (max-width: 960px) {
  .main-nav {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    z-index: 600;
  }
  .main-nav.open {
    opacity: 1;
    visibility: visible;
  }
  .main-nav a {
    color: var(--dark-green);
    font-size: 20px;
    font-weight: 500;
  }
  .main-nav a.active {
    color: var(--forest-green);
    font-weight: 700;
  }
  .nav-dropdown svg {
    stroke: var(--dark-green);
  }
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 700;
    transition: color 0.15s ease;
  }
  .nav-toggle.open {
    color: var(--dark-green);
  }
  .header-cta {
    display: none;
  }
  .main-nav .nav-cta.btn {
    display: inline-flex;
    margin-top: 8px;
    padding: 6px 6px 6px 24px;
    color: var(--ink);
  }
  .main-nav .nav-cta.btn span:first-child {
    color: var(--ink);
  }
}

/* ---------------- Hero content ---------------- */
.hero-content {
  position: relative;
  text-align: center;
  padding: 60px 40px 70px;
}

.hero h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.25;
  font-weight: 900;
  max-width: 880px;
  margin: 0 auto 24px;
}

.hero h1 .highlight {
  color: var(--light-green);
}

.hero h1 em {
  font-family: "Tiro Bangla", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

.hero-content p {
  max-width: 780px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
}

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

/* ---------------- Layout: sidebar + content ---------------- */
.page-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 12px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

.toc a {
  display: block;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 4px;
}

.toc a:hover {
  background: rgba(92, 187, 79, 0.1);
}

.toc a.active {
  background: var(--light-green);
  color: var(--dark-green);
  font-weight: 700;
}

@media (max-width: 900px) {
  .page-body {
    grid-template-columns: 1fr;
  }
  .toc {
    position: sticky;
    top: 0;
    z-index: 50;
    max-height: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    background: var(--bg);
    border-radius: 0;
    padding: 12px 0;
    margin-bottom: 8px;
  }
  .toc::-webkit-scrollbar {
    display: none;
  }
  .toc a {
    flex: 0 0 auto;
    white-space: nowrap;
    background: var(--white);
    margin-bottom: 0;
  }
}

.content {
  min-width: 0;
}
.content-section {
  scroll-margin-top: 24px;
  margin-bottom: 72px;
  padding-top: 8px;
}

.section-title {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--dark-green);
  margin: 0 0 24px;
}

.section-title .num {
  color: var(--forest-green);
}

.section-body p {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 16px;
}

.section-body h3,
.section-body .sub-heading {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 8px;
  color: var(--dark-green);
}

.section-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px 0;
  aspect-ratio: 16 / 9;
}

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

.two-col-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 16px 0;
}

@media (max-width: 640px) {
  .two-col-lists {
    grid-template-columns: 1fr;
  }
}

.two-col-lists ul {
  margin: 0;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--dark-green);
  color: var(--white);
  padding: 6px 6px 6px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
  transition: transform 0.15s ease;
}
.pill-link:hover {
  transform: translateY(-1px);
}
.pill-link .icon-circle {
  width: 30px;
  height: 30px;
}

.divider {
  border: none;
  border-top: 1px solid #e2e2e2;
  margin: 40px 0;
}

/* ---------------- Amenity chips ---------------- */
.amenity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.amenity-list {
  font-size: 20px;
  line-height: 2.7;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 640px) {
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
}

/* ---------------- Article cards (Latest Articles) ---------------- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
  position: relative;
}

.articles-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-12px);
  border-left: 2px dashed #b9c4bf;
}

@media (max-width: 720px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .articles-grid::before {
    display: none;
  }
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  margin-bottom: 20px;
}

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

.article-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 16px;
}

.article-date {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
  margin: 0;
}

.calendar-icon {
  width: 20px;
  height: 20px;
  color: var(--forest-green);
  flex-shrink: 0;
}

/* ---------------- Property cards ---------------- */
.property-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 24px 0;
}

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

.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.property-card .property-media {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 75%; /* fuerza 4:3 de forma robusta, sin depender de aspect-ratio */
  overflow: hidden;
}

.property-card .property-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card .developer-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--white);
  border-radius: 8px;
  padding: 6px 10px;
  max-width: 110px;
}

.property-card .property-info {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.property-card .property-name {
  font-size: 16px;
  color: var(--ink);
}

.property-card .property-price {
  font-size: 16px;
  font-weight: 700;
}

.property-card .btn {
  align-self: flex-start;
  margin-top: 12px;
}

/* ---------------- Comparison table ---------------- */
.compare-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px 0;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table thead th {
  background: var(--dark-green);
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  padding: 22px 20px;
  text-align: left;
}

.compare-table thead th:nth-child(2) {
  color: var(--light-green);
}

.compare-table tbody td {
  padding: 18px 20px;
  font-size: 15px;
  border-top: 1px solid #eee;
}

.compare-table tbody td:first-child {
  font-weight: 700;
  color: var(--dark-green);
}

.compare-table tbody td:not(:first-child) {
  text-align: center;
}

.compare-table-scroll {
  overflow-x: auto;
}

@media (max-width: 640px) {
  .compare-table {
    min-width: 560px;
  }
}

/* ---------------- FAQ accordion ---------------- */
.faq-list {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--dark-green);
  text-align: left;
  cursor: pointer;
}

.faq-question .icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}

.faq-question .icon::before,
.faq-question .icon::after {
  content: "";
  position: absolute;
  background: var(--dark-green);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.faq-question .icon::before {
  width: 100%;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.faq-question .icon::after {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.faq-item.open .faq-question .icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 24px 22px;
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------------- Articles / properties CTA ---------------- */
.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.filters-row {
  display: flex;
  gap: 16px;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}

.filter-chip {
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #e4e4e4;
}

/* ---------------- Final CTA ---------------- */
.final-cta {
  background: var(--dark-green);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  color: var(--white);
  margin: 20px 0 0;
}

.final-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 16px;
}

.final-cta p {
  max-width: 640px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.85);
}

.final-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.final-cta-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.final-cta-media img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg);
  padding: 56px 0 32px;
  border-top: 1px solid #e7e7e7;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-logo img {
  height: 48px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------- Mobile: padding lateral consistente de 28px ---------------- */
@media (max-width: 640px) {
  .container,
  .hero-wrap,
  .page-body {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero-nav {
    padding-left: 28px;
    padding-right: 28px;
  }

  .hero-content {
    padding-left: 28px;
    padding-right: 28px;
  }

  .final-cta {
    padding-left: 28px;
    padding-right: 28px;
  }

  .property-grid,
  .compare-table-scroll {
    margin-left: 0;
    margin-right: 0;
  }
}
