/*
 * Global styles for Sakinah Studios website
 *
 * Colour palette:
 *   --primary: #760456 (rich maroon accent)
 *   --cream:   #fffaf5 (soft cream background)
 *   --accent:  #d3a577 (warm beige accent for calls to action)
 *   --text-dark: #35233b (dark plum for primary text)
 *   --text-light: #ffffff (light text on dark backgrounds)
 */

:root {
  --primary: #760456;
  --cream: #fffaf5;
  --accent: #d3a577;
  --text-dark: #35233b;
  --text-light: #ffffff;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
}

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

/* Container for consistent width */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header & navigation */
header {
  background-color: var(--primary);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

nav .logo img {
  /* Trimmed logo has less whitespace; height stays modest while lettering appears larger */
  height: 48px;
  width: auto;
}

nav .nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

nav .nav-links li a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease-in-out;
}

nav .nav-links li a:hover {
  opacity: 0.75;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.75rem;
  cursor: pointer;
}

/* Hero section */
.hero {
  padding: 8rem 0 6rem;
  /* Use uploaded texture as a backdrop with a light golden overlay.  A lower opacity lets
     the beige and gold tones of the image show through while still maintaining legibility. */
  background-image: linear-gradient(rgba(211, 165, 119, 0.3), rgba(211, 165, 119, 0.3)), url('textures.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-family: 'Ubuntu', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
}

.hero h2 {
  margin-top: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f5eaf7;
}

.hero p {
  margin-top: 1rem;
  font-size: 1rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

/* Section headings */
section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
  text-align: center;
}

section .subtitle {
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  color: var(--primary);
  font-style: italic;
}

/* Offer cards */
.offer {
  padding: 4rem 0;
}

.offer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.offer-card {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.offer-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

/* Impress section */
.impress {
  padding: 3rem 0;
  text-align: center;
}

.impress p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Templates section */
.templates {
  padding: 4rem 0;
}

.editable-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
}

.editable-info > div {
  flex: 1 1 280px;
  background-color: #f9f4f8;
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 4px;
}

.editable-info h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.editable-info ul {
  list-style: disc inside;
  margin: 0;
  padding: 0;
}

/* Premium & Luxury sections */
.premium, .luxury {
  padding: 4rem 0;
}

.premium p, .luxury p {
  max-width: 900px;
  margin: 0 auto 1rem;
}

/* Order section */
.order {
  padding: 4rem 0;
}

.order ol {
  max-width: 800px;
  margin: 0 auto;
  padding-left: 1.2rem;
  font-size: 1rem;
}

.order ol li {
  margin-bottom: 0.75rem;
}

/* Benefits list */
.why {
  padding: 4rem 0;
}

.why .benefits {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 1.2rem;
  list-style: disc inside;
  font-size: 1rem;
}

.reviews {
  padding: 4rem 0;
  background-color: #f9f4f8;
}

.review-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1000px;
  margin: 0 auto;
}

.review-card {
  background-color: var(--cream);
  border: 1px solid #e8dceb;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.review-card p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.review-author {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
}

/* Products grid */
.products {
  padding: 4rem 0;
}

.product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-card {
  background-color: #f9f4f8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-card h3 {
  margin: 1rem;
  font-size: 1.2rem;
  color: var(--primary);
}

.product-card p {
  margin: 0 1rem 1rem;
  flex-grow: 1;
  font-size: 0.95rem;
}

.btn-small {
  display: inline-block;
  margin: 0 1rem 1.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

.btn-small:hover {
  background-color: #c69667;
}

/* Contact section */
.contact {
  padding: 4rem 0;
  text-align: center;
}

.contact p {
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-icon {
  width: 44px;
  height: 44px;
  fill: var(--primary);
  transition: transform 0.2s ease-in-out;
}

.social-links a:hover .social-icon {
  transform: scale(1.1);
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Statement banner (inspiration image) */
.statement-banner {
  position: relative;
  /* Lighten the overlay on the stage image so the original golden tones remain visible */
  background-image: linear-gradient(rgba(118, 4, 86, 0.25), rgba(118, 4, 86, 0.25)), url('banner1.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 6rem 0;
  text-align: left;
}

.statement-banner .statement-content {
  max-width: 900px;
}

.statement-banner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.statement-banner p {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0;
  max-width: 600px;
}

/* Responsive behaviour */
@media (max-width: 768px) {
  nav .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    display: none;
  }
  nav .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .hero {
    padding: 7rem 0 5rem;
  }
  .editable-info {
    gap: 1rem;
  }
  .offer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .product-card img {
    height: 140px;
  }
}

/* Modal styles for product details */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: var(--cream);
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-content img {
  width: 100%;
  /* Limit height to ensure the description and price remain visible without scrolling */
  max-height: 360px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.modal-content h3 {
  margin-top: 0;
  font-family: 'Playfair Display', serif;
  color: var(--primary);
}

.modal-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-dark);
}

.modal-content .close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  cursor: pointer;
}

.modal-content .price {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

/* Fade-in animation for headers and text */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility class to apply fade-in animation */
.fade-in {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

/* Video galleries inside modals */
.video-gallery {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-gallery video {
  width: 100%;
  height: auto;
  /* Limit maximum height so that multiple videos can fit within the modal
     while preserving the original aspect ratio.  Using object-fit: contain
     prevents the video from being zoomed or cropped. */
  max-height: 200px;
  border-radius: 4px;
  object-fit: contain;
  background-color: #000;
}
/* Full-bleed, no-crop banner — breaks out of any centered container */
.statement-banner{
  position: relative;

  /* break out to viewport width */
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;

  /* show whole image */
  background-image: url('banner3.jpg');
  background-size: contain;         /* no cropping */
  background-repeat: no-repeat;
  background-position: center;
  background-color: #fffaf5;

  /* responsive height similar to hero */
  min-height: clamp(260px, 45vh, 540px);
  padding: 0;
  border: 0;
}

/* if any leftover text container exists, hide it */
.statement-banner .statement-content{ display:none !important; }

/* avoid horizontal scroll caused by the full-bleed breakout */
html, body { overflow-x: hidden; }

@media (max-width: 768px){
  .statement-banner{ min-height: clamp(220px, 55vh, 600px); }
}
/* Prevent any horizontal scroll when we break out of centered layouts */
html, body { overflow-x: hidden; }

/* Full-bleed section that ignores parent .container widths */
.statement-banner{
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding: 0;
  border: 0;
  background: #fffaf5; /* cream behind the image if it letterboxes on tall screens */
}

/* Make the image itself span the full viewport width with no cropping */
.statement-banner .banner-img{
  display: block;
  width: 100vw;     /* full viewport width */
  height: auto;     /* keep aspect ratio */
  object-fit: contain; /* just in case a height is ever set somewhere */
  margin: 0;
}

/* If any legacy overlay/text still exists, hide it defensively */
.statement-banner .statement-content{ display: none !important; }
/* Prevent horizontal scroll from full-bleed tricks */
html, body { overflow-x: hidden; }

/* ===== Desktop / tablets (>=769px) ===== */
@media (min-width: 769px){
  /* Full-bleed section that breaks out of any centered container */
  .statement-banner{
    position: relative;
    left: 50%; right: 50%;
    margin-left: -50vw; margin-right: -50vw;
    width: 100vw;
    padding: 0; border: 0;
    background: #fffaf5;
    /* give the section a sensible height on desktop */
    min-height: clamp(360px, 55vh, 580px);
  }

  .statement-banner .banner-img{
    display: block;
    width: 100vw;
    height: 100%;                 /* fill the banner height */
    object-fit: cover;            /* no side bars on desktop */
    object-position: right center;/* keep your “Sakinah Studios” text visible */
  }
}

/* ===== Mobile (<=768px) ===== */
@media (max-width: 768px){
  /* On mobile: DO NOT force a tall section – let the image define the height */
  .statement-banner{
    /* stop breaking out of the layout on phones */
    left: auto; right: auto;
    margin-left: 0; margin-right: 0;
    width: 100%;
    padding: 0; border: 0;
    background: #fffaf5;

    /* REMOVE any fixed/min height so there’s no blank cream block */
    min-height: unset; height: auto;
  }

  .statement-banner .banner-img{
    display: block;
    width: 100%;
    height: auto;                 /* image controls height */
    object-fit: contain;          /* show the whole image on phones */
    object-position: center;
  }
}

/* Defensive: if any legacy overlay/text was left inside, hide it */
.statement-banner .statement-content{ display: none !important; }
/* —— Make the second HERO banner text the same purple as the top header —— */

/* If the second banner is the next .hero after the first */
.hero + .hero,
.hero + .hero h1,
.hero + .hero h2,
.hero + .hero p,
.hero + .hero a,
.hero + .hero .subtitle,
.hero + .hero li,
.hero + .hero small,
.hero + .hero strong,
.hero + .hero em {
  color: var(--primary) !important;
}

/* Fallback: if they aren’t adjacent, target the second .hero in the DOM */
.hero:nth-of-type(2),
.hero:nth-of-type(2) h1,
.hero:nth-of-type(2) h2,
.hero:nth-of-type(2) p,
.hero:nth-of-type(2) a,
.hero:nth-of-type(2) .subtitle,
.hero:nth-of-type(2) li,
.hero:nth-of-type(2) small,
.hero:nth-of-type(2) strong,
.hero:nth-of-type(2) em {
  color: var(--primary) !important;
}

