/* Landing.css (updated for responsive card grid + consistent icon position) */

/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  scrollbar-width: none;
}

/* ===== Header / Nav (unchanged from user's base, with small tweaks kept) ===== */
.stickynav {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 1em 0;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}
.stickynav img {
  width: 5vw;
  height: auto;
  filter: brightness(0) invert(1);
}
.imgc {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  z-index: 2;
}
.imgc h1 {
  color: white;
  margin-left: 0.5em;
  line-height: 100%;
}
.imgc h1 p {
  font-size: 0.6em;
  font-weight: normal;
}

.stickynav ul {
  display: flex;
  padding: 10px 0;
  list-style: none;
}
.stickynav li {
  margin: 0 20px;
}
.stickynav a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
}
.stickynav a:hover {
  color: #004aad;
  text-decoration: underline;
  transition: all 0.3s ease-in-out;
}
.stickynav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  color: #ffffff;
  transition: background 0.3s, color 0.3s;
  z-index: 1000;
  background-color: black;
}
.stickynav a {
  color: #ffffff;
}
.stickynav a:hover {
  color: #004aad;
  text-decoration: underline;
}
.stickynav .imgc h1 {
  color: white;
}
.stickynav img {
  filter: brightness(0) invert(1);
}

.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  opacity: 0.5;
}
.divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: white;
  z-index: 1001;
}
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.cont1 {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.textc1 {
  padding: 1em 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  font-size: 2rem;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.385);
  width: 100%;
}
.textc1 button {
  margin-top: 1em;
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 10px 20px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.textc1 button:hover {
  background-color: white;
  color: black;
}

.cont2 {
  display: flex;
  flex-direction: column;
  width: 100vw;
  background-color: #fff;
  overflow: hidden;
  height: fit-content;
  margin: 2rem 0;
  position: relative;
  padding-bottom: 100px;
}

.textc2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #4b4b4b;
  text-align: center;
  height: fit-content;
}
.textc2 h2 {
  font-size: 3rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.textc2 h2 img {
  width: 3rem;
  height: auto;
  margin-left: 1rem;
}
.textc2 p {
  font-size: 1.5rem;
  margin: 1rem 2rem;
  color: #6b6b6b;
  max-width: 90ch;
  margin-inline: auto;
}

/* ===== CARD GRID (NEW) ===== */

/* Container becomes a responsive grid that adapts to window size */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  width: min(1400px, 100%);
  margin: 3rem auto 4rem;
  padding: 0 clamp(0.75rem, 2vw, 1rem);
  align-items: stretch; /* make rows equal height */
}

/* Each .container is now a card cell that fills its grid column */
.container {
  width: 100%;
  aspect-ratio: 3 / 4; /* consistent height across cards */
  min-height: 340px; /* floor for small screens */
  max-height: 560px; /* prevent runaway tall cards on huge screens */
  perspective: 1000px;
  display: block;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  overflow: hidden;
  border-radius: 12px;
}

/* Faces fill the card area */
.front,
.back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  backface-visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  color: #fff;
  font-size: clamp(1rem, 1.1vw + 0.6rem, 1.35rem);
  text-align: center;
  overflow: hidden;
  display: block;
}

/* Overlay to keep text readable on photos */
.card-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Inner content: fixed icon position, flexible text */
.inner {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 100%;
  padding: 6rem 1.25rem 1.25rem; /* top padding reserves space for icon */
  box-sizing: border-box;
  transform: translateZ(60px) scale(0.94);
  z-index: 2;

  display: grid;
  grid-template-rows: auto 1fr;
  align-items: start;
  justify-items: center;
  gap: 0.75rem;
}

/* Icon is locked to the same spot on every card */
.inner img {
  position: absolute;
  top: 1.5rem; /* same top offset on all cards */
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  filter: brightness(0) invert(1);
}

/* Title */
.inner p {
  font-weight: 700;
  max-width: 22ch;
  margin-top: -4rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Body text */
.inner span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6; /* keep height consistent; clip overflow */
  overflow: hidden;
  max-width: 36ch;
  color: #f2f2f2;
}

/* Front / Back transforms */
.front {
  transform: rotateY(0deg);
  z-index: 2;
}
.back {
  background: #000;
  color: #fff;
  transform: rotateY(180deg);
  z-index: 1;
}

/* Background image helpers from user's original */
.card-bg-1 {
  background-image: url("./Media/image_20.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-bg-2 {
  background-image: url("./Media/image_21.JPG");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-bg-3 {
  background-image: url("./Media/image_10.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-bg-4 {
  background-image: url("./Media/image_19.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Flip on hover (preserved) *
.container:hover .front {
  transform: rotateY(-180deg);
}
.container:hover .back {
  transform: rotateY(0deg);
}
===== Section 3 / other existing styles kept ===== */
.textc3 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  text-align: center;
  height: fit-content;
  background-color: #074cab;
  padding: 2rem;
}
.textc3 h1 {
  font-size: 3rem;
}
.textc3 p {
  font-size: 1.5rem;
  margin: 0 2rem;
  max-width: 90ch;
  margin-inline: auto;
}

.cont3-curve {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: hidden;
  line-height: 0;
  z-index: 2;
  pointer-events: none;
}
.cont3-curve svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cont3 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  position: relative;
  min-height: 60vh;
  padding: 3rem 0;
  background-image: url(./Media/image_18.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: -50px;
}
.slide-in {
  margin-top: 4em;
  width: 30vw;
  max-width: 400px;
  min-width: 250px;
  padding: 2em;
  background: #fff;
  color: #222;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(0) translateX(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0.2, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  z-index: 2;
}
.slide-in.left {
  transform: translateX(-80px);
}
.slide-in.right {
  transform: translateX(80px);
}
.slide-in.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in-text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s 0.6s, transform 0.6s 0.6s;
}
.slide-in.visible .fade-in-text {
  opacity: 1;
  transform: translateY(0);
}
.cont3-fade-in-text {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.8s 1.2s;
  z-index: 3;
  pointer-events: none;
  width: 50%;
}
.cont3.visible .cont3-fade-in-text {
  opacity: 1;
}

footer {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  width: 100%;
  background-color: #ffffff;
  color: black;
  font-size: 1.5rem;
  z-index: 2;
  height: fit-content;
  padding: 2em 0;
}
footer p {
  margin: 0;
  padding: 1em;
  text-align: center;
}
footer ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}
footer a {
  color: black;
  text-decoration: none;
}
footer a:hover {
  color: #00f;
  text-decoration: underline;
}

/* Splash */
@keyframes flipY-slowdown {
  0% {
    transform: rotateY(0deg);
  }
  80% {
    transform: rotateY(1440deg);
  }
  100% {
    transform: rotateY(1440deg);
  }
}
#splash-screen {
  background: #fff;
  transition: background 0.7s;
}
#splash-screen.splash-dark {
  background: #000;
}
#splash-logo {
  filter: none;
  transition: filter 0.7s;
}
#splash-logo.logo-white {
  filter: brightness(0) invert(1);
}
#splash-screen.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s;
}

/* Responsive Nav + Text Safety */
.stickynav .nav-links {
  display: flex;
  gap: clamp(0.5rem, 2vw, 2rem);
  list-style: none;
  align-items: center;
}
.stickynav .nav-links a {
  font-size: clamp(1rem, 2vw, 1.25rem);
  white-space: nowrap;
}
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hamburger {
  border-color: rgba(255, 255, 255, 0.7);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 3px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  color: white;
}
.hamburger span {
  color: #ffffff;
}

/* Mobile menu */
@media (max-width: 900px) {
  .stickynav {
    justify-content: space-between;
  }
  .stickynav .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid #e8e8e8;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 1200;
  }
  .stickynav .nav-links a {
    color: #222;
    font-size: 1.125rem;
  }
  .stickynav .divider {
    display: none;
  }
  .hamburger {
    display: inline-flex;
  }
  .stickynav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Safer hero text sizing */
  .textc1 {
    padding: 1.25rem;
  }
  .textc1 h1 {
    font-size: clamp(1.25rem, 6vw, 2.25rem);
  }
  .textc1 p {
    font-size: clamp(0.95rem, 3.5vw, 1.25rem);
  }
}

/* Utilities */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Full-screen hamburger overlay—keep from user's previous fix */
@media (max-width: 900px) {
  .stickynav > ul,
  .stickynav .nav-links {
    position: fixed !important;
    inset: 0 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    padding: 2rem 1.25rem !important;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
  }
  .stickynav.nav-open > ul,
  .stickynav.nav-open .nav-links,
  .stickynav.open > ul,
  .stickynav.open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .stickynav > ul li a,
  .stickynav .nav-links li a {
    font-size: clamp(1.15rem, 5vw, 1.75rem) !important;
    color: #222 !important;
  }
  .stickynav.nav-open .hamburger span,
  .stickynav.open .hamburger span {
    background: #222 !important;
  }
  .stickynav.nav-open,
  .stickynav.open {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2100;
  }
  html:has(.stickynav.nav-open),
  body:has(.stickynav.nav-open),
  html:has(.stickynav.open),
  body:has(.stickynav.open) {
    overflow: hidden !important;
  }
}

/* Consistent logo sizing */
@media (max-width: 1024px) {
  .imgc img {
    width: clamp(56px, 10vw, 96px) !important;
    height: auto !important;
  }
}
@media (max-width: 900px) {
  .imgc img {
    width: clamp(64px, 14vw, 120px) !important;
    height: auto !important;
  }
}

/* Hero image (replaces video) */
.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ---- Hero slider (replaces single hero image) ---- */
.hero-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 800ms ease;
  pointer-events: none;
  display: block;
}

.hero-slider .slide.active {
  opacity: 1;
}
.service-area {
  list-style: decimal;
}
