/* Cuban Flag Colors Theme - Blue, Red, White, Gold */
:root {
  --cuban-blue: #002A8F;
  --cuban-red: #CF142B;
  --cuban-white: #FFFFFF;
  --accent-color: #D4A84B;
  --accent-light: #E8C06A;
  --accent-dark: #B8913A;
  --primary-color: var(--cuban-blue);
  --primary-light: #0040CD;
  --primary-dark: #001D66;
  --secondary-color: #CF142B;
  --secondary-light: #E74C3C;
  --secondary-dark: #B03A2E;
  --text-dark: #2C3E50;
  --text-medium: #5D6D7E;
  --text-light: #FDFEFE;
  --bg-white: #FFFFFF;
  --bg-off-white: #FAFAF9;
  --bg-light: #F4F6F7;
  --bg-pattern: linear-gradient(135deg, rgba(0, 42, 143, 0.02) 0%, rgba(207, 20, 43, 0.02) 100%);
  --shadow-subtle: 0 2px 8px rgba(44, 62, 80, 0.08);
  --shadow-medium: 0 4px 16px rgba(44, 62, 80, 0.12);
  --shadow-elevated: 0 8px 24px rgba(44, 62, 80, 0.15);
  --transition-fast: all 0.2s ease;
  --transition-smooth: all 0.3s ease;
  --transition-bold: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 120px; /* Account for sticky header + margin */ }

body {
  font-family: 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-off-white);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--cuban-blue);
  color: var(--cuban-white);
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
  background: var(--cuban-blue);
  color: var(--text-light);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-elevated);
  border-bottom: 4px solid var(--accent-color);
}

.header__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header__logo {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.header__nav { display: flex; gap: 0.3rem; flex-wrap: wrap; }

.header__nav-link {
  padding: 0.5rem 1rem;
  color: var(--text-light);
  border-radius: 8px;
  transition: var(--transition-fast);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

.header__nav-link:hover, .header__nav-link--active {
  background: var(--bg-white);
  color: var(--primary-color);
  border-color: var(--accent-color);
}

.header__lang { display: flex; gap: 0.3rem; }

.header__lang-btn {
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.header__lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.header__lang-btn--active {
  background: var(--accent-color);
  color: var(--text-dark);
  border-color: var(--accent-color);
  box-shadow: 0 2px 8px rgba(212, 168, 75, 0.3);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, rgba(207, 20, 43, 0.8), rgba(0, 42, 143, 0.85)), url('../images/hero/hero.webp') center/cover;
  background-attachment: fixed;
  color: var(--text-light);
  padding: 7rem 0 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__content { position: relative; z-index: 1; }

.hero__title {
  font-size: 3.8rem;
  margin-bottom: 1.2rem;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.4);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero__subtitle {
  font-size: 1.7rem;
  margin-bottom: 3rem;
  opacity: 0.98;
  font-weight: 600;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.3);
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: inline-block;
  padding: 1.4rem 3rem;
  background: var(--accent-color);
  color: var(--text-dark);
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: var(--shadow-elevated);
  transition: var(--transition-smooth);
  border: 2px solid var(--accent-dark);
  text-decoration: none;
}

.hero__cta:hover {
  background: var(--accent-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(212, 168, 75, 0.4);
  border-color: var(--accent-color);
}

/* Sections */
.section { padding: 0 0 1rem 0; position: relative; }

.section__title {
  font-size: 2.5rem;
  text-align: center;
  margin: 2.5rem 0;
  color: var(--primary-color);
  position: relative;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
}

.section__title::after {
  content: '★';
  display: block;
  font-size: 2rem;
  color: white;
  -webkit-text-stroke: 2px var(--secondary-color);
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Apartments Grid */
.apartments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.apartment {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
  border: 2px solid var(--bg-light);
}

.apartment:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--secondary-color);
}

.apartment__image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  position: relative;
  cursor: pointer;
  display: block;
}

.apartment__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  transition: var(--transition-smooth);
  pointer-events: none;
}

.apartment:hover .apartment__image::after { opacity: 1; }

.apartment__tag {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent-color);
  color: var(--text-dark);
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.apartment__content { padding: 2rem; }

.apartment__title {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
  color: var(--primary-color);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.apartment__location {
  color: var(--text-medium);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding-left: 28px;
  position: relative;
}

.apartment__location::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cellipse cx='50' cy='105' rx='30' ry='12' fill='none' stroke='%23002A8F' stroke-width='6'/%3E%3Cpath d='M50 15 C27 15 10 32 10 55 C10 75 50 105 50 105 C50 105 90 75 90 55 C90 32 73 15 50 15 Z' fill='%23CF142B'/%3E%3Ccircle cx='50' cy='55' r='15' fill='white'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.apartment__description {
  color: var(--text-medium);
  margin-bottom: 1.8rem;
  line-height: 1.8;
  font-weight: 400;
}

.apartment__features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  margin-top: 1.2rem;
}

.apartment__feature {
  background: var(--bg-light);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-dark);
  font-weight: 600;
  border: 2px solid var(--bg-light);
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.apartment__feature:hover {
  background: var(--secondary-color);
  color: var(--text-light);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.apartment__price {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 900;
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.apartment__price small {
  font-size: 1.1rem;
  color: var(--text-medium);
  font-weight: 500;
}

.apartment__cta {
  display: block;
  padding: 1.2rem 2.2rem;
  background: var(--primary-color);
  color: var(--text-light);
  text-align: center;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid var(--primary-light);
  text-decoration: none;
}

.apartment__cta:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 42, 143, 0.3);
  color: var(--text-light);
}

.apartment__photos {
  display: block;
  width: 100%;
  padding: 1.2rem 2.2rem;
  background: var(--secondary-color);
  color: var(--text-light);
  border: 2px solid var(--secondary-color);
  text-align: center;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 1.2rem;
  font-family: inherit;
  box-shadow: var(--shadow-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.apartment__photos:hover {
  background: var(--secondary-light);
  border-color: var(--secondary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(207, 20, 43, 0.3);
  color: var(--text-light);
}

.apartment__readmore {
  display: inline-block;
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
  margin: 0.5rem 0 1.5rem;
}

.apartment__readmore:hover {
  background: var(--primary-color);
  color: var(--text-light);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.96);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}

.lightbox--active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1;
  position: relative;
  border: 4px solid var(--accent-color);
  width: auto;
  height: auto;
}

.lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 3002;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  font-weight: 400;
}

.lightbox__close:hover {
  background: var(--secondary-color);
  border-color: var(--bg-white);
  transform: rotate(90deg) scale(1.1);
}

/* Location Map */
.location__map {
  height: 500px;
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-elevated);
  border: 2px solid var(--secondary-color);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.location__map .leaflet-control { z-index: 2 !important; }
.location__map .leaflet-pane { z-index: 1 !important; }
.location__map .leaflet-top,
.location__map .leaflet-bottom { z-index: 2 !important; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Q&A Section */
.faq-category-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 2.5rem auto 1rem;
  max-width: fit-content;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto 1rem;
}

.faq-item {
  border-bottom: 2px solid var(--bg-light);
  background: var(--bg-white);
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.faq-item:hover {
  box-shadow: var(--shadow-subtle);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  padding: 1.2rem 1.5rem;
  padding-left: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  transition: var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-question-q {
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.4;
  padding-right: 1rem;
}

.faq-toggle {
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform 0.3s ease;
  color: var(--primary-color);
  line-height: 1;
  flex-shrink: 0;
}

.faq-item--active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--text-medium);
  line-height: 1.8;
  padding: 0 1.5rem;
}

.faq-answer p {
  margin-bottom: 1rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
}

.faq-answer li {
  margin-bottom: 0.5rem;
}

.faq-item--active .faq-answer {
  max-height: 2000px;
  padding-bottom: 1.5rem;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.96);
  z-index: 2000;
  padding: 0;
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.gallery-modal--active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.gallery-modal__content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem;
  min-height: 100%;
}

.gallery-modal__close {
  position: sticky;
  top: 1rem;
  float: right;
  margin-left: auto;
  margin-bottom: -3rem;
  background: rgba(0, 0, 0, 0.8);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 3001;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  font-weight: 400;
}

.gallery-modal__close:hover {
  background: var(--primary-color);
  border-color: var(--bg-white);
  transform: rotate(90deg) scale(1.1);
}

.gallery-modal__title {
  color: var(--text-light);
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3.5rem;
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.gallery-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.gallery-modal__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-medium);
  border: 3px solid transparent;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 400px;
}

.gallery-modal__item:hover {
  transform: scale(1.05);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-elevated);
}

.gallery-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-fast);
}

/* Contact Form */
.contact {
  background: var(--bg-white);
  padding: 4rem 3.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-elevated);
  max-width: 700px;
  margin: 0 auto;
  border: 2px solid var(--primary-color);
  overflow: hidden;
}

.contact__form { display: grid; gap: 2rem; }

.contact__group { display: grid; gap: 0.8rem; }

.contact__label {
  font-weight: 800;
  color: var(--text-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.contact__input, .contact__textarea {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: 2px solid var(--bg-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition-fast);
  font-family: inherit;
  background: var(--bg-off-white);
  font-weight: 500;
}

.contact__input:focus, .contact__textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(0, 42, 143, 0.1);
}

.contact__textarea {
  min-height: 180px;
  resize: vertical;
}

.contact__group--dates { margin-bottom: 0; gap: 0.5rem; }

.contact__dates { display: flex; align-items: center; gap: 0.5rem; }

.contact__dates .contact__input {
  flex: 1;
  min-width: 0;
  padding: 1rem;
  text-align: center;
}

.contact__dates-separator {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 700;
  flex-shrink: 0;
}

.contact__submit {
  padding: 1.4rem 3rem;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-weight: 800;
  box-shadow: var(--shadow-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid var(--primary-light);
}

.contact__submit:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 42, 143, 0.35);
  color: var(--text-light);
}

.contact__field--hidden { display: none; }

.contact__input--error, .contact__textarea--error {
  border-color: var(--secondary-color) !important;
  background: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(207, 20, 43, 0.15);
}

.contact__input--error:focus, .contact__textarea--error:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(207, 20, 43, 0.2);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 2rem 0 3rem;
  text-align: center;
  border-top: 5px solid var(--accent-color);
}

.footer__content {
  display: grid;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer__section { text-align: center; }

.footer__title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer__text { margin-bottom: 0.8rem; opacity: 0.95; }

.footer__link {
  color: var(--secondary-color);
  transition: var(--transition-fast);
  font-weight: 600;
}

.footer__link:hover { color: var(--accent-color); }

/* Location pin for contact section - on the span */
.contact-address {
  padding-left: 24px;
  position: relative;
  display: inline-flex;
  align-items: baseline;
}

.contact-address::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cellipse cx='50' cy='105' rx='30' ry='12' fill='none' stroke='%23002A8F' stroke-width='6'/%3E%3Cpath d='M50 15 C27 15 10 32 10 55 C10 75 50 105 50 105 C50 105 90 75 90 55 C90 32 73 15 50 15 Z' fill='%23CF142B'/%3E%3Ccircle cx='50' cy='55' r='15' fill='white'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* Apartment highlight animation for map popup clicks */
.apartment.highlight {
    animation: highlight-pulse 2s ease-out;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 42, 143, 0.7); }
    50% { box-shadow: 0 0 20px 5px rgba(0, 42, 143, 0.5); }
    100% { box-shadow: none; }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary-color);
  color: var(--text-light);
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-elevated);
  font-weight: 600;
  z-index: 3000;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast--success { background: #27ae60; }
.toast--error { background: var(--secondary-color); }
.toast--visible { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Flatpickr Calendar Theme */
.flatpickr-calendar {
  background: var(--bg-white);
  border: 2px solid var(--bg-light);
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
}

.flatpickr-day {
  color: var(--text-dark);
  border-radius: 6px;
}

.flatpickr-day.selected {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.flatpickr-day.selected:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: #ccc;
  text-decoration: line-through;
}

.flatpickr-day.today { border-color: var(--accent-color); }

.flatpickr-months .flatpickr-month {
  background: var(--primary-color);
  color: var(--text-light);
  fill: var(--text-light);
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--primary-color);
  color: var(--text-light);
}

.flatpickr-current-month input.cur-year { color: var(--text-light); }

.flatpickr-weekday {
  background: var(--bg-light);
  color: var(--text-dark);
}

span.flatpickr-weekday {
  background: var(--bg-light);
  color: var(--primary-color);
  font-weight: 600;
}

.flatpickr-day.inRange,
.flatpickr-day.inRange:hover {
  background: rgba(0, 42, 143, 0.2);
  border-color: rgba(0, 42, 143, 0.3);
  box-shadow: none;
}

.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Apartment Details Modal */
.apartment-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.95);
  z-index: 3000;
  padding: 3rem;
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.apartment-modal--active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease-out;
}

.apartment-modal--active .apartment-modal__content {
  flex: 1;
  overflow-y: auto;
}

.apartment-modal__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 3001;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  font-weight: 400;
}

.apartment-modal__close:hover {
  background: var(--secondary-color);
  border-color: var(--bg-white);
  transform: rotate(90deg) scale(1.05);
}

.apartment-modal__title {
  color: var(--text-light);
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
  margin-top: 2.5rem;
  font-weight: 900;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.apartment-modal__content {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-light);
  line-height: 1.8;
  font-size: 1.1rem;
}

.apartment-modal__content p { margin-bottom: 1.5rem; }

/* Responsive Breakpoints */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .header__logo { font-size: 1.9rem; }
  .header__nav-link { padding: 0.5rem 1rem; font-size: 0.9rem; }
  .header__lang-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
}

/* Desktop (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .header__logo { font-size: 1.4rem; }
  .header__nav-link { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
  .header__lang-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
  .header__content { flex-wrap: nowrap; }
  .header__nav { flex-wrap: nowrap; }
  .apartments { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 6rem 0 5rem; }
  .hero__title { font-size: 3.5rem; }
  .hero__subtitle { margin-bottom: 2.8rem; }
  .apartment__title { font-size: 1.9rem; margin-bottom: 1rem; }
  .apartment__location { margin-bottom: 1.8rem; font-size: 1.05rem; }
  .apartment__description { margin-bottom: 2.5rem; }
  .apartment__features { margin-bottom: 3rem; margin-top: 1.5rem; }
  .apartment__feature { font-weight: 700; letter-spacing: 0.3px; }
}

/* Tablet Portrait & Mobile (768px and below) */
@media (max-width: 768px) {
  .section { padding: 2rem 0; }
  .section__title { margin-top: 0.5rem; margin-bottom: 2rem; font-size: 2.4rem; }
  .hero { padding: 8rem 0 5rem; }
  .hero__title { font-size: 2.8rem; }
  .hero__subtitle { font-size: 1.4rem; }
  .header { padding: 1rem 0; }
  .header__content { justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
  .header__logo { font-size: 1.4rem; flex: 0 0 auto; }
  .header__nav { flex: 1; flex-wrap: wrap; justify-content: center; gap: 0.3rem; }
  .header__nav-link { padding: 0.45rem 0.8rem; font-size: 0.85rem; text-align: center; }
  .header__lang { gap: 0.3rem; flex: 0 0 auto; }
  .header__lang-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
  .apartments { grid-template-columns: 1fr; }
  .apartment { border-radius: 10px; }
  .apartment__features { gap: 0.4rem; margin-top: 1.2rem; }
  .apartment__feature { padding: 0.25rem 0.6rem; font-size: 0.65rem; border-radius: 12px; }
  .location__map { height: 400px; }
  .contact { padding: 2rem 1.5rem; }
  .contact__dates { flex-direction: row; gap: 0.3rem; }
  .contact__dates .contact__input { padding: 0.6rem 0.3rem; font-size: 0.85rem; text-align: center; min-width: 0; width: 50%; }
  .contact__dates-separator { font-size: 0.8rem; flex-shrink: 0; }
  .lightbox { padding: 1rem; }
  .lightbox__image { max-height: 85vh; border-radius: 10px; border-width: 3px; }
  .lightbox__close { top: 1rem; right: 1rem; width: 40px; height: 40px; font-size: 1.4rem; }
  .gallery-modal__content { padding: 1.5rem; }
  .gallery-modal__close { width: 40px; height: 40px; font-size: 1.4rem; margin-left: auto; margin-bottom: -2.5rem; }
  .gallery-modal__grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .gallery-modal__item { width: 100%; max-width: none; aspect-ratio: 4/3; }
  .apartment-modal { padding: 2rem 1.5rem; }
  .apartment-modal__title { font-size: 1.8rem; margin-bottom: 2rem; margin-top: 3rem; }
  .apartment-modal__close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.6rem; }
  .apartment-modal__content { font-size: 1rem; }
  .footer { padding: 2rem 0 2rem; }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  .section { padding: 2rem 0; }
  .hero { padding: 8rem 0 5rem; }
  .hero__title { font-size: 2.2rem; }
  .hero__subtitle { font-size: 1.2rem; }
  .header { padding: 0.6rem 0; }
  .header__content { gap: 0.4rem; flex-direction: column; justify-content: center; align-items: center; }
  .header__logo { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .header__nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.2rem; margin-bottom: 0.3rem; }
  .header__nav-link { padding: 0.3rem 0.6rem; font-size: 0.7rem; text-align: center; }
  .header__lang { gap: 0.2rem; }
  .header__lang-btn { padding: 0.35rem 0.6rem; font-size: 0.65rem; }
  .contact { padding: 3rem 2rem; }
  .apartments { grid-template-columns: 1fr; }
  .apartment__features { gap: 0.35rem; margin-top: 1rem; }
  .apartment__feature { padding: 0.2rem 0.5rem; font-size: 0.6rem; border-radius: 10px; }
  .location__map { height: 350px; border-radius: 10px; }
  .lightbox { padding: 0.6rem; }
  .lightbox__image { max-height: 80vh; border-radius: 8px; border-width: 2px; }
  .lightbox__close { top: 0.8rem; right: 0.8rem; width: 36px; height: 36px; font-size: 1.2rem; }
  .gallery-modal__content { padding: 1rem; }
  .gallery-modal__close { width: 36px; height: 36px; font-size: 1.2rem; margin-left: auto; margin-bottom: -2rem; }
  .gallery-modal__title { font-size: 1.6rem; margin-bottom: 2rem; }
  .gallery-modal__grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .gallery-modal__item { aspect-ratio: 4/3; }
  .apartment-modal__title { font-size: 1.5rem; margin-bottom: 1.5rem; margin-top: 2.5rem; }
  .apartment-modal__close { top: 0.8rem; right: 0.8rem; width: 40px; height: 40px; font-size: 1.4rem; }
  .apartment-modal__content { font-size: 0.95rem; }
}

/* Custom apartment marker labels on map */
.apartment-marker {
  background: transparent !important;
  border: none !important;
}

.custom-marker-label {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--primary-color);
}

/* Map popup clickable links */
.map-popup-link {
    color: #002A8F;
    text-decoration: none;
    cursor: pointer;
}
.map-popup-link:hover {
    text-decoration: underline;
}
