/* ===== CSS Variables & Reset ===== */
:root {
  --color-primary: #2c5282;
  --color-primary-dark: #1a365d;
  --color-primary-light: #4299e1;
  --color-accent: #ed8936;
  --color-accent-dark: #dd6b20;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-bg: #ffffff;
  --color-bg-alt: #f7fafc;
  --color-bg-dark: #1a202c;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-light);
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.625rem, 5.625vw, 4.125rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.navbar-brand span {
  color: var(--color-accent);
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar-nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-primary-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  transition: transform 0.5s ease;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 54, 93, 0.85) 0%,
    rgba(44, 82, 130, 0.6) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: 2rem;
  max-width: 800px;
}

.hero-content h1 {
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.95rem;
  color: white;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: white;
  opacity: 0.7;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== Info Section ===== */
.info {
  background: var(--color-bg-alt);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.info-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.info-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.info-card h3 {
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.info-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ===== Details Section ===== */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.details-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

.floor-plan-figure {
  margin: 0;
  position: relative;
}

.floor-plan-figure figcaption {
  text-align: center;
  padding: 0.6rem 0 0;
  font-size: 0.95rem;
  color: var(--color-text-light, #666);
  font-style: italic;
}

.floor-plan-link {
  display: block;
  position: relative;
  cursor: zoom-in;
}

.floor-plan-zoom {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.floor-plan-link:hover .floor-plan-zoom,
.floor-plan-link:focus .floor-plan-zoom {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.details-content h2 {
  color: var(--color-primary-dark);
  margin-bottom: 1.5rem;
}

.details-list {
  list-style: none;
  margin-bottom: 2rem;
}

.details-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.details-list li:last-child {
  border-bottom: none;
}

.details-list .detail-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: 50%;
  font-size: 1rem;
}

.details-list .detail-text strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
}

.details-list .detail-text span {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.price-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.price-tag small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

/* ===== Gallery Section ===== */
.gallery {
  background: var(--color-bg-alt);
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.gallery-filter {
  padding: 0.45rem 1.1rem;
  border: 2px solid var(--color-border);
  border-radius: 2rem;
  background: var(--color-bg);
  color: var(--color-text-light);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-filter:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.gallery-filter.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.gallery-item.hidden {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay span {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ===== Gallery Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.modal-caption {
  text-align: center;
  color: white;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.modal-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2001;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2001;
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-prev {
  left: 1.5rem;
}

.modal-next {
  right: 1.5rem;
}

/* ===== Comparison Section ===== */
.comparison-grid {
  display: grid;
  gap: 3rem;
}

.comparison-item {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.comparison-item h3 {
  padding: 1.5rem;
  text-align: center;
  color: var(--color-primary-dark);
  border-bottom: 1px solid var(--color-border);
}

.comparison-slider {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
  aspect-ratio: 4/3;
  user-select: none;
  -webkit-user-select: none;
}

.comparison-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comparison-slider .comparison-after {
  clip-path: inset(0 0 0 50%);
  z-index: 1;
}

.comparison-slider .comparison-before {
  z-index: 0;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: white;
  z-index: 2;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.comparison-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.comparison-handle::after {
  content: '◀ ▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: var(--color-primary);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 3;
}

.comparison-labels {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
}

.comparison-labels span:first-child::before {
  content: '📷 ';
}

.comparison-labels span:last-child::before {
  content: '✨ ';
}

/* ===== Location Section ===== */
.location {
  background: var(--color-bg-alt);
}

.location-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.location-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  background: var(--color-border);
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.location-info h3 {
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}

.location-features {
  list-style: none;
  margin-bottom: 2rem;
}

.location-features li {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.location-features li .feature-icon {
  flex-shrink: 0;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--color-primary-dark);
  color: white;
}

.contact .section-header h2 {
  color: white;
}

.contact .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.25rem;
}

.contact-item h4 {
  color: white;
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.contact-item a:hover {
  color: var(--color-accent);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.8;
}

.form-group input,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  background: var(--color-accent);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}

.btn-submit:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
  background: #111827;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .details-grid,
  .location-content,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .details-image {
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 3.5rem 0;
  }

  .navbar-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .navbar-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-nav li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .navbar-nav li:last-child {
    border-bottom: none;
  }

  .navbar-toggle {
    display: block;
  }

  .hero-badges {
    gap: 0.5rem;
  }

  .hero-badge {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .modal-prev {
    left: 0.5rem;
  }

  .modal-next {
    right: 0.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
}
