/* =========================================
   MANZIL HOMES - LUXURY INTERIORS WEBSITE
   Author: ChatGPT | 2025
   ========================================= */

/* ---------- Global Styles ---------- */
:root {
  --primary-color: #1a2bc3;        /* Royal Blue */
  --secondary-color: #0f1335;      /* Midnight Navy */
  --accent-color: #97b4de;         /* Soft Blue */
  --bg-dark: #2a2829;              /* Carbon Grey */
  --text-light: #eaeff5;           /* Ice Blue */
  --font-display: 'Marcellus', Georgia, serif;   /* h1 / hero headlines on images */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-body);
  font-weight: 300; /* Light weight for a modern, architectural feel */
  background-color: #fff;
  color: var(--secondary-color);
  overflow-x: hidden;
}

/* ---------- Preloader Animation ---------- */
/* ---------- Scroll Lock During Preloader ---------- */
body.preloader-active {
  overflow: hidden;
  height: 100vh;
  touch-action: none; /* mobile scroll lock */
}

#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--text-light); /* Clean Ice Blue background */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content { text-align: center; animation: fadeIn 1.5s ease-in-out; }

.loader-logo {
  width: 350px;
  opacity: 0;
  animation: logoFade 3s ease forwards,rotateOnce 3s ease forwards, shimmer 4s infinite linear;
}

.loader-text {
  margin-top: 20px;
  color: var(--secondary-color); /* Midnight Navy for contrast on light bg */
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 2px;
  opacity: 0;
  animation: textFade 3s ease 1.5s forwards;
}

@keyframes logoFade {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.05) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes rotateOnce {
  0% { transform: rotate(0deg) scale(0.8); }
  50% { transform: rotate(360deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes textFade { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Preloader shimmer effect updated for bluebg */
@keyframes shimmer {
  0% { filter: brightness(1) contrast(1); }
  50% { filter: brightness(1.2) contrast(1.1); }
  100% { filter: brightness(1) contrast(1); }
}


/* Hide preloader smoothly */
body.loaded #preloader {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

/* Marcellus has a single weight; override Bootstrap's .fw-bold to avoid faux bold */
h1, h1.fw-bold {
  font-family: var(--font-display);
  font-weight: 400 !important;
}

a { text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary-color); }

/* ---------- Navbar (UNCHANGED LOOK, with mobile fixes) ---------- */
.navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navbar-brand img {
  height: 55px;
  transition: transform 0.3s ease;
}
.navbar-brand img:hover { transform: scale(1.05); }

.nav-link {
  color: #fff; /* White links on transparent navbar */
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 10px;
  transition: color 0.3s ease;
}
.navbar.scrolled .nav-link { color: var(--secondary-color) !important; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }

/* MOBILE VISIBILITY FIXES */
.navbar .navbar-toggler { border-color: rgba(255,255,255,0.5); }
.navbar .navbar-toggler:focus { box-shadow: none; }

/* white hamburger at top on transparent */
.navbar .navbar-toggler-icon {
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
/* dark hamburger after scroll (white bg) */
.navbar.scrolled .navbar-toggler { border-color: rgba(0,0,0,0.25); }
.navbar.scrolled .navbar-toggler-icon {
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* when mobile menu is open, show white panel + dark links */
@media (max-width: 991.98px) {
  .navbar .collapse.show {
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }
  .navbar .collapse.show .nav-link {
    color: var(--secondary-color) !important;
  }
  .navbar .collapse.show .nav-link:hover,
  .navbar .collapse.show .nav-link.active {
    color: var(--primary-color) !important;
  }
}

/* ---------- Hero Section (Home) ---------- */
.hero-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  color: #fff;
}

.bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(60%);
}

.overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(18, 18, 18, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  animation: fadeInUp 1.5s ease-in-out 0.3s both;
}

.hero-logo { width: 200px; max-width: 80%; }

.hero-section h1 {
  font-size: 3rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero-section p { font-size: 1.1rem; margin-bottom: 2rem; }

.btn-light {
  background-color: var(--secondary-color); /* Midnight Navy for a luxury feel */
  border: none;
  color: #fff;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 12px 30px;
  transition: all 0.3s ease;
}
.btn-light:hover { 
  background-color: var(--primary-color); 
  color: #fff;
  transform: translateY(-3px); 
  box-shadow: 0 4px 15px rgba(26, 43, 195, 0.2);
}
/* Keep text white when tapped/focused/disabled (Bootstrap defaults it to dark) */
.btn-light:focus,
.btn-light:focus-visible,
.btn-light:active,
.btn-light.active,
.btn-light:disabled {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

/* ---------- Shared spacing helpers ---------- */
.section-padding { padding: 80px 0; }

/* ---------- Sections ---------- */
.about-preview { background: #fff; text-align: center; }
.about-preview h2 { color: var(--secondary-color); }

.services .col-md-3 img {
  filter: grayscale(40%);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.services .col-md-3:hover img { filter: none; transform: scale(1.1); }

.projects-preview img { transition: transform 0.4s ease; }
.projects-preview img:hover { transform: scale(1.05); }

/* ---------- Contact Page ---------- */
.contact-hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--secondary-color); /* photos come from the hero carousel */
}

.contact-form .form-control {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(0,0,0,0.08);
}
.contact-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(191,163,122,0.15);
}
.contact-form .btn.btn-light {
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  letter-spacing: 0.6px;
}

/* ---------- CEO image inside ratio: always show ---------- */
.ratio img,
.ratio > img,
.ratio .img,
.ratio .img-fluid {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  opacity: 1;
  visibility: visible;
  /* fallback background while loading */
  background: #eaeaea;
}

/* Equal-height project cards */
.project-card {
  height: 100%;
}

.project-img {
  width: 100%;
  aspect-ratio: 4 / 3; /* change to 16/9 if needed */
  overflow: hidden;
  border-radius: 1rem;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* key line */
  display: block;
}

/* ---------- Footer ---------- */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.9rem;
  letter-spacing: 0.3px;
}

/* ---------- Scroll Animations ---------- */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .section-padding { padding: 64px 0; }
  .contact-hero { min-height: 56vh; }
}

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2.2rem; }
  .hero-logo { width: 150px; }
  .btn-light { font-size: 0.9rem; padding: 10px 25px; }

  /* remove global mobile override that made top links dark over dark hero */
  /* keep link colors driven by state (.scrolled or .collapse.show) */
  /* (no .nav-link color override here) */

  .section-padding { padding: 56px 0; }
}

/* ---------- Services Hero Carousel ---------- */
.services-hero {
  min-height: 70vh;
}

.services-hero .carousel,
.services-hero .carousel-inner,
.services-hero .carousel-item,
.services-hero img {
  height: 100%;
}

.object-fit-cover {
  object-fit: cover;
}

/* ---------- Footer Links ---------- */
.footer-link {
  color: #bdbdbd;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color); /* Updated to Blue */
}

/* Footer text visibility fix */
footer p,
footer li,
footer small {
  color: #d1d1d1;
}

footer .text-muted {
  color: #d1d1d1 !important;
}

footer h6 {
  color: #ffffff;
}

footer a {
  color: #d1d1d1;
}

footer a:hover {
  color: var(--primary-color); /* Updated to Blue */
}


/* ---------- Areas we serve (home) ---------- */
.areas-served { background: var(--text-light); }
.areas-served h2 { color: var(--secondary-color); text-wrap: balance; }
.areas-intro { max-width: 760px; }
.areas-list li {
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 19, 53, 0.12);
  font-size: 0.9rem;
  color: var(--secondary-color);
}

/* ---------- Footer service areas line ---------- */
.footer-areas { color: #9a9a9a !important; font-size: 0.8rem; max-width: 820px; margin: 0 auto; }

/* ---------- Page heroes with photo backgrounds ---------- */
.projects-hero,
.studio-hero {
  height: 70vh;
  min-height: 420px;
  background: center / cover no-repeat;
}
.projects-hero { background-image: url('../images/architecture.jpg'); }
.studio-hero { background-image: url('../images/contact/contact2.jpg'); }
.projects-hero .overlay,
.studio-hero .overlay { background: rgba(15, 19, 53, 0.55); }
