/* ========================================
   GULF PROPERTY EXPO — Theme Styles
   ======================================== */

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* --- Container --- */
.container { width: min(1200px, 100% - 3rem); margin-inline: auto; }

/* --- Variables --- */
:root {
  --primary: #1400ff;
  --overlay: rgb(20 0 255 / .78);
  --dark: #000;
  --white: #fff;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter Tight', sans-serif;
  --section-gap: clamp(4rem, 8vw, 7rem);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1920&q=80') center / cover no-repeat;
  color: var(--white);
  text-align: center;
  overflow: hidden;

  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--overlay);
    z-index: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem 1rem;
}

/* Logo Grid */
.hero-logo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: clamp(140px, 18vw, 220px);
  aspect-ratio: 3 / 4;
  border: 2px solid var(--white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeDown .8s ease both;

  & span {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 300;
    letter-spacing: .15em;
    line-height: 1;
  }
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: .2em;
  margin: 0;
  animation: fadeUp .8s ease .2s both;
}

/* Subtitle */
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(.85rem, 1.5vw, 1.1rem);
  font-weight: 300;
  letter-spacing: .08em;
  opacity: .85;
  margin: 0;
  animation: fadeUp .8s ease .35s both;
}

/* Button */
.hero-btn {
  display: inline-block;
  margin-top: .75rem;
  padding: .9rem 2.8rem;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity .25s, transform .25s;
  animation: fadeUp .8s ease .5s both;

  &:hover {
    opacity: .8;
    transform: translateY(-2px);
  }
}

/* --- Animations --- */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   About Section
   ======================================== */

.about {
  background: var(--white);
  color: var(--dark);
  padding: var(--section-gap) 0;
}

.about-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 60px;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;

  & span { color: #999; }
}

.about-text {
  font-family: var(--font-body);
  font-size: .95rem;
  line-height: 1.7;
  color: #444;
  margin-top: 1.5rem;
  max-width: 380px;
}

.about-list {
  margin-top: 1.25rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;

  & li {
    font-family: var(--font-body);
    font-size: .88rem;
    line-height: 1.6;
    color: #444;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-content: start;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1;
}

.stat-plus {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  color: #999;
  vertical-align: super;
}

.stat p {
  font-family: var(--font-body);
  font-size: .75rem;
  line-height: 1.5;
  color: #555;
  margin-top: .5rem;

  & b { color: var(--dark); }
}

/* Media Block (slider + video share same width) */
.about-media {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.about-slider {
  position: relative;
  overflow: hidden;

  & .swiper-slide {
    width: auto;

    & img {
      height: clamp(140px, 20vw, 200px);
      width: auto;
      aspect-ratio: 4 / 3;
      object-fit: cover;
    }
  }
}

/* Slider Nav Arrows */
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgb(0 0 0 / .45);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s;

  &:hover { background: rgb(0 0 0 / .7); }
}

.slider-prev { left: .75rem; }
.slider-next { right: .75rem; }

/* Video */
.about-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  cursor: pointer;
}

.about-video-thumb {
  position: relative;
  width: 100%;
  height: 100%;

  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: rgb(0 0 0 / .3);
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  transition: transform .25s;

  &:hover { transform: scale(1.1); }
}

.about-video-embed {
  position: absolute;
  inset: 0;

  & iframe { width: 100%; height: 100%; }
}

/* ========================================
   Portfolio Section
   ======================================== */

.portfolio {
  background: #f5f3f0;
  color: var(--dark);
  padding: var(--section-gap) 0;
}

/* Header */
.portfolio-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;

  & span { color: #999; }
}

.portfolio-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;

  & p {
    font-family: var(--font-body);
    font-size: .95rem;
    line-height: 1.7;
    color: #444;
  }

  & .portfolio-tagline {
    font-weight: 600;
    color: var(--dark);
    font-style: italic;
  }
}

.portfolio-btn {
  display: inline-block;
  align-self: start;
  padding: .85rem 2rem;
  background: var(--dark);
  color: var(--white);
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .08em;
  text-decoration: none;
  transition: opacity .25s, transform .25s;

  &:hover {
    opacity: .8;
    transform: translateY(-2px);
  }
}

/* Projects Grid — Uniform (default: 4 equal columns) */
.portfolio-projects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Projects Grid — Featured layout (class "featured" on parent) */
.portfolio-projects.featured {
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;

  & .project-featured {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }
}

/* Card base */
.project-card {
  & a { text-decoration: none; color: inherit; display: block; }
}

.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-img {
  overflow: hidden;
  border-radius: 4px;

  & img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform .4s;
  }

  .project-card:hover & img { transform: scale(1.04); }
}

.project-info {
  padding: .75rem 0 0;
}

.project-cat {
  font-family: var(--font-body);
  font-size: .78rem;
  color: #888;
  letter-spacing: .02em;
}

.project-name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: .25rem;
}

.project-desc {
  font-family: var(--font-body);
  font-size: .82rem;
  line-height: 1.6;
  color: #555;
  margin-top: .5rem;
}

.project-arrow {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  margin-top: .75rem;
  transition: border-color .2s;

  .project-card:hover & { border-color: var(--dark); }
}

/* Featured card overrides */
.portfolio-projects.featured .project-featured {

  & .project-img {
    flex: 1;

    & img {
      height: 100%;
      aspect-ratio: 16/9;
    }
  }

  & .project-name {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  }
}

/* ========================================
   Discover Properties Section
   ======================================== */

.discover {
  background: #f5f3f0;
  color: var(--dark);
  padding: var(--section-gap) 0;
  overflow: hidden;
}

.discover-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}

.discover-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
}

.discover-body {

  & p {
    font-family: var(--font-body);
    font-size: .92rem;
    line-height: 1.75;
    color: #555;
  }

  & ul {
    margin-top: 1.25rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

  & li {
    font-family: var(--font-body);
    font-size: .88rem;
    line-height: 1.6;
    color: #444;
  }
}

/* Slider — full viewport width with staggered peek */
.discover-slider-wrap {
  width: 100%;
  padding: 0;
}

.discover-slider {
  overflow: visible;
  padding-block: 4rem;

  & .swiper-slide {
    width: clamp(280px, 42vw, 560px);
    transition: opacity .4s, transform .5s;
    align-self: center;
  }

  /* Side slides: image only, staggered up/down */
  & .swiper-slide:not(.swiper-slide-active) {
    & .prop-name,
    & .prop-loc { display: none; }
  }

  & .swiper-slide-prev { transform: translateY(25%); }
  & .swiper-slide-next { transform: translateY(-15%); }

  /* Dim far slides */
  & .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-prev):not(.swiper-slide-next) {
    opacity: .3;
  }
}

/* Property Card */
.prop-card {
  cursor: grab;
}

.prop-img {
  overflow: hidden;
  border-radius: 6px;

  & img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .45s;
  }

  .prop-card:hover & img { transform: scale(1.03); }
}

.prop-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-top: 1rem;
}

.prop-loc {
  display: flex;
  align-items: start;
  gap: .5rem;
  margin-top: .5rem;
  font-family: var(--font-body);
  font-size: .82rem;
  line-height: 1.55;
  color: #555;

  & svg {
    flex-shrink: 0;
    margin-top: 2px;
  }
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
  background: var(--white);
  color: var(--dark);
  padding: var(--section-gap) 0;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;

  & label {
    font-family: var(--font-body);
    font-size: .8rem;
    color: #555;
    letter-spacing: .02em;

    & span { color: var(--dark); }
  }

  & input {
    width: 100%;
    padding: .75rem .85rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--dark);
    outline: none;
    transition: border-color .2s;

    &:focus { border-color: var(--dark); }
  }

  &.full { grid-column: 1 / -1; }
}

.contact-submit {
  align-self: center;
  padding: .9rem 3rem;
  background: var(--dark);
  color: var(--white);
  border: none;
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .25s, transform .25s;
  margin-top: .5rem;

  &:hover {
    opacity: .8;
    transform: translateY(-2px);
  }
}

/* ========================================
   Responsive
   ======================================== */

@media (width <= 768px) {
  .about-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .about-video { aspect-ratio: 16 / 9; }

  .portfolio-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .portfolio-projects { grid-template-columns: repeat(2, 1fr); }
  .portfolio-projects.featured {
    grid-template-columns: 1fr;

    & .project-featured { grid-column: auto; grid-row: auto; }
    & .project-featured .project-img img { height: 280px; }
  }

  .discover-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .discover-slider .swiper-slide { width: 70vw; }

  .form-row { grid-template-columns: 1fr; }
}

@media (width <= 480px) {
  .hero-logo { width: 120px; padding: 1rem; }
  .hero-btn { padding: .75rem 2rem; font-size: .85rem; }

  .about-stats { grid-template-columns: 1fr; }
  .stat { text-align: center; }

  .portfolio-projects { grid-template-columns: 1fr; }

  .discover-slider .swiper-slide { width: 85vw; }  .discover-slider .swiper-slide-prev,
  .discover-slider .swiper-slide-next { transform: translateY(0); }}
