@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================= ROOT ================= */
:root {
  --bg: #faf9f7;
  --surface: #f1efe9;
  --card: #ffffff;
  --text: #2a2a2a;
  --muted: #7a7a7a;
  --border: #e2dfd6;
  --accent: #1f2937;

  --radius: 18px;
  --transition: 320ms cubic-bezier(.2, .9, .3, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: .2px;
  -webkit-font-smoothing: antialiased;
}


/* ================= HERO / VIDEO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, .6),
      rgba(0, 0, 0, .3));
}

.hero-text {
  position: absolute;
  bottom: 22%;
  left: 8%;
  color: #fff;
  max-width: 560px;
}

.hero-text h1 {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.1;
}

.hero-text p {
  margin-top: 12px;
  font-size: 19px;
  opacity: .9;
}

/* ================= WHAT WE DO ================= */
.what-we-do h1 {
  text-align: center;
  font-size: 42px;
  margin-bottom: 24px;
}

.what-we-do {
  margin: 56px 70px 24px 70px;
}

.what-we-do p {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 60px;
  font-size: 1.1rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.service-card {
  position: relative;
  height: 420px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 60px rgba(0, 0, 0, .18);
}

/* overlay */
.service-card .overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .65));
  backdrop-filter: blur(6px);
  transform: translateY(calc(100% - 58px));
  transition: transform var(--transition);
}

.service-card:hover .overlay {
  transform: translateY(0);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.card-desc,
.card-link {
  opacity: 0;
  max-height: 0;
  transition: all var(--transition);
}

.service-card:hover .card-desc,
.service-card:hover .card-link {
  opacity: 1;
  max-height: 200px;
}

.card-desc {
  font-size: .95rem;
  color: #e5e7eb;
  text-align: justify;
}

.card-link {
  margin-top: 10px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .6);
  width: max-content;
}

/* ================= ABOUT ================= */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  align-items: center;
  margin: 56px 70px 24px 70px;
}

.about-img {
  height: 520px;
  background-size: cover;
  background-position: center;
}

.about-text h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  text-align: justify;
}

/* ================= NEWS (INFINITE SCROLL FIXED) ================= */
.news {
  margin: 56px 0 24px 0;
  padding-bottom: 30px;
}

.news p.section-desc {
  text-align: center;
  padding-bottom: 10px;
  padding-left: 16px;
  color: var(--muted);
}

.news h1 {
  text-align: center;
  font-size: 42px;
  margin-bottom: 25px;
}

.news-carousel {
  overflow: hidden;
  width: 100%;
  position: relative;
  padding: 20px 0;
  /* Soft fade on edges */
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.news-track {
  display: flex;
  gap: 24px;
  width: max-content;
  /* CRITICAL: Force left alignment for loop */
  justify-content: flex-start !important;
  animation: newsLoop 60s linear infinite;
  will-change: transform;
}

.news-track:hover {
  animation-play-state: paused;
}

@keyframes newsLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-card {
  flex: 0 0 300px; /* Fixed width */
  max-width: 300px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  transition: transform var(--transition), box-shadow var(--transition);
  border-radius: 8px;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .1);
}

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

.news-card .card-title {
  color: var(--text);
  padding: 14px 16px 6px;
  font-size: 1.1rem;
}

.news-card .card-desc {
  padding: 0 16px 18px;
  font-size: .95rem;
  color: var(--muted);
  opacity: 1;
  max-height: none;
  text-align: left;
}

.news-track::-webkit-scrollbar {
  display: none;
}

/* ================= CLIENTS ================= */
.clients {
  min-height: auto;
  margin: 56px 70px 24px 70px;
}

.clients h1 {
  text-align: center;
  margin-bottom: 40px;
}

.client-slider {
  display: flex;
  justify-content: space-between;
  align-items: center;
  filter: grayscale(100%);
  opacity: .7;
}

.logo {
  width: 140px;
  object-fit: contain;
}

/* ================= NAVBAR ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgb(157, 157, 157);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 3%;
}

.brand {
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 1px;
  font-size: 1.3rem;
  z-index: 61;
}

.site-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: #000000;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 5px;
  z-index: 61;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  background: #000000;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile menu open state - Transformed into X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ================= FOOTER ================= */
footer {
  background: rgb(157, 157, 157);
  color: #cfd6e4;
}

.footer-top {
  padding: 20px 8% 10px 8%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 70px;
}

.footer-grid h4 {
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 22px;
}

.footer-grid a {
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 10px;
  display: block;
  font-size: large;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 10px 8%;
  font-size: .85rem;
  text-align: center;
}

.social {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social a img {
  display: block;
}

.line-break {
  height: 1px;
  width: 100%;
  margin: 10px 0;
  background-color: #ffffff;
}

.location {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20%;
  flex-wrap: wrap;
  padding: 15px 8%;
}

.location a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
}

.location img {
  width: 26px;
  height: 26px;
  color: #ffffff;
}

.location a:hover {
  color: #000;
  transform: translateY(-2px);
  transition: 0.2s ease;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* ================= RESPONSIVE (UPDATED & BOOSTED) ================= */

/* Large Desktop (1200px - 1440px) */
@media(max-width:1440px) {
  .what-we-do, .about, .news, .clients {
    margin: 56px 50px 24px 50px;
  }
}

/* Desktop / Small Laptop (1024px - 1200px) */
@media(max-width:1200px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .what-we-do, .about, .news, .clients { margin: 40px 40px 24px 40px; }
  .hero-text h1 { font-size: 56px; }
}

/* Tablet Landscape (768px - 1024px) */
@media(max-width:1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .location { gap: 10%; }
  .site-nav ul { gap: 16px; }
  .about { gap: 50px; }
  .about-img { height: 450px; }
}

/* ================= MOBILE & TABLET PORTRAIT (Important Fixes) ================= */
@media(max-width:768px) {
  /* 1. Layout Adjustments */
  .cards { grid-template-columns: 1fr; }
  
  .about { display: flex; flex-direction: column; }
  .about-text { order: 1; }
  .about-img { 
    order: 2; 
    width: 100%; 
    height: 350px; /* Taller image */
    background-size: cover; 
    background-position: center; 
  }
  .about-text p { order: 3; }

  /* 2. Text Size BOOST for Mobile Reading */
  body { font-size: 18px; } /* Base size increase */
  
  .hero-text h1 { font-size: 48px; line-height: 1.1; }
  .hero-text p { font-size: 20px; }

  .what-we-do h1, .about-text h1, .news h1, .clients h1 {
    font-size: 40px; /* Much larger headers */
  }

  .what-we-do p, .about-text p {
    font-size: 1.15rem; /* ~19px readable text */
    line-height: 1.7;
    text-align: left; /* Easier to read on mobile than justify/center */
  }

  /* 3. Mobile Navigation Menu */
  .menu-toggle { display: flex; }
  
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgb(157, 157, 157);
    backdrop-filter: blur(15px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }
  
  /* Class added via JS */
  .site-nav.active { max-height: 500px; } 
  
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
  }
  
  .site-nav li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
  
  .site-nav a {
    display: block;
    padding: 20px 8%; /* Larger touch target */
    font-size: 1.2rem; /* Bigger menu text */
    letter-spacing: 1px;
  }

  /* 4. Footer & Sections */
  .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .footer-grid a { font-size: 1.1rem; padding: 5px 0; } /* Bigger links */
  .social { justify-content: center; gap: 20px; }
  .social a img { width: 28px; height: 28px; } /* Bigger icons */
  
  .location { flex-direction: column; gap: 20px; }
  .location a { font-size: 18px; }

  .what-we-do, .about, .news, .clients { margin: 40px 25px; }

  /* 5. NEWS SLIDESHOW FOR MOBILE (UPDATED) */
  .news-carousel {
    overflow: hidden; /* Hide scrollbar for seamless look */
    padding-bottom: 20px;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  }

  .news-track {
    display: flex;
    gap: 16px;
    width: max-content;
    /* Enable the infinite loop animation */
    animation: newsLoop 45s linear infinite; 
    transform: translateX(0); /* Reset generic transform */
  }

  /* Pause scrolling if user touches it */
  .news-track:active, .news-track:focus {
    animation-play-state: paused;
  }

  .news-card {
    /* Use fixed width (pixels) instead of vw to ensure smooth looping calculations */
    flex: 0 0 260px; 
    max-width: 260px;
    scroll-snap-align: unset; /* Disable snap */
  }

  .news-card img { height: 180px; }
}

/* Small Mobile (below 480px) */
@media(max-width:480px) {
  .hero-text h1 { font-size: 38px; }
  .hero-text p { font-size: 18px; }
  
  .what-we-do h1, .about-text h1, .news h1, .clients h1 {
    font-size: 34px;
  }
  
  .brand { font-size: 1.2rem; }
  .header-inner { padding: 15px 5%; }
  
  .service-card { height: 380px; }
  .service-card .card-title { font-size: 1.4rem; } /* Bigger card titles */
}