/* =============================================
   CIUDAD SOSTENIBLE
   Listado de áreas naturales protegidas
   Estilo moderno, paleta celeste/azul institucional
============================================= */

#ciudadSostenible {
  background: #fff !important;
  padding-top: 40px;
}
#contentAreasNaturales {
  padding-top: 20px;
}
#contentAreasNaturales p {
  text-align: left !important;
  color: #555;
}
#ciudadSostenibleTitle {
  margin-bottom: 10px !important;
  overflow: hidden;
}

.mc-title-drop {
  display: inline-block;
  animation: mcDropBounce 1.3s cubic-bezier(0.28, 0.84, 0.42, 1) both;
}

.mc-title-drop--delay {
  animation-delay: 0.15s;
  margin-left: 0.25em;
}

@keyframes mcDropBounce {
  0%   { transform: translateY(-160%); opacity: 0; }
  45%  { transform: translateY(0);     opacity: 1; }
  60%  { transform: translateY(-16px); }
  75%  { transform: translateY(0); }
  87%  { transform: translateY(-7px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .mc-title-drop {
    animation: none;
  }
}

/* --- Tarjeta de introducción --- */
.sostenible-intro {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 820px;
  margin: var(--space-6) auto 0;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(0,179,230,0.07), rgba(3,62,140,0.03));
  border: 1px solid rgba(0,179,230,0.18);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(3,62,140,0.12), 0 1px 4px rgba(3,62,140,0.08);
  margin-bottom: 45px;
  padding-top: 30px;
}

.sostenible-intro-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb347 0%, var(--color-orange) 100%);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(238,123,0,0.45);
}
.sostenible-intro-icon svg {
  width: 22px;
  height: 22px;
}

.sostenible-intro-kicker {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: #ffab40;
  display: inline-block;
  animation: kickerSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  margin-bottom: 15px;
}

@keyframes kickerSlideIn {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sostenible-intro-kicker {
    animation: none;
  }
}

.sostenible-intro-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}
#ciudadSostenible .sostenible-intro {
  max-width: 100%;
}

@media (max-width: 640px) {
  .sostenible-intro {
    padding: var(--space-4);
  }
}

/* --- Tarjetas de categoría --- */
.sostenible-categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-5);
  max-width: 1400px;
  margin: var(--space-6) auto var(--space-10);
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .sostenible-categories {
    grid-template-columns: repeat(3, 1fr);
    max-width: 760px;
  }
}

@media (max-width: 480px) {
  .sostenible-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
}

.category-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.category-card:nth-child(1) { transition-delay: 0.05s; }
.category-card:nth-child(2) { transition-delay: 0.15s; }
.category-card:nth-child(3) { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  .category-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0;
  background: var(--color-white);
  border: 1px solid rgba(3,62,140,0.06);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(3,62,140,0.08), 0 1px 3px rgba(3,62,140,0.05);
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(3,62,140,0.16), 0 4px 10px rgba(3,62,140,0.08);
  border-color: rgba(0,179,230,0.25);
}
.category-card:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}
.category-card--active {
  box-shadow: 0 14px 30px rgba(0,179,230,0.22);
  border-color: rgba(0,179,230,0.35);
}

.category-hero {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-gray-100, #eee);
}
.category-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.16) 100%);
  pointer-events: none;
}
.category-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.category-card:hover .category-hero img {
  transform: scale(1.08);
}

.category-footer {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(3,62,140,0.06);
  padding-top: 20px;
  padding-bottom: 20px;
}

.category-icon {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  color: #ffab40;
  box-shadow: none;
  transition: transform 0.3s ease;
}
.category-icon svg {
  width: 21px;
  height: 21px;
}
.category-card:hover .category-icon {
  transform: scale(1.12);
}

.category-title {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: #033e8c;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: left;
}

.category-arrow {
  position: relative;
  width: 16px;
  height: 16px;
  color: var(--color-gray-400);
  transition: transform 0.25s ease, color 0.2s ease;
}
.category-card--active .category-arrow {
  transform: rotate(180deg);
  color: var(--color-secondary);
}

/* --- Tarjetas próximamente (sin destino aún) --- */
.category-card[aria-disabled="true"] {
  cursor: default;
}

.category-hero--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #033e8c 0%, #00b3e6 100%);
  color: rgba(255, 255, 255, 0.85);
}

/* --- Globito "Ver ..." que sigue al cursor --- */
.category-card--cursor-active {
  cursor: none;
}
.category-cursor-bubble::before {
  content: '';
  position: absolute;
  bottom: -9px;
  right: 14px;
  width: 16px;
  height: 16px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='%23033e8c' stroke-width='1.2'%3E%3Cpath d='M4 2l14 6.2-6 1.7L9.4 16 4 2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='%23033e8c' stroke-width='1.2'%3E%3Cpath d='M4 2l14 6.2-6 1.7L9.4 16 4 2z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}

.category-cursor-bubble {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px 8px 15px;
  border-radius: 90px;
  background: rgba(13,182,221,0.82);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.category-cursor-bubble::after {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.category-cursor-bubble--visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
@media (hover: none) {
  .category-cursor-bubble { display: none; }
}

/* --- Contenido de cada categoría --- */
.sostenible-content {
  animation: sostenibleFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center top;
}
@keyframes sostenibleFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.areas-swiper {
  max-width: 1100px;
  margin-inline: auto;
  padding: 0 var(--space-10) var(--space-10);
  overflow: hidden;
}
.areas-swiper .swiper-wrapper {
  align-items: stretch;
}
.areas-swiper .swiper-slide {
  height: auto;
}
.areas-swiper .swiper-button-prev,
.areas-swiper .swiper-button-next {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  --swiper-navigation-size: 16px;
  transition: var(--transition);
}
.areas-swiper .swiper-button-prev:hover,
.areas-swiper .swiper-button-next:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: scale(1.08);
}
.areas-swiper .swiper-button-prev {
  left: -6px;
}
.areas-swiper .swiper-button-next {
  right: -6px;
}

/* --- Tarjeta de área natural --- */
.area-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 6px 18px rgba(3,62,140,0.12), 0 1px 3px rgba(3,62,140,0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.area-card--visible:hover {
  box-shadow: 0 18px 36px rgba(3,62,140,0.2);
  transform: translateY(-6px);
}
.area-card--visible {
  opacity: 1;
  transform: translateY(0);
}

.area-photos {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}
.area-photo {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}
.area-card:hover .area-photo {
  transform: scale(1.06);
}

.area-badge {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  z-index: 1;
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.area-badge--municipal { background: rgba(0,179,230,0.92); color: #fff; }
.area-badge--privada   { background: rgba(3,62,140,0.92);  color: #fff; }
.area-badge--provincial{ background: rgba(212,162,76,0.94); color: #fff; }

.area-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-4);
}

.area-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.35;
  margin: 0 0 var(--space-2);
}

.area-text {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-gray-500);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sostenible-content > .area-text {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.sostenible-content > .area-text.area-card--visible {
  opacity: 1;
  transform: translateY(0);
}

.area-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-orange);
  text-transform: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, gap 0.2s ease;
  margin-top: auto;
  margin-bottom: 15px;
}

.area-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.area-link:hover,
.area-link:focus-visible {
  color: color-mix(in srgb, var(--color-orange) 80%, #000);
  outline: none;
}

.area-link:hover svg,
.area-link:focus-visible svg {
  transform: translateX(3px);
}

.area-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-secondary);
  background: none;
  border: none;
  border-radius: 0;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
}
.area-more-btn::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center / contain no-repeat;
}

.area-more-btn:hover,
.area-more-btn:focus-visible {
  color: var(--color-primary);
  gap: 10px;
  outline: none;
}

/* --- Modal de área natural --- */
.area-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.area-modal[hidden] {
  display: none;
}

.area-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3,20,45,0.6);
  backdrop-filter: blur(2px);
  animation: areaModalFadeIn 0.25s ease;
}

.area-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: areaModalPop 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: thin;
}

.area-modal-dialog::-webkit-scrollbar {
  width: 6px;
}

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

@keyframes areaModalPop {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.area-modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.area-modal-close:hover,
.area-modal-close:focus-visible {
  background: rgba(0,0,0,0.7);
  outline: none;
}
.area-modal-close svg {
  width: 18px;
  height: 18px;
}

.area-modal-hero {
  position: relative;
}
.area-modal-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 20px 20px 0 0;
}
.area-modal-hero .area-badge {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-3);
}

.area-modal-body {
  padding: var(--space-6);
}

.area-modal-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-lg, 1.15rem);
  font-weight: 700;
  color: var(--color-primary);
}

.area-modal-text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-gray-500);
  white-space: pre-line;
}

body.area-modal-open {
  overflow: hidden;
}

/* --- Estado vacío (contenido en preparación) --- */
.sostenible-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 480px;
  margin: var(--space-4) auto var(--space-10);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: linear-gradient(135deg, rgba(0,179,230,0.06), rgba(3,62,140,0.02));
  border: 1px dashed rgba(0,179,230,0.3);
  border-radius: 18px;
}

.sostenible-empty-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,179,230,0.12);
  color: var(--color-secondary);
}
.sostenible-empty-icon svg {
  width: 24px;
  height: 24px;
}

.sostenible-empty-text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  line-height: 1.6;
}
