/* -------------------------------------------------------
   COLOR PALETTE VARIABLES
------------------------------------------------------- */
:root {
  --color-white: #ffffff;
  --color-blue-primary: #0a4c8c;
  --color-blue-dark: #062f52;
  --color-gold-accent: #c9a449;
  --color-gray-light: #f3f4f6;
  --color-gray-text: #6b7280;
  --brand-logo-size: clamp(75px, 10vw, 150px);
  --brand-logo-small-scale: 1;
  --brand-stack-break: 576px;
  --brand-top-size: clamp(0.9rem, 2.4vw, 1.05rem);
  --brand-joseph-size: clamp(1.25rem, 4.5vw, 2rem);
}

/* -------------------------------------------------------
   GLOBAL
------------------------------------------------------- */
body {
  font-family: "Inter", sans-serif;
  color: var(--color-gray-text);
  padding-top: 0px;
  scroll-behavior: smooth;
  background: linear-gradient(
    rgba(6, 47, 82, 0.6),
    rgba(255, 255, 255, 1),
    /* dark overlay for contrast */ rgba(255, 255, 255, 1)
  );
}

.bg-gray-light {
  background: var(--color-gray-light);
}

/* -------------------------------------------------------
   NAVBAR
------------------------------------------------------- */
.custom-navbar {
  background: var(--color-white);
  border-bottom: 4px solid var(--color-gold-accent);
  width: 100%;
  padding: 0.5rem 0;
  flex-wrap: nowrap;
}

.navbar-grid {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  align-items: center;
  width: 100%;
  margin: 0 15px;
}
#mainNav {
  transition: transform 0.35s ease, background-color 0.2s ease;
  width: 100%;
  align-items: center;
}

/* Hidden state */
.nav-hide {
  transform: translateY(-100%);
}

/* Visible state */
.nav-show {
  transform: translateY(0);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo {
  width: var(--brand-logo-size);
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-text {
  line-height: 1;
  color: var(--color-blue-primary);
  display: inline-block;
  text-align: left;
}

.brand-text .logo-top {
  display: block;
  font-size: var(--brand-top-size);
  font-weight: 600;
  color: var(--color-blue-primary);
  margin-bottom: -10px;
}

.brand-text .logo-joseph {
  display: block;
  font-size: var(--brand-joseph-size);
  font-weight: 800;
  color: var(--color-blue-dark);
  margin-top: -10px;
  text-align: center;
}

/* Ensure navbar spacing still aligns visually */
.nav-left .brand-wrap {
  display: flex;
  align-items: center;
}

/* Navbar links */
.nav-link-custom {
  color: var(--color-blue-primary) !important;
  font-weight: 600;
}

.nav-link-custom:hover {
  color: var(--color-gold-accent) !important;
}

/* Button (right-side) */
.custom-btn-light {
  background: var(--color-blue-dark);
  color: var(--color-white);
  transition: 0.2s ease;
  padding: 0.5rem 1rem !important;
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.custom-btn-light:hover {
  background: var(--color-gold-accent);
  transform: translateY(-2px);
  color: var(--color-white) !important;
}

/* Mobile */
.custom-toggler {
  color: var(--color-gold-accent);
  border: none;
  background: transparent;
  padding: 0.25rem;
}
.custom-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23c9a449' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  background-size: 1.25rem 1.25rem;
  filter: none;
}
.custom-toggler:focus {
  box-shadow: none;
}
@media (max-width: 992px) {
  .nav-center {
    display: none !important;
  }
  .navbar-grid {
    grid-template-columns: 1fr auto;
    padding: 0 10px;
    margin: 2px 10px;
  }
  .nav-right {
    display: none;
  }
}
/* Responsive sizing for small screens */
@media (max-width: 768px) {
  .custom-btn-light {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.85rem;
  }

  .custom-btn-light i {
    font-size: 0.9rem;
  }
  .custom-btn-light i {
    display: none;
  }
}
/* Small screens: stack logo above text and reduce sizes */
@media (max-width: 576px) {
  .brand-wrap {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .brand-logo {
    width: calc(var(--brand-logo-size) * var(--brand-logo-small-scale));
  }

  .brand-text {
    text-align: center;
  }

  .brand-text .logo-top {
    font-size: clamp(0.9rem, 6vw, 1.05rem);
  }

  .brand-text .logo-joseph {
    font-size: clamp(1.05rem, 8vw, 2rem);
  }
  .custom-navbar {
    flex-wrap: wrap;
  }
  .custom-btn-light {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.8rem;
  }

  .custom-btn-light i {
    font-size: 0.85rem;
  }
  .navbar-grid {
    grid-template-columns: 1fr auto;
    padding: 0 1px;
    margin: 2px 4px;
  }
}

/* -------------------------------------------------------
   HERO SECTION
------------------------------------------------------- */
.hero-section {
  /* Background image + overlay */
  background: linear-gradient(
      rgba(6, 47, 82, 0.6),
      /* dark overlay for contrast */ rgba(6, 47, 82, 0.6)
    ),
    url("./images/placo-before.jpg") no-repeat center center;
  background-size: cover; /* cover full hero area */
  background-attachment: fixed; /* optional parallax effect */
  background-position: center;
  background-repeat: no-repeat;
  height: 100dvh;
  color: var(--color-white);
  position: relative;
}

/* -------------------------------------------------------
   HIGHLIGHTS SECTION
------------------------------------------------------- */
.highlight-section {
  height: 75vh; /* 75% of viewport height */
  background: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
}

/* Left Big Sentence */
.highlight-sentence {
  display: inline-block;
  position: relative;
  font-size: 3rem; /* can adjust as needed */
  color: var(--color-blue-dark) !important;
}

/* golden accent bar centered with the highlight sentence */
.highlight-sentence::after {
  content: "";
  display: block;
  /* responsive: scales with font-size (em) and viewport (vw), clamped to reasonable limits */
  width: clamp(3em, 6vw, 5.5em);
  height: 4px;
  background: var(--color-gold-accent);
  border-radius: 0.12em;
  margin: 0.6em 0 0 0;
}

/* LEFT COLUMN: slightly higher */
.highlight-section .col-md-6:first-child {
  margin-top: -25vh; /* move left column up by 25% of viewport height */
}

/* Right paragraph and button */
.highlight-section p {
  color: var(--color-blue-primary) !important;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  margin: 0;
}
/* RIGHT COLUMN: slightly higher */
.highlight-section .col-md-6:last-child {
  margin-top: +25vh; /* move right column down by 25% of viewport height */
}

/* Button hover */
.highlight-section .custom-btn-light:hover {
  background: var(--color-gold-accent);
  color: var(--color-blue-dark);
}
/* Initial hidden states */
.animate-left,
.animate-right {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

/* Slide in from left */
.animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from below for right column */
.animate-right.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .highlight-sentence {
    font-size: 2rem;
    text-align: center;
  }
  .highlight-section .col-md-6 {
    text-align: center;
    margin-bottom: 2rem;
  }
  .highlight-section .col-md-6:first-child {
    margin-top: +10vh;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .highlight-section .col-md-6:last-child {
    margin-top: 0;
  }
  .highlight-sentence::after {
    margin: 0.6em auto 0;
  }
  .highlight-section .col-md-6:last-child p,
  .highlight-section .col-md-6:last-child .lead {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .hero-section {
  background: linear-gradient(
      rgba(6, 47, 82, 0.6),
      /* dark overlay for contrast */ rgba(6, 47, 82, 0.6)
    ),
    url("./images/placo-before-mobile.jpg") no-repeat center center;  }
}

/* -------------------------------------------------------
   SERVICES
------------------------------------------------------- */
.services-section {
  background: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
  border: none !important;
}
/* Left Big Sentence */
.services-sentence {
  display: inline-block;
  position: relative;
  font-size: 3rem; /* can adjust as needed */
  color: var(--color-blue-dark) !important;
}

/* golden accent bar centered with the highlight sentence */
.services-sentence::after {
  content: "";
  display: block;
  /* responsive: scales with font-size (em) and viewport (vw), clamped to reasonable limits */
  width: clamp(3em, 6vw, 5.5em);
  height: 4px;
  background: var(--color-gold-accent);
  border-radius: 0.12em;
  margin: 0.6em 0 0 0;
}

/* Right paragraph */
.services-section p {
  color: var(--color-blue-primary) !important;
  font-size: clamp(0.8rem, 1.3vw, 1.025rem);
  text-align: right;
  margin: 0;
}
.email-de-jo {
  font-size: 1rem;
  font-weight: 300;
  display: block;
  text-align: right;
  margin-top: -2px;
  color: var(--color-blue-primary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .services-sentence {
    font-size: 2rem;
    text-align: center;
  }
  .services-section .col-md-6 {
    text-align: center;
    margin-bottom: 2rem;
  }
  .services-section .col-md-6:first-child {
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .services-sentence::after {
    margin: 0.6em auto 0;
  }
}

/* -------------------------------------------------------
   TILE GRID
------------------------------------------------------- */
/* TILE GRID: ensure equal horizontal and vertical gaps */
.tiles-section {
  --tile-gap: 6px; /* fixed gap value */
}

/* Force the rows to keep exactly two columns and never wrap */
.tiles-section .row {
  display: flex;
  flex-wrap: nowrap; /* prevent Bootstrap from wrapping columns onto a new line */
  gap: var(--tile-gap); /* equal horizontal and vertical spacing */
  margin: 0; /* reset bootstrap row negative margins */
  justify-content: center;
  padding-block: calc(var(--tile-gap) / 2);
}

/* Ensure each column is always 50% of the row (two per row at all sizes) */
.tiles-section .col-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* Make tiles fill their column and remain square; remove forced max-width so they can shrink */
.tile {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* TILE GRID: 2 columns x multiple rows, small equal gaps */
.tiles-section {
  background: var(--color-white);
}

/* Tile base */
.tile {
  position: relative;
  width: 100%;
  max-width: 520px; /* max width per tile */
  aspect-ratio: 1 / 1; /* keep tiles square */
  background-color: var(--color-gray-light);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  border: 1px solid rgba(6, 47, 82, 0.06);
  display: block;
  /* allow authors to set background via inline style or JS later */
}

/* subtle bottom gradient for text readability */
.tile::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(
    180deg,
    rgba(6, 47, 82, 0) 0%,
    rgba(6, 47, 82, 0.55) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* content pinned bottom-left */
.tile-content {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  color: var(--color-white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* title + small text */
.tile-content h3 {
  margin: 0;
  color: var(--color-white);
  font-weight: 700;
  /* responsive font-size: scales down on small screens, caps on large */
  font-size: clamp(1rem, 3.2vw, 1.25rem);
}

.tile-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  /* smaller supporting text that scales with viewport */
  font-size: clamp(0.75rem, 2.2vw, 0.95rem);
}

/* Responsive tweaks: keep two columns on small+ screens; on very small screens stack */
@media (max-width: 768px) {
  .tiles-section .col-12.col-sm-6 {
    padding-left: 0;
    padding-right: 0;
  }
  .tile {
    max-width: 100%;
    border-radius: 6px;
  }
}

/* ---------------------------
   REVIEWS TICKER — fixed-width, wrapped content (keeps continuous motion)
   - All pills use the same responsive fixed width (--ticker-width)
   - Review text wraps inside the pill; avatar size scales with the pill
   - Tracks remain inline-flex and animation is unchanged so motion is preserved
   --------------------------- */
.reviews-ticker {
  --ticker-width: clamp(500px, 56vw, 560px); /* fixed pill width */
  --review-avatar-size: clamp(72px, 8vw, 100px); /* responsive avatar */
  background: var(--color-white);
  /* border-top: 4px solid rgba(201,164,73,0.08); */
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.ticker-viewport {
  overflow: hidden;
  width: 100%;
  white-space: nowrap; /* keep tracks on a single line (prevents stacking) */
}

/* inline so original + clone sit horizontally in one row */
.ticker-track,
.ticker-track--clone {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  vertical-align: middle;
}

/* fixed-size pill: identical width for every ticker item, content wraps */
.ticker-item {
  background: var(--color-white);
  color: var(--color-blue-dark);
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  box-shadow: 0 6px 18px rgba(6, 47, 82, 0.06);

  /* FIXED SIZE: enforce identical width for all items */
  flex: 0 0 var(--ticker-width);
  width: var(--ticker-width);
  min-width: var(--ticker-width);
  max-width: var(--ticker-width);

  align-items: center;
  gap: 1rem;

  /* allow internal wrapping (prevent the pill from expanding) */
  white-space: normal;
  box-sizing: border-box;
  overflow: visible;
}

/* responsive avatar size using the css var */
.review-avatar {
  width: var(--review-avatar-size);
  height: var(--review-avatar-size);
  object-fit: cover;
  flex: 0 0 var(--review-avatar-size);
  border-radius: 50%;
  border: 2px solid rgba(6, 47, 82, 0.06);
}

/* constrain body width so text wraps predictably inside the fixed pill */
.review-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.15rem;
  /* leave space for avatar + paddings (adjust 3rem if you change paddings) */
  max-width: calc(var(--ticker-width) - var(--review-avatar-size) - 3rem);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ensure review text wraps within the fixed pill width */
.review-text {
  color: var(--color-blue-primary);
  opacity: 0.95;
  font-size: 0.95rem;
  margin-top: 0.25rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* animation: scroll the whole combined width (original + clone) */
@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  } /* moves by half because content is duplicated */
}

/* CSS variable --ticker-duration will be set by JS based on content width */
.ticker-track,
.ticker-track--clone {
  animation: ticker-scroll var(--ticker-duration, 24s) linear infinite;
}

/* pause on hover for usability */
.ticker-viewport:hover .ticker-track,
.ticker-viewport:hover .ticker-track--clone {
  animation-play-state: paused;
}

/* accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .ticker-track--clone {
    animation: none;
  }
}

/* -------------------------------------------------------
    PROJECTS sections
------------------------------------------------------- */
.projects-section {
  background: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
  border: none !important;
}
section#projects.projects-section {
  background-color: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
  border: none !important;
}
.projects-title {
  display: inline-block;
  position: relative;
  font-size: 3rem; /* can adjust as needed */
  color: var(--color-blue-dark) !important;
  text-align: left;
}

.projects-title::after {
  content: "";
  display: block;
  /* responsive: scales with font-size (em) and viewport (vw), clamped to reasonable limits */
  width: clamp(3em, 6vw, 5.5em);
  height: 4px;
  background: var(--color-gold-accent);
  border-radius: 0.12em;
  margin: 0.6em 0 0.6em 0;
}

/* Responsive adjustments for projects title on small screens */
@media (max-width: 768px) {
  .projects-title {
    font-size: 2rem;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .projects-title::after {
    margin: 0.6em auto 0.6em;
  }
  .projects-section .container {
    text-align: center;
    align-items: center;
    justify-content: center;
  }
}

.project-img {
  height: 450px;
  object-fit: cover;
}

/* -------------------------------------------------------
   ABOUT
------------------------------------------------------- */
.about-img {
  max-height: 300px;
  object-fit: cover;
}
.about-section {
  background: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
  border: none !important;
}

.about-title {
  display: inline-block;
  position: relative;
  font-size: 3rem; /* can adjust as needed */
  color: var(--color-blue-dark) !important;
  text-align: left;
}
.about-title::after {
  content: "";
  display: block;
  /* responsive: scales with font-size (em) and viewport (vw), clamped to reasonable limits */
  width: clamp(3em, 6vw, 5.5em);
  height: 4px;
  background: var(--color-gold-accent);
  border-radius: 0.12em;
  margin: 0.6em 0 0.6em 0;
}

/* Responsive adjustments for projects title on small screens */
@media (max-width: 768px) {
  .about-title {
    font-size: 2rem;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .about-title::after {
    margin: 0.6em auto 0.6em;
  }
  .about-section .container {
    text-align: center;
    align-items: center;
    justify-content: center;
  }
}
/* -------------------------------------------------------
   CONTACT FORM
------------------------------------------------------- */
.contact-section {
  background: var(--color-white) !important;
  display: flex;
  align-items: center;
  position: relative;
  border: none !important;
}

.contact-title {
  display: inline-block;
  position: relative;
  font-size: 3rem; /* can adjust as needed */
  color: var(--color-blue-dark) !important;
  text-align: left;
}
.contact-title::after {
  content: "";
  display: block;
  /* responsive: scales with font-size (em) and viewport (vw), clamped to reasonable limits */
  width: clamp(3em, 6vw, 5.5em);
  height: 4px;
  background: var(--color-gold-accent);
  border-radius: 0.12em;
  margin: 0.6em 0 0.6em 0;
}

/* Contact description text */
.contact-description {
  color: var(--color-blue-primary);
  font-size: clamp(1rem, 2vw, 1.1rem);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-description strong {
  color: var(--color-gold-accent);
  font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-description {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
}

/* Responsive adjustments for projects title on small screens */
@media (max-width: 768px) {
  .contact-title {
    font-size: 2rem;
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  .contact-title::after {
    margin: 0.6em auto 0.6em;
  }
  .contact-section .container {
    text-align: center;
    align-items: center;
    justify-content: center;
  }
}
.custom-btn-primary {
  background: var(--color-blue-primary);
  color: var(--color-white);
  border: none;
  transition: 0.2s ease;
}

.custom-btn-primary:hover {
  background: var(--color-blue-dark);
  transform: translateY(-2px);
}

/* Contact buttons container */
.contact-buttons {
  margin-top: 2rem;
}

/* Transparent contact button */
.contact-btn {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 164, 73, 0.15);
  border: 2px solid rgba(201, 164, 73, 0.3);
  border-radius: 50%;
  font-size: 2.5rem;
  color: var(--color-gold-accent);
  transition: all 0.3s ease;
  text-decoration: none;
}

.contact-btn:hover {
  background: rgba(201, 164, 73, 0.25);
  border-color: var(--color-gold-accent);
  transform: translateY(-4px);
  color: var(--color-gold-accent);
}

/* Responsive sizing */
@media (max-width: 600px) {
  .contact-btn {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
}
