/* =======================
   BCRE Listing CSS (Clamp + Mobile Optimized + Final Polish)
======================= */

@charset "UTF-8";

/* ========== Root Variables ========== */
:root {
  --font-body: 'owners', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-headings: 'owners', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'pressio', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --color-bg: #0a2438;
  --color-light: #fff;
  --color-accent: #2C9AB7;

  --section-pad: clamp(40px, 8vw, 60px) 20px;
  --gap-sm: clamp(8px, 2vw, 16px);
  --gap-md: clamp(16px, 3vw, 32px);
  --pad-sm: clamp(12px, 3vw, 20px);
  --pad-lg: clamp(40px, 8vw, 60px);
}

/* ========== Global Layout Guards ========== */
html {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* ========== Base ========== */
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-light);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-headings);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--section-pad);
  background-color: var(--color-light);
  color: var(--color-bg);
  border-radius: 12px;
}

/* ========== Images ========== */
img, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== Image Galleries ========== */
.featured-media,
.gallery-grid {
  display: grid;
  gap: var(--gap-md);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  padding: var(--pad-lg) 20px;
}

.media-card {
  background: var(--color-light);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.media-card:hover {
  transform: translateY(-4px);
}
.media-card .info {
  padding: 16px;
  color: var(--color-bg);
  font-weight: 600;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.gallery-grid img,
.media-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  max-height: 280px;
  transition: transform 0.2s ease-in-out;
}
.gallery-grid img:hover {
  transform: scale(1.03);
}

.contact-section {
  background-color: var(--color-light);
  color: var(--color-bg);
  padding: var(--pad-lg) 20px;
}

.form-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* ========== Video Embed ========== */
.video-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.video-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.video-inner iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ========== Lightbox ========== */
#lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* ========== Mobile Optimization ========== */
@media (max-width: 768px) {
  .gallery-grid,
  .featured-media {
    grid-template-columns: 1fr;
    padding: var(--pad-sm);
  }

  .gallery-grid img,
  .media-card img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
  }

  .container {
    padding: var(--pad-sm);
    overflow-x: hidden;
  }
}
