/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a5f4a;
  --primary-light: #2a8f6a;
  --primary-dark: #0d3f2f;
  --accent: #c8965a;
  --accent-light: #e0b07a;
  --bg: #ffffff;
  --bg-alt: #f7f5f2;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --text-white: #ffffff;
  --border: #e0dcd5;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; font-weight: 600; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
  font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-outline:hover {
  background: var(--text-white);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.85rem;
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

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

.btn-full {
  width: 100%;
}

/* ===== Navbar ===== */
.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 transparent;
  transition: all var(--transition);
  padding: 16px 0;
}

.navbar.scrolled {
  padding: 10px 0;
  border-bottom-color: var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.logo:hover {
  color: var(--text);
}

.logo-icon {
  font-size: 1.8rem;
  color: var(--primary);
}

.logo-text {
  font-family: 'Playfair Display', serif;
}

.logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 63, 47, 0.65);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--text-white);
  max-width: 700px;
  padding: 120px 0;
}

.hero h1 {
  margin-bottom: 24px;
}

.accent {
  color: var(--accent-light);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(26, 95, 74, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-header h2 {
  margin-bottom: 16px;
}

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

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

.about-img {
  border-radius: var(--radius);
  height: 400px;
  width: 100%;
  object-fit: cover;
}

/* ===== Properties ===== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.property-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.property-image {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.property-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-card:hover .property-img {
  transform: scale(1.05);
}

.property-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.property-info {
  padding: 24px;
}

.property-info h3 {
  margin-bottom: 4px;
}

.property-location {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.property-features {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.property-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.property-price small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-light);
}

/* ===== Amenities ===== */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.amenity-card {
  padding: 36px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.amenity-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.amenity-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.amenity-card h3 {
  margin-bottom: 10px;
}

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

/* ===== Pay Rent ===== */
.pay-rent-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.pay-rent-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.pay-rent-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.pay-rent-card h3 {
  margin-bottom: 16px;
}

.pay-rent-card p {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.stripe-pay-form {
  text-align: left;
  margin-top: 8px;
}

.stripe-pay-form .form-group {
  margin-bottom: 16px;
}

.stripe-pay-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stripe-pay-form input,
.stripe-pay-form select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.stripe-pay-form input:focus,
.stripe-pay-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 164, 94, 0.15);
}

.stripe-pay-form select option {
  background: #1a2940;
  color: #fff;
}

.late-fee-amount {
  background: rgba(200, 164, 94, 0.1);
  border: 1px solid rgba(200, 164, 94, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.late-fee-amount strong {
  color: var(--primary);
  font-size: 1.3rem;
}

.stripe-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

.stripe-badge svg {
  opacity: 0.5;
}

.pay-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#payBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.pay-rent-info {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.pay-rent-info h4 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.pay-rent-info ul {
  list-style: none;
}

.pay-rent-info li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.95rem;
  padding-left: 24px;
  position: relative;
}

.pay-rent-info li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.pay-rent-info li:last-child {
  border-bottom: none;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.contact-icon {
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 95, 74, 0.1);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.contact-item h4 {
  margin-bottom: 4px;
}

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

.contact-item a {
  color: var(--text-light);
}

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

/* ===== Form ===== */
.contact-form {
  background: var(--bg-alt);
  padding: 40px;
  border-radius: var(--radius);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  transition: border-color var(--transition);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.1);
}

.form-group textarea {
  resize: vertical;
}

/* ===== Newsletter ===== */
.newsletter {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 80px 0;
  color: var(--text-white);
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter h2 {
  margin-bottom: 12px;
}

.newsletter p {
  opacity: 0.9;
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}

.newsletter-form input::placeholder {
  color: rgba(255,255,255,0.6);
}

.newsletter-form input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.15);
}

.newsletter-form .btn {
  white-space: nowrap;
  background: var(--accent);
  border-color: var(--accent);
}

.newsletter-form .btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer .logo {
  color: white;
  margin-bottom: 16px;
}

.footer .logo-accent {
  color: var(--accent-light);
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  color: white;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-contact a {
  color: rgba(255,255,255,0.7);
}

.footer-contact a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== Locations / Map ===== */
#map {
  height: 450px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
  margin-bottom: 40px;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.location-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

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

.location-card h3 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.location-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: 12px;
}

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

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 280px;
    background: var(--bg);
    flex-direction: column;
    padding: 80px 24px 24px;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    gap: 4px;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero-content {
    padding: 100px 0 80px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-stats {
    gap: 24px;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .locations-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
  #map {
    height: 350px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .pay-rent-content {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    text-align: center;
  }

  .about-stats {
    flex-direction: column;
    gap: 16px;
  }

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

  .section {
    padding: 60px 0;
  }
}
