/* ==========================================================
   LACHHMAN SINGH & SONS - THEME CSS
   File: public/assets/css/theme.css
   Purpose: Global design system, responsive base, header,
   footer, buttons, theme variables and reusable utilities.
========================================================== */


/* ==========================================================
   01. DESIGN TOKENS
========================================================== */

:root {
  --lss-primary: #dc3545;
  --lss-primary-dark: #b02a37;
  --lss-primary-soft: #fff0f1;

  --lss-bg: #ffffff;
  --lss-bg-soft: #f8f9fb;
  --lss-surface: #ffffff;

  --lss-text: #161616;
  --lss-text-soft: #555555;
  --lss-muted: #777777;

  --lss-border: #eeeeee;

  --lss-footer-bg: #050505;
  --lss-footer-text: rgba(255, 255, 255, 0.72);

  --lss-font-heading: "Barlow Condensed", sans-serif;
  --lss-font-body: "Inter", sans-serif;

  --lss-container: 1180px;

  --lss-radius-sm: 6px;
  --lss-radius-md: 12px;
  --lss-radius-lg: 18px;

  --lss-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.06);
  --lss-shadow-md: 0 16px 48px rgba(0, 0, 0, 0.10);
  --lss-shadow-red: 0 12px 30px rgba(220, 53, 69, 0.30);

  --lss-section-padding: 100px;
  --lss-section-padding-tablet: 76px;
  --lss-section-padding-mobile: 58px;

  --lss-header-height: 78px;
  --lss-header-height-tablet: 70px;
  --lss-header-height-mobile: 66px;

  --lss-transition: 0.28s ease;
}


/* ==========================================================
   02. DARK THEME TOKENS
========================================================== */

html[data-theme="dark"] {
  --lss-bg: #0f1115;
  --lss-bg-soft: #151821;
  --lss-surface: #1b1f2a;

  --lss-text: #ffffff;
  --lss-text-soft: rgba(255, 255, 255, 0.76);
  --lss-muted: rgba(255, 255, 255, 0.58);

  --lss-border: rgba(255, 255, 255, 0.10);

  --lss-footer-bg: #050505;
  --lss-footer-text: rgba(255, 255, 255, 0.70);

  --lss-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
  --lss-shadow-md: 0 16px 48px rgba(0, 0, 0, 0.32);
}


/* ==========================================================
   03. GLOBAL RESET
========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  position: relative;
  font-family: var(--lss-font-body);
  color: var(--lss-text);
  background: var(--lss-bg);
  line-height: 1.65;
  overflow-x: hidden;
}

#main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

section {
  max-width: 100%;
  overflow-x: clip;
}

body.mobile-menu-open {
  overflow: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

a {
  color: var(--lss-primary);
  text-decoration: none;
  transition: color var(--lss-transition), background var(--lss-transition), transform var(--lss-transition);
}

a:hover {
  color: var(--lss-primary-dark);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--lss-font-heading);
  color: var(--lss-text);
  font-weight: 800;
  line-height: 1.1;
}

p {
  color: var(--lss-text-soft);
}

button {
  font-family: inherit;
}


/* ==========================================================
   04. GLOBAL LAYOUT UTILITIES
========================================================== */

.container {
  width: 100%;
  max-width: min(var(--lss-container), 100%);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.lss-section {
  padding: var(--lss-section-padding) 0;
}

.lss-section-soft {
  background: var(--lss-bg-soft);
}

.section-label {
  font-family: var(--lss-font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--lss-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 54px;
}

.section-head h2 {
  font-size: 50px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head p {
  font-size: 15px;
  color: var(--lss-muted);
  margin-bottom: 0;
}


/* ==========================================================
   05. GLOBAL BUTTONS
========================================================== */

.primary-btn,
.hero-btn-primary,
.cta-btn-red,
.nav-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--lss-primary);
  color: #ffffff !important;
  border: 1px solid var(--lss-primary);
  border-radius: var(--lss-radius-sm);
  font-family: var(--lss-font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 28px;
  line-height: 1;
  box-shadow: var(--lss-shadow-red);
  transition: all var(--lss-transition);
}

.primary-btn:hover,
.hero-btn-primary:hover,
.cta-btn-red:hover,
.nav-contact-btn:hover {
  background: var(--lss-primary-dark);
  border-color: var(--lss-primary-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.outline-btn,
.hero-btn-outline,
.cta-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--lss-text);
  border: 1px solid var(--lss-border);
  border-radius: var(--lss-radius-sm);
  font-family: var(--lss-font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 13px 28px;
  line-height: 1;
  transition: all var(--lss-transition);
}

.outline-btn:hover,
.hero-btn-outline:hover,
.cta-btn-outline:hover {
  background: var(--lss-primary);
  border-color: var(--lss-primary);
  color: #ffffff !important;
  transform: translateY(-2px);
}


/* ==========================================================
   06. HEADER
========================================================== */

#header.site-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--lss-border);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 997;
  padding: 0;
  transition: all var(--lss-transition);
}

html[data-theme="dark"] #header.site-header {
  background: rgba(15, 17, 21, 0.92);
}

.header-inner {
  min-height: var(--lss-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  min-width: 118px;
  min-height: 58px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.site-logo img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: none !important;
  opacity: 1 !important;
}

/* Keep header logo white in dark mode also */
html[data-theme="dark"] .site-logo {
  background: #ffffff;
}

html[data-theme="dark"] .site-logo img {
  filter: none !important;
  opacity: 1 !important;
}

.navbar {
  padding: 0;
}

.navbar ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.navbar li {
  position: relative;
}

.navbar a,
.navbar a:focus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-family: var(--lss-font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--lss-text);
  white-space: nowrap;
}

.navbar a:hover,
.navbar a.active,
.navbar li:hover > a {
  color: var(--lss-primary);
}

.navbar .nav-contact-btn {
  padding: 11px 22px;
  margin-left: 0;
}

.nav-login-link {
  color: var(--lss-primary) !important;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--lss-border);
  background: var(--lss-surface);
  color: var(--lss-text);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--lss-transition);
}

.theme-toggle-btn:hover {
  background: var(--lss-primary);
  border-color: var(--lss-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================
   06C. THEME TOGGLE ACTIVE STATE
========================================================== */

.theme-toggle-btn.is-active {
  background: var(--lss-primary);
  border-color: var(--lss-primary);
  color: #ffffff;
  box-shadow: var(--lss-shadow-red);
}

.theme-toggle-btn.is-active:hover {
  background: var(--lss-primary-dark);
  border-color: var(--lss-primary-dark);
  color: #ffffff;
}


/* ==========================================================
   06A. DESKTOP DROPDOWN
========================================================== */

.navbar .dropdown ul {
  display: block;
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  min-width: 240px;
  padding: 10px;
  margin: 0;
  background: var(--lss-surface);
  border: 1px solid var(--lss-border);
  border-radius: var(--lss-radius-md);
  box-shadow: var(--lss-shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--lss-transition);
  z-index: 99;
}

.navbar .dropdown:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar .dropdown ul li {
  min-width: 100%;
}

.navbar .dropdown ul a {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--lss-text-soft);
  font-size: 14px;
}

.navbar .dropdown ul a:hover {
  background: var(--lss-primary-soft);
  color: var(--lss-primary);
}

.mobile-nav-toggle {
  display: none;
  color: var(--lss-text);
  font-size: 30px;
  cursor: pointer;
}


/* ==========================================================
   06B. MOBILE NAVIGATION
========================================================== */

@media (max-width: 991px) {
  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1003;
    width: 42px;
    right: 10px;
    height: 42px;
    color: var(--lss-text);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
  }

  .navbar > ul {
    display: none !important;
  }

  .navbar.navbar-mobile {
    position: fixed !important;
    inset: 0 !important;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1001;
    overflow-y: auto;
    padding: 88px 16px 24px;
  }

  .navbar.navbar-mobile > ul {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 18px;
    background: var(--lss-surface);
    border: 1px solid var(--lss-border);
    border-radius: 18px;
    box-shadow: var(--lss-shadow-md);
  }

  .navbar.navbar-mobile > ul > li {
    display: block;
    width: 100%;
    margin: 0 0 6px;
  }

  .navbar.navbar-mobile a,
  .navbar.navbar-mobile a:focus {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 14px 14px;
    border-radius: 10px;
    color: var(--lss-text);
  }

  .navbar.navbar-mobile a:hover,
    .navbar.navbar-mobile a.active {
    background: var(--lss-primary-soft);
    color: var(--lss-primary);
    }

    /* Keep contact button proper in mobile menu */
    .navbar.navbar-mobile .nav-contact-btn,
    .navbar.navbar-mobile .nav-contact-btn.active,
    .navbar.navbar-mobile .nav-contact-btn:hover {
    background: var(--lss-primary) !important;
    border-color: var(--lss-primary) !important;
    color: #ffffff !important;
    justify-content: center;
    }

  .navbar.navbar-mobile .nav-contact-btn {
    margin-top: 8px;
    justify-content: center;
    background: var(--lss-primary);
    color: #ffffff !important;
  }

  .navbar.navbar-mobile .theme-toggle-btn {
    margin: 12px 14px;
  }

  .navbar.navbar-mobile .mobile-nav-toggle {
    position: fixed;
    top: 22px;
    right: 33px;
    color: #ffffff;
    z-index: 1003;
  }

  .navbar.navbar-mobile .dropdown ul {
    display: none !important;
    position: static !important;
    width: 100%;
    min-width: auto;
    margin: 6px 0 10px;
    padding: 8px;
    background: var(--lss-bg-soft);
    border: 1px solid var(--lss-border);
    border-radius: 12px;
    box-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .navbar.navbar-mobile .dropdown ul.dropdown-active {
    display: block !important;
  }

  .navbar.navbar-mobile .dropdown ul a {
    padding: 11px 12px;
    font-size: 13px;
  }
}


/* ==========================================================
   07. FOOTER
========================================================== */

#footer.site-footer {
  background: var(--lss-footer-bg);
  color: #ffffff;
  padding: 0;
  font-size: 14px;
}

.site-footer .footer-top {
  padding: 72px 0 46px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 42px;
}

.footer-logo {
  display: inline-flex;
  margin-bottom: 20px;
}

.footer-logo img {
  max-height: 62px;
  width: auto;
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
}

.site-footer h4 {
  font-family: var(--lss-font-heading);
  font-size: 21px;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 18px;
}

.site-footer p {
  color: var(--lss-footer-text);
  margin-bottom: 14px;
}

.site-footer a {
  color: var(--lss-footer-text);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 11px;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-list a::before {
  content: "›";
  color: var(--lss-primary);
  font-size: 20px;
  line-height: 1;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: var(--lss-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  background: var(--lss-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-bottom {
  padding: 18px 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}


/* ==========================================================
   08. BACK TO TOP
========================================================== */

.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 18px;
  bottom: 18px;
  z-index: 996;
  background: var(--lss-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--lss-radius-sm);
  transition: all var(--lss-transition);
}

.back-to-top i {
  font-size: 28px;
  color: #ffffff;
  line-height: 0;
}

.back-to-top:hover {
  background: var(--lss-primary-dark);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}


/* ==========================================================
   09. ANIMATION UTILITIES
========================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-left"] {
  transform: translateX(32px);
}

[data-animate="fade-right"] {
  transform: translateX(-32px);
}

[data-animate="fade-left"].is-visible,
[data-animate="fade-right"].is-visible {
  transform: translateX(0);
}


/* ==========================================================
   10. RESPONSIVE FOUNDATION
========================================================== */

@media (max-width: 1199px) {
  .navbar ul {
    gap: 20px;
  }

  .navbar a,
  .navbar a:focus {
    font-size: 13px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .header-inner {
    min-height: var(--lss-header-height-tablet);
  }

  .site-logo img {
    max-height: 52px;
  }

  .section-head h2 {
    font-size: 42px;
  }
}

@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-inner {
    min-height: var(--lss-header-height-mobile);
  }

  .site-logo {
    min-width: 108px;
    min-height: 54px;
    padding: 5px 8px;
    border-radius: 7px;
  }

  .site-logo img {
    max-height: 44px;
  }

  #header.site-header {
    padding: 0;
  }

  .lss-section {
    padding: var(--lss-section-padding-mobile) 0;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .section-head h2 {
    font-size: 34px;
  }

  .section-head p {
    font-size: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer .footer-top {
    padding: 54px 0 34px;
  }

  .primary-btn,
  .hero-btn-primary,
  .hero-btn-outline,
  .cta-btn-red,
  .cta-btn-outline,
  .outline-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
    .site-logo {
        min-width: 100px;
        min-height: 50px;
    }

    .site-logo img {
        max-height: 40px;
    }

  .section-head h2 {
    font-size: 30px;
  }
}

/* ==========================================================
   11. GLOBAL OVERFLOW FIX
   Prevents horizontal scroll on mobile across all pages
========================================================== */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#main,
main,
section,
.container {
  max-width: 100%;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

/* Debug note:
   If horizontal scroll still appears, temporarily add:
   * { outline: 1px solid red; }
   Then remove it after finding the overflowing element.
*/

@media (max-width: 767px) {
  .row {
    margin-left: 0;
    margin-right: 0;
  }

  [class*="col-"] {
    max-width: 100%;
  }

  .about-hero-image::before,
  .about-story-image::before,
  .home-about-image::before {
    display: none !important;
  }

  .about-hero-badge,
  .home-about-badge,
  .experience-badge {
    left: 16px !important;
    right: auto !important;
  }

  .about-year-box {
    left: 14px !important;
    right: 14px !important;
    width: auto !important;
  }

  .home-feature-list,
  .about-feature-pills {
    max-width: 100%;
  }

  .home-feature-list span,
  .about-feature-pills span {
    max-width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}