/* =========================================
   El Romeral de Calahonda – style.css
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Open+Sans:wght@200;300;400;500;600&display=swap');

/* ----- Custom properties ----- */
:root {
  --gold: #FFC12C;
  --gold-btn: #F8BB29;
  --dark: #1F1F1F;
  --black: #000;
  --white: #fff;
  --gray: #565759;
  --text: #151616;
  --container: 1300px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Open Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

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

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

/* ----- Container ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   HEADER / NAV
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 72px;
  gap: 32px;
}

.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo img { height: 52px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-links li a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--black);
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav-links li a:hover { color: var(--gold); }
.nav-links li a:hover::after { transform: scaleX(1); }

.nav-links li a.active { color: var(--gold); }
.nav-links li a.active::after { transform: scaleX(1); }

.nav-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.nav-contact a {
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-contact a:hover { opacity: 1; }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero--sub {
  min-height: 50vh;
}

.hero--small {
  min-height: 300px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,1,1,0.45);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 48px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero--center .hero__content {
  text-align: center;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 200;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0;
}

.hero__cta {
  position: absolute;
  bottom: 10%;
  left: 48px;
  z-index: 2;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-block;
  background: var(--gold-btn);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--white);
  color: var(--black);
}

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

.btn--dark:hover {
  background: var(--gold-btn);
  color: var(--black);
}

/* =========================================
   CARD GRID (index page)
   ========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: pointer;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(81%) contrast(120%);
  transition: transform 0.4s ease;
}

.card:hover .card__img { transform: scale(1.04); }

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(31,31,31,0.05), rgba(31,31,31,0.39), #000);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover .card__overlay { opacity: 1; }

.card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  border-bottom: 5px solid var(--gold);
  transform: translateY(5px);
  transition: transform 0.3s, border-color 0.3s;
}

.card:hover .card__label { transform: translateY(0); }

.card__label-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
}

/* =========================================
   SECTION BASE
   ========================================= */
.section {
  padding: 80px 0;
}

.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section--gray {
  background: #f7f7f5;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.section--dark .section__title { color: var(--white); }

.section__divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 16px 0 28px;
}

.section__divider--center { margin: 16px auto 28px; }

.section__subtitle {
  font-size: 15px;
  font-weight: 300;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.section__text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--gray);
  max-width: 680px;
}

.section--dark .section__text { color: #ccc; }

/* =========================================
   WELCOME SECTION (index)
   ========================================= */
.welcome {
  text-align: center;
  padding: 90px 24px;
}

.welcome .section__title { font-size: 46px; }

.welcome .section__text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  color: var(--gray);
}

/* =========================================
   ALTERNATING CONTENT SECTIONS
   ========================================= */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.content-split--reverse { direction: rtl; }
.content-split--reverse > * { direction: ltr; }

.content-split__img-wrap {
  overflow: hidden;
  min-height: 420px;
}

.content-split__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-split__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 420px;
}

.content-split__images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-split__text {
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}

.section--dark .content-split__text {
  background: var(--dark);
}

.content-split__title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.section--dark .content-split__title { color: var(--white); }

.content-split__text .section__divider { margin-top: 0; }

/* =========================================
   FEATURES / CHECKLIST
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.features-text {
  padding: 72px 64px 72px 48px;
}

.features-image {
  overflow: hidden;
}

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

.checklist {
  list-style: none;
  margin-top: 24px;
}

.checklist li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--gray);
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  line-height: 1.5;
}

.checklist li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* =========================================
   FLOOR PLANS CARDS
   ========================================= */
.floorplan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.floorplan-card {
  background: #f7f7f5;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.floorplan-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  padding: 16px;
}

.floorplan-card__label {
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  border-top: 2px solid var(--gold);
}

/* =========================================
   GALLERY GRID
   ========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,193,44,0);
  transition: background 0.3s;
}

.gallery-item:hover::after { background: rgba(255,193,44,0.12); }

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

.lightbox.open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--white);
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 48px;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 8px 20px;
}

.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; }

/* =========================================
   VIDEO SECTION
   ========================================= */
.video-section { padding: 72px 0; }

.video-item {
  margin-bottom: 48px;
}

.video-item:last-child { margin-bottom: 0; }

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-desc {
  margin-top: 14px;
  font-size: 14px;
  color: var(--gray);
  font-style: italic;
}

/* =========================================
   SITE PLAN
   ========================================= */
.site-plan-img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

/* =========================================
   HOUSE PLANS GRID
   ========================================= */
.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.house-btn {
  display: block;
  background: var(--gold-btn);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 8px;
  text-align: center;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
}

.house-btn:hover {
  background: var(--white);
  color: var(--black);
  outline: 2px solid var(--gold);
}

/* =========================================
   CONTACT FORM
   ========================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}

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

.form-group--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-group--checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--gold);
}

.form-group--checkbox label {
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray);
  cursor: pointer;
}

.contact-info { padding-top: 8px; }

.contact-info__block {
  margin-bottom: 36px;
}

.contact-info__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}

.contact-info__line {
  font-size: 14px;
  color: var(--gray);
  line-height: 2;
}

.contact-info__line strong {
  color: var(--text);
  font-weight: 600;
}

/* =========================================
   ABOUT US CONTACT ICONS
   ========================================= */
.about-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0;
  text-align: center;
}

.about-contact__item {
  padding: 40px 24px;
  border: 1px solid #eee;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.about-contact__item:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(255,193,44,0.15);
}

.about-contact__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
}

.about-contact__label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 6px;
}

.about-contact__value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 48px;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,193,44,0.3);
}

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

.footer-col ul li a {
  font-size: 13px;
  color: #aaa;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-newsletter p {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 14px;
}

.footer-newsletter__form {
  display: flex;
}

.footer-newsletter__input {
  flex: 1;
  border: 1px solid #444;
  background: #2a2a2a;
  color: var(--white);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}

.footer-newsletter__input:focus { border-color: var(--gold); }
.footer-newsletter__input::placeholder { color: #666; }

.footer-newsletter__btn {
  background: var(--gold-btn);
  color: var(--black);
  border: none;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s;
}

.footer-newsletter__btn:hover { background: var(--white); }

.footer-bottom {
  border-top: 1px solid #333;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom__copy {
  font-size: 12px;
  color: #666;
}

.footer-bottom__logo img {
  height: 32px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-bottom__logo:hover img { opacity: 1; }

/* =========================================
   UTILITY
   ========================================= */
.text-center { text-align: center; }

.divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 16px 0 28px;
}

.divider--center { margin: 16px auto 28px; }

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablet: ≤ 1024px */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .floorplan-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .features-image { min-height: 360px; max-height: 480px; }
  .content-split { grid-template-columns: 1fr; }
  .content-split--reverse { direction: ltr; }
  .content-split__img-wrap { min-height: 320px; }
  .content-split__images { min-height: 280px; }
  .about-contact { grid-template-columns: 1fr; max-width: 400px; margin: 48px auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
  }

  .nav-links li a::after { display: none; }

  .nav-contact { margin-left: 0; }

  .hero__content { padding: 0 24px; }
  .hero__cta { left: 24px; }

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

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

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

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

  .footer-bottom { flex-direction: column; text-align: center; }

  .features-text { padding: 48px 24px; }

  .content-split__text { padding: 40px 24px; }

  .welcome .section__title { font-size: 32px; }

  .house-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .section { padding: 56px 0; }
}

/* Small mobile: ≤ 480px */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; }
}
