/* ===============================
   Root variables
================================ */
:root {
  --header-height: 120px;
  --footer-height: 80px;
  --primary-color: #1F3C5B;
  --accent-color: #1F3C5B;
  --bg-light: #FAF7F2;
  --text-dark: #333;
  --btn-radius: 8px;
  --btn-padding: 0.7rem 1.5rem;
  --shadow-light: rgba(0, 0, 0, 0.15);
  --transition-speed: 0.3s;
}

/* ===============================
   Reset & base
================================ */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Open Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  scroll-behavior: smooth;
}

/* ===============================
   Layout
================================ */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  box-sizing: border-box;
}

/* ===============================
   Header / Nav
================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.5rem 1rem;
  box-sizing: border-box;

  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 6px var(--shadow-light);
  font-weight: 600;
  font-size: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 128px;
  width: auto;
}

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

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
}

.nav-links a:hover,
.nav-links a.active {
  text-decoration: underline;
  font-weight: 700;
  color: #e0e0e0;
}

.lang-switcher {
  color: #fff;
  font-weight: 600;
  user-select: none;
}

.lang-switcher a {
  color: #fff;
  text-decoration: none;
  margin: 0 0.25rem;
  transition: color var(--transition-speed);
}

.lang-switcher a.active {
  text-decoration: underline;
  font-weight: 700;
  color: #e0e0e0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  user-select: none;
}

/* ===============================
   Hero (Slider)
================================ */
main.hero {
  position: relative;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  width: 100vw;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.slider {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 90%;
  padding: 2rem 3rem;
  border-radius: 16px;
  text-align: center;

  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  font-size: 1.8rem;
  font-weight: 700;
}

/* ===============================
   Buttons
================================ */
.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: background-color var(--transition-speed);
}

.btn:hover {
  filter: brightness(1.15);
}

/* ===============================
   Content
================================ */
main.content {
  max-width: 980px;
  margin: calc(var(--header-height) + 40px) auto 40px;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 8px var(--shadow-light);
}

/* ===============================
   Footer
================================ */
.footer {
  flex-shrink: 0;
  min-height: var(--footer-height);   /* CHANGED */
  height: auto;                       /* CHANGED */
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 1.2rem 1rem;               /* SLIGHTLY MORE SPACE */
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;             /* CHANGED */
  align-items: center;
  justify-content: center;
  gap: 0.75rem;                       /* NEW */
}

/* ===============================
   Footer content
================================ */
.footer .footer-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* FORCE WHITE ICONS IN FOOTER */
.footer svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* FORCE tel links to be white in footer */
.footer a[href^="tel"] {
  color: #fff !important;
  text-decoration: none;
}

.footer a[href^="tel"]:hover {
  text-decoration: underline;
}

/* ===============================
   Services
================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 8px var(--shadow-light);
  overflow: hidden;              /* CRITICAL */
  text-align: center;
}

.service-card img {
  width: 100%;                   /* CRITICAL */
  height: 200px;                 /* SAME IDEA AS PORTFOLIO */
  object-fit: cover;             /* CRITICAL */
  display: block;
}

.service-card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--primary-color);
}

.service-card p {
  padding: 0 1rem 1.25rem;
  margin: 0;
  color: #555;
}

.service-detail-body img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.service-card a {
  text-decoration: none;
  color: inherit; /* Keep the text color consistent */
}

.service-card a:hover {
  text-decoration: underline; /* Optional: underline on hover for UX */
}

/* ===============================
   Portfolio
================================ */

.portfolio {
  max-width: 1100px;
}

.portfolio-project {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #eee;
}

.portfolio-project:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.portfolio-project h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.project-highlights {
  margin: 1rem 0 1.5rem;
  padding-left: 1.2rem;
}

.project-highlights li {
  margin-bottom: 0.4rem;
}

/* IMAGE GRID */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 1.5rem;
}

.portfolio-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 6px var(--shadow-light);
  transition: transform var(--transition-speed),
              box-shadow var(--transition-speed);
}

.portfolio-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.portfolio-grid a {
  display: block;
}

/* Notes under projects */
.project-note {
  margin-top: 1rem;
  font-style: italic;
  color: #666;
}

/* ===== JS Lightbox ===== */
.js-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.js-lightbox.open {
  display: flex;
}

.js-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 8px;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
}

.lb-close { top: 20px; right: 30px; }
.lb-prev  { left: 20px; }
.lb-next  { right: 20px; }

.lb-lock {
  position: fixed;
  width: 100%;
}

.project-cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f5f5f5;
  border-left: 4px solid var(--primary-color);
}

/* ===============================
   Mobile tweaks
================================ */
@media (max-width: 600px) {
  .portfolio-grid img {
    height: 170px;
  }
}

/* ===============================
   Contact phone
================================ */
.contact-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* FIX BLUE LINK */
.contact-phone a {
  color: #fff;               /* FIX */
  text-decoration: none;
}

.contact-phone a:hover {
  text-decoration: underline;
}

/* FIX PHONE ICON */
.contact-phone svg {
  fill: #fff;                /* FIX */
  transition: opacity var(--transition-speed);
}

.contact-phone svg:hover {
  opacity: 0.85;
}

/* ===============================
   Social icons
================================ */
.social-icons {
  display: flex;
  gap: 0.75rem;
}

/* ===============================
   Mobile
================================ */
@media (max-width: 768px) {
  .contact-phone {
    justify-content: center;
  }
}

/* ===== Mobile nav ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    right: 0;
    background: var(--primary-color);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}
