/*
 * Stylesheet for the LionStar Developments site.
 *
 * This file defines a modern, responsive layout inspired by the provided
 * wireframes. It uses CSS variables for easy theming, includes responsive
 * breakpoints, and styles common components such as the hero sections,
 * service cards, bullets, project cards, and footer. The typography
 * leverages Google Fonts via the head includes in the layout template.
 */

:root {
  --primary-color: #14213d;
  --secondary-color: #fca311;
  --light-bg: #f5f5f5;
  --text-color: #333333;
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Roboto', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--text-color);
  background: var(--light-bg);
  line-height: 1.6;
  padding-top: 70px; /* space for the fixed header */
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(20, 33, 61, 0.95);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header a.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  font-family: var(--heading-font);
}

header a.logo img {
  height: 42px;
  max-width: 100%;
  display: block;
  mix-blend-mode: screen;
}

header a.logo .logo-text {
  line-height: 1.1;
}

.brand-text {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--heading-font);
}

nav {
    display: flex;
}

nav a {
  color: #ffffff;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover,
nav a:focus {
  color: var(--secondary-color);
}

.hero {
  height: 80vh;
  position: relative;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.hero .content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-family: var(--heading-font);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Hero background images scoped by page class */
.home .hero {
  background-image: url('../images/home-hero.png');
}

.construction .hero {
  background-image: url('../images/home-hero.png');
}

.maintenance .hero {
  background-image: url('../images/maintenance-hero.png');
}

.brokerage .hero {
  background-image: url('../images/brokerage-hero.png');
}

.contact .hero {
  background-image: url('../images/brokerage-hero.png');
}

/* New page hero backgrounds */
.industries .hero {
  background-image: url('../images/industries-hero.png');
}

.projects .hero {
  background-image: url('../images/projects-hero.png');
}

.about .hero {
  background-image: url('../images/about-hero.png');
}

.innovation .hero {
  background-image: url('../images/innovation-hero.png');
}

.resources .hero {
  background-image: url('../images/resources-hero.png');
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
  cursor: pointer;
}

.btn.primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.btn.primary:hover {
  background: #e89b00;
  color: var(--primary-color);
}

.btn.secondary {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  margin-left: 0.75rem;
}

.btn.secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* Section styling */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-family: var(--heading-font);
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: stretch;
}

.service-card {
  background: #ffffff;
  flex: 1 1 calc(33.333% - 1rem);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-family: var(--heading-font);
}

.service-card .btn {
  margin-left: 0;
  margin-top: auto;
  align-self: center;
}

.why {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.why .points {
  flex: 1 1 50%;
}

.why .image {
  flex: 1 1 50%;
}

.bullets {
  list-style: none;
  padding-left: 0;
}

.bullets li {
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
  line-height: 1.5;
}

.bullets li::before {
  content: '3';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.featured-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.project-card .info {
  padding: 1rem;
}

.footer {
  background: var(--primary-color);
  color: #ffffff;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-primary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  align-items: flex-start;
}

.footer-heading {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.footer-brand {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  max-width: 64px;
  height: auto;
  display: block;
}

.footer-subtext {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer a {
  color: #e8f0ff;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: background 0.2s ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.footer-disclaimer {
  background: #f5f7fa;
  color: var(--text-color);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nav-toggle {
    display: none;
}

.obfuscated {
  unicode-bidi: bidi-override;
  direction: rtl;
}

@media (max-width: 768px) {
  .main-content {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .footer {
    padding: 2rem 1.25rem;
  }

  .footer-primary {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .nav-toggle {
    display: block;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
  }

  .hamburger {
    display: block;
    position: relative;
    width: 2em;
    height: 3px;
    background: white;
    transition: transform 0.3s ease-in-out;
  }

  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: white;
    transition: transform 0.3s ease-in-out;
  }

  .hamburger::before {
    top: -8px;
  }

  .hamburger::after {
    bottom: -8px;
  }

  .nav {
    position: fixed;
    background: var(--primary-color);
    color: white;
    top: 80px; /* Match header height */
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .nav--visible {
    transform: translateX(0);
    display: flex;
  }

  .nav a {
    margin: 0;
    font-size: 1.5rem;
  }

  .nav--visible .hamburger {
      transform: rotate(45deg);
  }

  .nav--visible .hamburger::before {
      transform: rotate(90deg);
      top: 0;
  }

  .nav--visible .hamburger::after {
      opacity: 0;
  }
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(1100px, calc(100% - 2rem));
  background: transparent;
}

.cookie-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(20, 33, 61, 0.1);
}

.cookie-copy p {
  margin: 0;
  color: var(--text-color);
}

.cookie-copy a {
  color: var(--primary-color);
  font-weight: 600;
}

.cookie-actions {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-cookie {
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--body-font);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn-cookie:focus-visible,
.consent-close:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

.btn-cookie-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(252, 163, 17, 0.35);
}

.btn-cookie-primary:hover {
  background: #e89b00;
}

.btn-cookie-secondary {
  background: #ffffff;
  color: var(--primary-color);
  border: 1px solid rgba(20, 33, 61, 0.2);
}

.btn-cookie-secondary:hover {
  background: rgba(20, 33, 61, 0.06);
}

.btn-cookie-customize {
  color: var(--secondary-color);
  border-color: rgba(252, 163, 17, 0.4);
}

.consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
}

.consent-modal[hidden] {
  display: none;
}

.consent-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.consent-modal__dialog {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  padding: 1.75rem;
  width: min(750px, calc(100% - 2.5rem));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.consent-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.consent-modal__header h2 {
  margin: 0;
  color: var(--primary-color);
  font-family: var(--heading-font);
}

.consent-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

.consent-modal__intro {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.consent-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.consent-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid rgba(20, 33, 61, 0.1);
  border-radius: 10px;
  background: #f9fafb;
  gap: 1rem;
}

.consent-option h3 {
  margin: 0 0 0.25rem;
  color: var(--primary-color);
  font-family: var(--heading-font);
}

.consent-option p {
  margin: 0;
  color: var(--text-color);
}

.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d0d5dd;
  transition: 0.2s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .slider {
  background-color: var(--secondary-color);
}

.toggle input:checked + .slider:before {
  transform: translateX(22px);
}

.toggle input:disabled + .slider {
  background-color: rgba(20, 33, 61, 0.2);
  cursor: not-allowed;
}

.consent-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero {
    height: 60vh;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .services {
    flex-direction: column;
  }
  .service-card {
    flex: 1 1 100%;
  }
  .why {
    flex-direction: column;
  }
  header nav a {
    margin-left: 1rem;
  }
  .cookie-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .cookie-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .consent-modal__dialog {
    padding: 1.25rem;
  }
}
.footer a.logo img {
  height: 42px;
  width: auto;
}
