:root {
  /* Navigation */
  --nav-bg-color: #ffffff;
  --nav-text-color: #555;
  --nav-height: 60px;
  --logo-height: calc(0.6 * var(--nav-height));
  --transition-speed: 0.3s;
  
  /* Colors */
  --color-primary: #000;
  --color-text: #555;
  --color-text-light: #888;
  --color-text-muted: #aaa;
  --color-background: #fff;
  --color-background-alt: #f9f9f9;
  --color-footer-bg: #0a0a0a;
  --color-footer-text: #f4f4f4;
  
  /* Spacing */
  --section-padding: 60px;
  --container-max-width: 1100px;
  
  /* Shadows */
  --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.15);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Jost', sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  /* Fallback for older browsers */
  min-height: 100vh;
  /* Modern viewport units fix Safari/iOS */
  min-height: 100dvh;
  /* JavaScript-set custom property fallback (most reliable for Safari) */
  min-height: calc(var(--vh, 1vh) * 100);
  padding-top: var(--nav-height);
}

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: var(--nav-bg-color);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.nav-left,
.nav-right {
  flex: 1; /* Both sides take equal available space */
}

.nav-left ul,
.nav-right ul {
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-left ul {
  justify-content: flex-end;
  padding-right: 6rem; /* Increased spacing from center logo */
  gap: 4rem; /* Spacing between links */
}

.nav-right ul {
  justify-content: flex-start;
  padding-left: 6rem; /* Increased spacing from center logo */
  gap: 4rem; /* Spacing between links */
}

#navbar a,
.mobile-menu a,
.social-links-bottom a,
.footer-section.get-in-touch a,
.footer-bottom,
.location-text {
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

#navbar a {
  text-decoration: none;
  color: var(--nav-text-color);
  padding: 0.5rem;
  transition: color var(--transition-speed);
}

#navbar a:hover {
  color: #ccc;
}

.logo {
  flex: none;
  text-align: center;
  color: var(--color-primary);
}

.logo .logo-img {
  height: var(--logo-height);
  width: auto;
  vertical-align: middle;
  display: inline-block;
}

/* Hamburger icon (hidden by default) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 21px;
  height: 21px;
  position: absolute;
  right: 21px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.hamburger div {
  width: 100%;
  height: 1px;
  background-color: var(--nav-text-color);
  transition: transform var(--transition-speed), opacity var(--transition-speed);
  transform-origin: 50% 50%;
  position: relative;
}

.hamburger:focus {
  outline: none;
}

/* Cross animation styles */
.hamburger.open div:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open div:nth-child(2) {
  opacity: 0;
}

.hamburger.open div:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile mode: hide nav links, show hamburger */
@media (max-width: 1100px) {
  #navbar {
    justify-content: center;
  }

  .nav-left,
  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* Mobile menu panel (collapsed by default) */
.mobile-menu {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  background-color: white;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-speed) ease-out;
}

.mobile-menu.open {
  max-height: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-menu ul {
  list-style: none;
  padding: 10px 0;
  text-align: center;
}

.mobile-menu li {
  padding: 10px 0;
}

.mobile-menu a {
  display: block;
  color: var(--nav-text-color);
  text-decoration: none;
}

.mobile-menu a:hover {
  color: #ccc;
}

/* --- Hero Section --- */
#hero {
  height: calc(100vh - var(--nav-height));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

@media (min-width: 768px) {
  #hero {
    /* Modern viewport units fix Safari/iPadOS address bar issue */
    height: calc(100dvh - var(--nav-height));
    /* JavaScript-set custom property fallback (most reliable for Safari) */
    height: calc(var(--vh, 1vh) * 100 - var(--nav-height));
  }
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Send behind content */
  display: block;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1; /* Above image, but inside .hero-bg container (which is -1) */
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
}

.hero-content {
  position: relative;
  z-index: 2; /* Ensure content is above overlay */
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-subheader {
  font-size: clamp(0.9rem, 1.5vw, 1.5rem);
  margin-bottom: 80px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #f0f0f0;
  line-height: 1.4;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.cta-button {
  display: inline-block;
  padding: 15px 30px;
  background-color: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.cta-button:hover {
  background-color: #eee;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- Generic Layout --- */
.section {
  padding: 60px 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Portfolio, Services, Contact Sections (White) --- */

#portfolio,
#contact {
  background-color: #fff;
  text-align: center;
}

#portfolio {
  position: relative;
  z-index: 2; /* Ensure it sits on top of hero */
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.15); /* Shadow casting upwards and downwards */
}

#contact {
  position: relative;
  z-index: 2;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

#portfolio h2 {
  font-size: 2.5rem;
  margin-bottom: 60px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#about h2,
#contact h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#portfolio p,
#contact p,
#about p {
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto 20px;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 Columns Default */
  gap: 20px;
  padding: 0 20px 20px 20px; /* Top padding 0 to align with header margin */
  margin-top: 0; /* Removed extra margin */
  grid-auto-flow: dense;
  width: 100%; /* Full viewport width */
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15); /* Increased opacity for visibility on images */
  cursor: pointer;
  aspect-ratio: 3 / 2; /* Fixed 3:2 aspect ratio for all images */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth lift effect */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25); /* Stronger hover shadow */
}

/* Tablet Fallback: 2 Columns */
@media (max-width: 1500px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Fallback: 1 Column */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Minimalistic Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.85); /* Slightly more transparent */
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none; /* Hidden state */
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 95vh;
  border-radius: 0;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 2001;
  transition: transform 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 24px;
  background-color: #fff;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  opacity: 0.7;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}
.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Sleek Arrows using CSS borders */
.lightbox-prev::after,
.lightbox-next::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.lightbox-prev::after {
  transform: rotate(135deg);
  margin-left: 8px; /* Optical centering */
}

.lightbox-next::after {
  transform: rotate(-45deg);
  margin-right: 8px; /* Optical centering */
}

/* --- About Section --- */
#about {
  background-color: #f9f9f9;
}

.about-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.about-image {
  flex: 1 1 300px;
  text-align: right;
  padding-top: 20px;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-text {
  flex: 1 1 300px;
  text-align: left;
}

#about .about-text p:last-of-type {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .about-image {
    text-align: center;
    flex: 0 0 auto;
    width: 100%;
    padding-top: 0;
  }
  
  .about-text {
    text-align: left;
    flex: 0 0 auto;
    width: 100%;
  }

  .about-text h2 {
    text-align: center;
  }
  
  /* Ensure the container behaves as a column if not already handled by flex-wrap */
  .about-content {
    flex-direction: column; 
    align-items: center;
    gap: 80px;
  }
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 60px 30px; /* Increased row-gap for overlapping avatars */
  margin-top: 80px;
}

.testimonial-card {
  background-color: #fff;
  padding: 30px; /* Restored/adjusted padding */
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  font-style: italic;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative; /* For absolute avatar positioning */
  overflow: visible; /* Allow avatar to extend outside */
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.testimonial-card p {
  font-size: 1rem;
  color: #555;
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.6;
}

.testimonial-card span {
  font-style: normal;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

.testimonial-footer {
  display: flex;
  width: 100%;
  justify-content: flex-end; /* Name aligns right */
  margin-top: auto;
  /* Avatar is absolute, so it ignores flex layout */
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff; /* Match card background for seamless look */
  position: absolute;
  top: -30px; /* Pull outside top edge */
  right: 20px; /* Position from right edge */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Social Proof (Publications & Clients) --- */
.social-proof {
  margin-top: 80px;
  text-align: center;
}

.proof-section {
  margin-bottom: 60px;
}

.proof-section:last-child {
  margin-bottom: 20px;
}

.proof-section h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #888;
  margin-bottom: 30px;
  font-weight: 500;
  text-align: center; /* Ensure centered alignment */
}

/* --- Shared Styles for Featured In & Selected Clients --- */
.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 60px 80px;
}

.logo-row img {
  width: 150px;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(0);
  opacity: 0.47; /* Creates #888 visual on white background */
}

/* --- Contact Form Styles --- */
.contact-form-container {
  width: 100%;
  margin: 40px auto 20px;
  text-align: left;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form .form-group {
  margin-bottom: 0; /* Let grid gap handle spacing */
}

/* Grid item placement */
/* Note: nth-child usage assumes DOM order:
   1: .honeypot (hidden)
   2: Name .form-group
   3: Email .form-group
   4: Subject .form-group
   5: Message .form-group
   6: Button
   Use nth-child carefully if DOM structure changes.
*/

.contact-form .form-group:nth-of-type(1) { /* Name */
  grid-column: span 1;
}
.contact-form .form-group:nth-of-type(2) { /* Email */
  grid-column: span 1;
}
.contact-form .form-group:nth-of-type(3) { /* Subject */
  grid-column: span 2;
}
.contact-form .form-group:nth-of-type(4) { /* Message */
  grid-column: span 2;
}
.submit-btn {
  grid-column: span 2;
  justify-self: start;
}

@media (max-width: 1100px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
  
  /* Use specific selectors to ensure we override the desktop :nth-child rules */
  .contact-form .form-group:nth-child(n),
  .submit-btn {
    grid-column: span 1;
  }
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  display: block;
  padding: 15px;
  font-size: 1.1rem;
  color: #555;
  font-family: 'Jost', sans-serif;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: #f9f9f9;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  background-color: #fff;
}

.contact-form textarea {
  resize: vertical;
}

.submit-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
  background-color: #333;
  transform: translateY(-2px);
}

/* --- Footer Styles --- */
#footer {
  background-color: #0a0a0a;
  color: #f4f4f4;
  padding: 0 20px;
  margin-top: auto;
  position: relative;
  z-index: 3;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 20px 80px;
}

/* --- Top Row: 4 Columns --- */
.footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  margin-bottom: 0;
  gap: 20px;
}

/* Col 1: Logo & Location */
.footer-logo {
  width: auto;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  height: 100%;
}

.footer-logo-svg {
  height: var(--logo-height);
  width: auto;
  color: #aaa;
  display: block;
  transition: all 0.3s ease;
}

.footer-logo-svg:hover {
  color: #fff;
}

/* Col 2: Nav Links */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-self: center;
  text-align: left;
  align-items: flex-start;
}

.footer-nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #fff;
}

/* Col 3: Modal Links */
.footer-modals {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-self: center;
  text-align: left;
  align-items: flex-start;
}

.footer-modals a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  font-family: 'Jost', sans-serif;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer-modals a:hover {
  color: #fff;
}
/* Col 4: Socials */
.footer-socials {
  display: flex;
  gap: 25px;
  justify-self: end;
  align-items: flex-start;
}

.footer-socials a {
  color: #aaa;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
.footer-socials a:hover {
  transform: translateY(-3px);
  color: #fff;
}

.footer-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: auto;
  font-style: normal;
}

.footer-location .location-icon {
  color: #888;
}

/* --- Bottom Row: Copyright --- */
.footer-bottom {
  text-align: center;
  width: 100%;
  padding: 20px 20px 40px;
  color: #555;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Wrapper for Nav/Modals (SEO) --- */
.footer-nav-group {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 0;
  /* Pass through alignment if needed */
}

/* --- Mobile Responsive (Stack Everything) --- */
@media (max-width: 1100px) {
  .footer-top {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }
  
  .footer-logo {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  
  .footer-nav,
  .footer-modals,
  .footer-socials,
  .footer-nav-group {
    justify-self: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Match footer-top gap */
  }

  .footer-socials {
    justify-content: center;
    padding-top: 5px;
  }
  
}

/* --- Toast Notification --- */
#notification-toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  display: flex; /* Use flexbox for alignment */
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 16px;
  position: fixed;
  z-index: 3000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  font-family: 'Jost', sans-serif;
  font-weight: 500;
}

#notification-toast.show-toast {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  fill: #4caf50; /* Green color */
  margin-right: 10px;
}

/* --- FAQ Modal --- */
#open-faq,
#open-terms,
#open-privacy {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s;
}

#open-faq:hover,
#open-terms:hover,
#open-privacy:hover {
  color: #fff;
}

.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  padding: 40px;
  border-radius: 5px;
  width: 90%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  color: #555;
  max-height: 75vh; /* Prevent modal from exceeding viewport height */
  overflow-y: auto; /* Enable vertical scrolling */
}

.modal-content strong {
  color: #000;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.close-modal {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 21px;
  height: 21px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  cursor: pointer;
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.close-modal span,
.close-modal div {
  width: 100%;
  height: 1px;
  background-color: #333;
  transform-origin: 50% 50%;
  position: relative;
  transition: background-color 0.3s;
}

/* Force the X shape permanently */
.close-modal span:nth-child(1),
.close-modal div:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.close-modal span:nth-child(2),
.close-modal div:nth-child(2) {
  opacity: 0;
}

.close-modal span:nth-child(3),
.close-modal div:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.close-modal:hover span,
.close-modal:hover div {
  background-color: #000;
}

.modal-content h2 {
  text-align: center;
  font-size: 2.5rem;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.effective-date {
  text-align: center;
  margin-bottom: 30px;
  color: #555;
  font-size: 0.9rem;
}

.modal-content a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s;
}

.modal-content a:hover {
  opacity: 0.7;
}

.terms-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #555;
  font-size: 0.95rem;
}

.modal-subheading {
  display: block;
  font-weight: 500;
  color: #000;
  margin-top: 7px;
}

.terms-content {
  margin-top: 15px;
}

.terms-content p:last-child {
  margin-bottom: 0;
}

.terms-content ul {
  padding-left: 20px;
  margin-bottom: 15px;
  list-style-type: disc;
  margin-left: 10px;
}

.terms-content li {
  margin-bottom: 5px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}
