/* ========================================
   BEACHSIDE RESIDENCE — Landing Page CSS
   Redesigned to match reference mockup
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --sand: #f5efe6;
  --sand-light: #faf7f2;
  --sand-mid: #ede5d8;
  --gold: #c9a96e;
  --gold-dark: #b08d4f;
  --gold-light: #e0cc9e;
  --navy: #2c3e50;
  --navy-light: #3d5166;
  --charcoal: #333333;
  --text-body: #555555;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
  --max-width: 1200px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--sand-light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201, 169, 110, 0.55);
}

.btn-wide {
  width: 100%;
  max-width: 480px;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  letter-spacing: 1px;
}

.section-title-left {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 16px;
}

.section-title-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold-light);
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.15;
}

.logo-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header .btn {
  padding: 10px 24px;
  font-size: 12px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO SECTION — Split Layout
   ======================================== */
.hero {
  padding-top: var(--header-height);
  background: var(--sand-light);
  overflow: hidden;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-height));
  align-items: center;
}

.hero-content {
  padding: 60px 48px 60px 0;
}

.hero-content h1 {
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--navy);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
  font-style: italic;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-body);
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-image {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 500px;
}

/* ========================================
   GALLERY CAROUSEL
   ======================================== */
.gallery {
  padding: 60px 0 0;
  background: var(--sand-light);
}

.gallery-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 500px;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy);
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.gallery-arrow:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 0;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background: var(--gold);
  transform: scale(1.2);
}

/* ========================================
   APARTMENTS / STYLE & COMFORT
   ========================================*/
.apartments {
  padding: 80px 0 0;
  background: var(--sand-light);
}

.apartments-header {
  margin-bottom: 8px;
}

.apartments-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 500px;
  margin-bottom: 48px;
}

.apartments-image {
  width: 100%;
  overflow: hidden;
}

.apartments-image img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: cover;
  object-position: center;
}

/* ========================================
   SERVICES / CARE FOR YOU
   ======================================== */
.services {
  padding: 80px 0;
  background: var(--sand);
}

.services-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.services-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 40px;
}

.services-grid-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.service-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-mini-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.service-mini span {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--navy);
  line-height: 1.4;
}

.services-image {
  overflow: hidden;
  border-radius: var(--radius);
}

.services-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
  border-radius: var(--radius);
  transition: transform 0.6s ease;
}

.services-image:hover img {
  transform: scale(1.03);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact {
  padding: 80px 0;
  background: var(--sand-light);
}

.contact-inline {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-fields .form-group {
  margin-bottom: 0;
}

.contact-fields input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: var(--transition);
  background: var(--white);
}

.contact-fields input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.contact-inline .btn-wide {
  max-width: 100%;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--white);
  border-top: 1px solid #e8e0d4;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto auto 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 32px;
}

.footer-brand .logo {
  margin-bottom: 0;
}

.footer-brand .logo-text {
  font-size: 16px;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact-item {
  font-size: 14px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 14px;
  color: var(--navy);
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid #e8e0d4;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: #999;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(44, 62, 80, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 520px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--charcoal);
}

.modal h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

.modal-subtitle {
  color: #777;
  font-size: 14px;
  margin-bottom: 28px;
}

/* ---------- Form Styles (Modal) ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal .btn {
  width: 100%;
  margin-top: 8px;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.fade-in,
.fade-in-left,
.fade-in-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in {
  transform: translateY(30px);
}

.fade-in-left {
  transform: translateX(-40px);
}

.fade-in-right {
  transform: translateX(40px);
}

.fade-in.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* ========================================
   MOBILE OVERLAY
   ======================================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* --- Hamburger kicks in early to prevent nav wrapping --- */
@media (max-width: 1100px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--white);
    padding: 100px 32px 32px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    gap: 20px;
    align-items: flex-start;
  }

  .nav-links.open {
    right: 0;
  }
}

/* --- Tablet: stacked hero, single-col services --- */
@media (max-width: 900px) {
  .gallery-track {
    height: 350px;
  }

  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 60px 0 40px;
    padding-right: 0;
    order: 1;
  }

  .hero-image {
    order: 2;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    min-height: unset;
  }

  .services-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-image {
    order: 2;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .gallery-track {
    height: 250px;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .contact-fields {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .services-grid-mini {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 26px;
  }

  .section-title-left {
    font-size: 22px;
  }

  .section-title {
    font-size: 24px;
  }

  .hero-image {
    aspect-ratio: 4 / 3;
  }
}