/* =====  MAIN STYLE (Base) ======= */

/* 🎨 Variables (colors & backgrounds) */
:root {
  --text-main: #4a4a4a;     /* Main text */
  --text-p: #5b5b5b;        /* Paragraph text */
  --text-link: #543e3e;     /* Links color */
  --text-hover: #2c56d0;    /* Hover color */
  --text-soft: #636363;     /* Soft gray */
  --text-mid: #5e5e5e;      /* Medium gray */
  --text-dark: #444;        /* Dark gray */
  --text-muted: #766e6e;    /* Muted gray */
  --bg-light: #ffffff;      /* General background */
  --bg-section: #e8f0ec;    /* Section background */
  --border-light: #ddd;     /* Light borders */
}

/* 🔄 Reset base elements */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  line-height: 1.6;
  background: var(--bg-light);  /* Default background */
  color: var(--text-main);      /* Default text color */
  display: flex;                /* To stick footer at bottom */
  flex-direction: column;
}

h1, h2, h3, p { margin: 0 0 .5rem; }

p {
  margin: 0.5rem 0;
  color: var(--text-p);   /* Paragraph color */
}

/* 📐 Containers */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.section { padding: 3rem 0; }

/* Grid with 3 columns */
.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

/* =======CARDS========== */
.card {
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.card.gallery { background: rgba(255,255,255,0.74); }



/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn--primary { background: var(--text-link); color: var(--bg-light); }
.btn--primary:hover { background: var(--text-hover); }
.btn--ghost { border: 1px solid var(--border-light); color: var(--text-main); }
.btn--ghost:hover { border-color: var(--text-hover); color: var(--text-hover); }

/* 🦶 To push footer to bottom */
main { flex: 1; }



/* ===== HEADER ===== */
.site-header {
  margin-top: 40px;

  background-color: var(--bg-section); /* Light background for header */
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 580px; /* Large space between logo and nav */
}

/* Logo */
.logo-wrapper { 
  display: flex; 
  align-items: center; 
  gap: 10px;  /* Reduced space between logo image and text */
}

.logo-wrapper a { 
  text-decoration: none; 
  color: inherit; 
}

.logo-wrapper img { 
  height: 80px;        /* Changed from 70px → smaller */
  display: block; 
}

.logo-wrapper h2 {
  margin: 0; 
  font-size: 1.4rem;   /* Changed from 2rem → smaller */
  font-weight: bold; 
  color: var(--text-main);
}

.logo-link img {
  animation: spin-hold 24s infinite;
}

@keyframes spin-hold {
  0%, 10%   { transform: rotate(0deg); }
  20%, 30%  { transform: rotate(90deg); }
  40%, 50%  { transform: rotate(180deg); }
  60%, 70%  { transform: rotate(270deg); }
  80%, 100% { transform: rotate(360deg); }
}

#header { min-height: 120px; }  /* قدّر حسب ارتفاع الهيدر */
#footer { min-height: 200px; }  /* قدّر حسب ارتفاع الفوتر */




/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 60px; list-style: none;
  margin: 0; padding: 0;
    z-index: 2;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-mid);    /* Medium gray */
  font-weight: 500;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text-hover); }

/* 📂 Dropdown menu */
.dropdown { position: relative; list-style: none; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--bg-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 10px 0; margin: 0; min-width: 180px; z-index: 1000;

  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-menu li a {
  display: block; padding: 10px 15px;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.dropdown-menu li a:hover {
  background: var(--text-hover);
  color: var(--bg-light);
}



/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-section);  /* Light background */
  text-align: center;
  padding: 50px 20px;
  font-family: Arial, sans-serif;
  border-top: 1px solid var(--border-light);
}
.site-footer p {
  max-width: 600px;
  margin: 0 auto 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-p);
}
.site-footer img {
  height: 90px;
  margin: 20px auto;
  display: block;
}
.site-footer .copyright {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 15px;
}





/* ===== HERO SECTION ===== */
.hero.section { 
  padding: 0; 
}

.hero-grid-vertical {
  display: flex; 
  flex-direction: column; 
  align-items: center;
  text-align: center; 
  gap: 1.5rem; /* Adds spacing between media and text */
}

.hero-media { 
  width: 100%; 
  display: flex; 
  flex-direction: column;   /* ✅ Ensures image/video is above text */
  justify-content: center; 
  align-items: center;
  margin-top: 80px;
}

.hero-media video,
.hero-media img {
  width: 100%; 
  max-width: 1000px; 
  height: auto;       
  border: none; 
  display: block;
  border-radius: 8px; /* Rounded corners for media */

    aspect-ratio: 16 / 9;  /* ✅ يحجز مكان بنسبة صحيحة */
}

/* Text under image/video */
.hero-media a {
  display: flex;
  flex-direction: column;   /* ✅ Keeps label under image */
  align-items: center;
  text-align: center;
  color: var(--text-mid);        
  font-size: 14px;    
  font-weight: 600;   
  margin-top: 10px;    
  text-decoration: none; 
  gap: 0.5rem;
}

.hero-media a:hover {
  color: var(--text-hover);  
}

/* Hero text content */
.hero-content h1 { 
  font-size: 2rem; 
  font-weight: bold; 
  color: var(--text-main); 
  margin-top: 1rem;   
}

.hero-content p { 
  font-size: 1rem; 
  color: var(--text-p); 
  max-width: 700px; 
  margin: 0.5rem auto; 
}

.hero-media iframe {
  width: 100%; 
  max-width: 1000px; 
  height: 720px;     
  border: none; 
  display: block;
  margin-top: 20px;  /* Consistent spacing */
}

/* Button link inside hero */
.btn-link {
  display: inline-block;
  padding: 12px 24px;
  background: #2c56d0;   /* Button background */
  color: #fff;           /* Button text color */
  font-size: 16px;
  font-weight: 600;
  text-decoration: none; /* Remove underline */
  border-radius: 8px;    /* Rounded corners */
  transition: background 0.3s ease, transform 0.2s ease;
  margin-top: 1rem;
}

/* Small clean button for "See More 3D Viewer Works" */
.btn-link.small {
  display: inline-block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-section);
  color: rgb(100, 100, 100);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-link.small:hover {
  background:--bg-section;
  transform: translateY(-1px);
   color: rgb(0, 0, 0);
}


/* ===== GALLERY SECTION ===== */
.section.gallery { 
  background: var(--bg-section); 
  padding: 100px 0; 
  margin-top: 60px; 
}
.section.gallery .container.gallery {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px;
}
.section.gallery .card.gallery { 
  overflow: hidden; 
  text-align: center; 
}
.section.gallery .card.gallery .img-wrap { 
  position: relative; 
  overflow: hidden; 
}
.section.gallery .card.gallery .img-wrap img {
  width: 100%; 
  height: 200px; 
  object-fit: cover;
  transition: transform .4s ease, filter .4s ease;
}
.section.gallery .card.gallery .img-wrap:hover img {
  transform: scale(1.07); 
  filter: brightness(1.6); /* Hover zoom + brightness */
}
.section.gallery .card.gallery h3 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.5rem; 
  font-weight: 600; 
  color: var(--text-muted);
}

/* ===== MOSAIC (Image Grid) ===== */
.section.mosaic { 
  margin: 70px 0 50px; 
  color: var(--text-soft); 
}
.mosaic-head {
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 2rem; 
  margin-bottom: 1rem;
}
.mosaic-head small { 
  margin-left: auto; 
  color: var(--text-dark); 
}

.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 120px;
  grid-auto-flow: dense;
  gap: 10px;
}

.tile {
  position: relative; 
  margin: 0; 
  overflow: hidden;
  border-radius: 8px; 
  background: var(--bg-section);
  cursor: pointer;
  border: 1px solid #c8c7c7;
}
.tile img {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease, opacity 0.5s ease;
   aspect-ratio: 1 / 1; /* أو حسب صورك (wide=2/1, tall=1/2) */
}
.tile::after {
  content: ""; 
  position: absolute; 
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0; 
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.tile:hover img { 
  transform: scale(1.05); 
  filter: brightness(1.1); 
}
.tile:hover::after { opacity: 1; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.big  { grid-column: span 2; grid-row: span 2; }

/* ===== MODAL (Lightbox Popup) ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.88);
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
}

.modal-content {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
}

.modal .close {
  align-self: center;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-dark);
}

body.modal-open {
  overflow: hidden; /* Prevent background scroll when modal is open */
}


/* ===== FILM PAGE (Video Section) ===== */
.exterior-hero img {
  width: 100%; 
  max-height: 400px; 
  object-fit: cover;   /* Keeps proportions without distortion */
  border-radius: 8px;  /* Rounded edges */
  display: block; 
  margin: 0 auto;      /* Center image */
}

.ex-grid-2 {
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
  gap: 20px; 
  margin-top: 40px; 
  justify-content: center;
}

.video-card {
  max-width: 400px; 
  margin: 0 auto; 
  text-align: center;
  transition: transform 0.3s ease; /* Smooth hover lift */
}
.video-card:hover { transform: translateY(-6px); }

.video-card figure { 
  aspect-ratio: 4/3; 
  overflow: hidden; 
  margin: 0; 
  border-radius: 8px; 
}
.video-card video {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
  cursor: pointer;
  transition: filter 0.3s ease, transform 0.3s ease;
}
.video-card video:hover { 
  filter: brightness(1.2); 
  transform: scale(1.02); /* Zoom effect */
}
.video-card p {
  margin: 12px 0 0; 
  font-size: 1.1rem; 
  font-weight: 500; 
  color: var(--text-main);
}



/* ===== EXTERIOR PAGE (Gallery & Text) ===== */
.exterior-hero img {
  width: 100%; 
  height: 250px; 
  object-fit: cover; /* Keeps focus area of image */
  display: block; 
  margin: 0 auto; 
  border-radius: 0;
}

.exterior-box {
  background: var(--bg-section); 
  padding: 36px 28px;
  text-align: center; 
  border-radius: 0;
}
.exterior-box h2 { 
  font-size: 2.2rem; 
  margin: 0 0 12px; 
  color: var(--text-main); 
}
.exterior-box p { 
  margin: 30px auto; 
  max-width: 720px; 
  line-height: 1.7; 
  color: var(--text-p); 
}

.exterior-gallery { 
  background: transparent; 
  padding: 40px 0; 
}
.exterior-gallery .container {
  background: var(--bg-section); 
  padding: 28px; 
  max-width: 1090px;
}
.exterior-gallery h3 {
  text-align: center;   /* Centered title */
  margin-bottom: 12px;  /* Small spacing */
}

.exterior-gallery p {
  text-align: center;   /* Centered paragraph */
  max-width: 700px;     /* Keeps readable width */
  margin: 0 auto 15px;  /* Center with spacing bottom */
  line-height: 1.6;
}

.ex-grid-2 figure {
  position: relative; 
  margin: 0; 
  overflow: hidden;
  aspect-ratio: 4 / 3;  /* Consistent thumbnail ratio */
  cursor: pointer;
}
.ex-grid-2 img {
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.ex-grid-2 figure::after {
  content: ""; 
  position: absolute; 
  inset: 0;
  background: rgba(0, 0, 0, 0.3); 
  opacity: 0;
  transition: opacity 0.4s ease; 
  pointer-events: none;
}
.ex-grid-2 figure:hover img { 
  transform: scale(1.05); 
  filter: brightness(1.1); 
}
.ex-grid-2 figure:hover::after { opacity: 1; }

.ex-more {
  text-align: center; 
  margin: 60px 0 0; 
  font-size: 1.5rem; 
  color: var(--text-soft);
}
.ex-more a { 
  font-weight: 600; 
  text-decoration: underline; 
  color: var(--text-link); 
}
.ex-more img { 
  height: 70px; 
  vertical-align: middle; 
  margin: 0 6px; 
}

.hero-grid-vertical {
  border: 1px solid rgb(255, 255, 255); /* لون متناسق */
  border-radius: 5px;                   /* زوايا ناعمة */
  margin-top: 20px;
             
 
}

.exterior-gallery h1 {
  text-align: center;     /* يوسّط العنوان */
  font-size: 2rem;        /* حجم مناسب */
  margin-bottom: 1.5rem;  /* مسافة تحت العنوان */
  color: var(--text-main);
}



/* -------📱 Mobile responsive---------- */
@media (max-width: 739px) {

  /* Logo wrapper adjustments */
  .logo-wrapper {
    margin-top: 20px; /* Push down a little on mobile */
  }

  /* Navigation menu - centered, smaller gaps */
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center; /* Centered menu */
    gap: 40px;               /* Reduced gap for small screens */
    list-style: none;
    padding: 0;
  }
  .nav-links > * {
    display: inline-block;
  }

  .nav-links a {
 padding-bottom: 12px; /* مسافة تحت النص */
  display: inline-block; /* يخلي padding يشتغل */
}


  /* Section padding reduced */
  .section { 
    padding: 1.5rem 0; 
  }



.section:first-of-type {
  margin-top: 80px;
}



  /* Hero iframe responsive height */
  .hero-media iframe {
    width: 100% !important;
    height: 80vh !important; /* Half of viewport height */
    margin-top: 20px;
    padding: 0 !important;
    display: block !important;
  }

  .hero-media {
    margin-top: 50px;
    padding: 0 !important;
  }

  .hero-grid-vertical {
    gap: 0.1rem;          /* Smaller vertical spacing */
    padding: 0 10px;      /* Side padding */
  }
  
  /* Stack logo + nav vertically */
  .nav-center {
    flex-direction: column;
    gap: 20px;
  }

  /* Gallery: single column */
  .section.gallery .container.gallery {
    grid-template-columns: 1fr;
  }

  /* Mosaic: 2 columns instead of 6 */
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Exterior gallery grid becomes single column */
  .ex-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Headings smaller */
  h1, .hero-content h1 { font-size: 1rem !important; }
  h2, .hero-content h2 { font-size: 1.1rem !important; }
  h3, .hero-content h3 { font-size: 1rem !important; }

  /* Paragraphs smaller */
  p, .site-footer p, .hero-content p, .exterior-box p {
    font-size: 0.9rem !important;
    line-height: 1.5;
  }

  /* Gallery titles smaller */
  .section.gallery .card.gallery h3 {
    font-size: 1rem !important;
  }

  /* Footer text smaller */
  .site-footer .copyright {
    font-size: 0.75rem !important;
  }

  /* ===== Gallery tweaks ===== */
  .section.gallery .container.gallery {
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    gap: 15px;
  }
  .section.gallery {
    padding: 40px 10px; /* Smaller horizontal padding */
    margin-top: 20px;
  }
  .section.gallery .card.gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
  }
  .section.gallery .card.gallery .img-wrap {
    width: 100%;
    height: 160px;   /* Fixed height for uniform cards */
    overflow: hidden;
    border-radius: 6px;
  }
  .section.gallery .card.gallery .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .section.gallery .card.gallery h3 {
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
  }

  /* ===== Mosaic tweaks ===== */
  .section.mosaic {
    margin: 10px 0;
    padding: 10px;
  }
  .mosaic-head {
    flex-direction: column;
    gap: 0.1rem;
    text-align: center;
  }
  .mosaic-head h2 { margin: 0 0 1px; }
  .mosaic-head small {
    margin: 0;
    font-size: 0.85rem;
  }
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 80px; /* Shorter rows */
    gap: 6px;
  }
  .tile.wide,
  .tile.big { grid-column: span 2; }
  .tile.tall,
  .tile.big { grid-row: span 1; }

  .mosaic-grid img {
    opacity: 1;
    transition: opacity 0.5s ease;
  }

  /* ===== Footer tweaks ===== */
  .site-footer {
    padding: 15px 15px;
  }
  .site-footer p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
  }
  .site-footer img {
    height: 60px;
    margin: 15px auto;
  }
  .site-footer .copyright {
    font-size: 0.75rem;
    margin-top: 10px;
  }

  /* ===== Exterior tweaks ===== */
  .exterior-hero img {
    height: 100px;
    border-radius: 0;
    margin-top: 20px;
  }
  .exterior-box {
    padding: 20px 15px;
  }
  .exterior-box h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  .exterior-box p {
    margin: 4px 0;
    line-height: 1.4;     
  }
  .exterior-gallery {
    padding: 20px 0;
  }
  .exterior-gallery .container {
    padding: 5px;
  }
  .ex-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ex-more {
    margin: 30px 0 0;
    font-size: 1rem;
  }
  .ex-more img {
    height: 40px;
    margin: 0 4px;
  }

  /* ===== Car Viewer tweaks ===== */
  .hero-content {
    text-align: center;
  }
  .hero-media img {
    width: 100%;
  }
  .hero-content h1 {
    font-size: 1.3rem;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
  }
  .hero-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 12px;
  }
  .hero-media a {
    display: inline-block;
    text-align: center;
    color: var(--text-mid);
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    text-decoration: none;
  }
  .hero-media a:hover {
    color: var(--text-main);
  }

  /* Exterior grid override: 2 columns */
  .ex-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .ex-grid-2 img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
  }

} /* end media query */




/* ===== Header fix for tablets (<= 900px) ===== */
@media (max-width: 900px) {
  .nav-center {
  gap: clamp(16px, 12vw, 580px);             /* بدل 580px */
    justify-content: space-between;
    padding: 0 12px;
    flex-wrap: wrap;           /* يسمح بالنزول للسطر عند الحاجة */
  }



  .nav-links { gap: 24px; }
  .nav-links a { font-size: 1rem; }
}

/* اختيارياً: شدّ أكثر للدقات القريبة من 740px */
@media (max-width: 780px) {
  .nav-links { gap: 16px; }
}
