/* Kosavi Industries — Component Styles */

/* ==========================================================================
   1. BUTTONS
   ========================================================================== */

/* --- Primary Button --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red-600);
  color: var(--white);
  font-size: var(--text-small);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--red-700);
}

.btn-primary .btn-arrow {
  transition: transform 200ms ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Large variant — hero CTAs */
.btn-primary--lg {
  padding: 16px 36px;
  font-size: var(--text-body);
}

/* Small variant — card CTAs, tables */
.btn-primary--sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* White variant — on red/dark backgrounds */
.btn-primary--white {
  background: var(--white);
  color: var(--red-600);
}

.btn-primary--white:hover {
  background: var(--grey-100);
}

/* --- Secondary Button (Outlined) --- */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--red-600);
  font-size: var(--text-small);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 6px;
  border: 1.5px solid var(--red-600);
  cursor: pointer;
  transition: background 200ms ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--red-50);
}

/* Dark variant — on dark backgrounds */
.btn-secondary--dark {
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary--dark:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Large variant */
.btn-secondary--lg {
  padding: 16px 36px;
  font-size: var(--text-body);
}

/* --- Ghost / Text Button --- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--red-600);
  font-size: var(--text-small);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 150ms ease;
}

.btn-ghost:hover {
  text-decoration: underline;
}

/* --- Icon Button --- */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}

.btn-icon:hover {
  border-color: var(--red-600);
  color: var(--red-600);
}


/* ==========================================================================
   2. EYEBROW LABEL
   ========================================================================== */

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-600);
  margin-bottom: 12px;
}


/* ==========================================================================
   3. CATEGORY TAGS / PILLS
   ========================================================================== */

.tag {
  display: inline-block;
  background: var(--red-100);
  color: var(--red-700);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

.tag--neutral {
  background: var(--grey-100);
  color: var(--grey-600);
  font-weight: 500;
}


/* ==========================================================================
   4. PRODUCT CARD
   ========================================================================== */

.card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 250ms ease, border-color 250ms ease, transform 250ms ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--red-500);
  transform: translateY(-4px);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card__body {
  padding: 24px 24px 20px;
}

.card__title {
  font-size: var(--text-h3);
  font-weight: 700;
  color: var(--grey-950);
}

.card__desc {
  font-size: var(--text-body);
  color: var(--grey-600);
  margin-top: 8px;
  line-height: 1.6;
}

.card__cta {
  margin-top: 20px;
}


/* ==========================================================================
   5. SOLUTION CARD (ICON-LED)
   ========================================================================== */

.solution-card {
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  padding: 32px;
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

.solution-card:hover {
  background: var(--white);
  border-color: var(--red-500);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.solution-card__icon {
  width: 52px;
  height: 52px;
  background: var(--red-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-600);
}

.solution-card__title {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--grey-950);
  margin-top: 20px;
}

.solution-card__desc {
  font-size: var(--text-body);
  color: var(--grey-600);
  margin-top: 8px;
}


/* ==========================================================================
   6. FORM INPUTS
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  background: var(--white);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  color: var(--grey-950);
  padding: 0 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input::placeholder {
  color: var(--grey-400);
}

.form-input:focus {
  outline: none;
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--grey-200);
  border-radius: 6px;
  background: var(--white);
  font-family: var(--font-primary);
  font-size: var(--text-body);
  color: var(--grey-950);
  padding: 12px 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  resize: vertical;
}

.form-textarea::placeholder {
  color: var(--grey-400);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-container {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}


/* ==========================================================================
   7. TWO-COLUMN SPLIT LAYOUT (IMAGE + TEXT)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Reverse variant — swap column order */
.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

.split__image {
  border-radius: 12px;
  overflow: hidden;
}

.split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .split__content inherits from section context — no extra styles needed */


/* ==========================================================================
   8. BREADCRUMB
   ========================================================================== */

.breadcrumb {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--grey-400);
}

.breadcrumb a:hover {
  color: var(--red-500);
}

.breadcrumb__separator {
  color: var(--grey-600);
  margin: 0 8px;
}

.breadcrumb__current {
  color: var(--white);
}


/* ==========================================================================
   9. PAGE HEADER (INNER PAGES)
   ========================================================================== */

.page-header {
  background: var(--grey-950);
  padding-top: calc(var(--header-height) + var(--utility-bar-height) + 48px);
  padding-bottom: 48px;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}

.page-header__title {
  font-size: var(--text-h1);
  font-weight: 700;
  color: var(--white);
  margin-top: 16px;
}


/* ==========================================================================
   RESPONSIVE — COMPONENT ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
  /* Split layout stacks to single column */
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .split--reverse {
    direction: ltr;
  }

  /* Page header shrinks on mobile */
  .page-header {
    min-height: 200px;
  }

  .page-header__title {
    font-size: 2rem;
  }

  /* Form container reduces padding on mobile */
  .form-container {
    padding: 24px;
  }
}


/* ========== HEADER & NAVIGATION ========== */

/* --- Utility Bar --- */
.utility-bar {
  background: var(--grey-950);
  height: 40px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}
.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.utility-bar__contact {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--grey-400);
}
.utility-bar__contact a { color: var(--grey-400); transition: color 150ms ease; display: inline-flex; align-items: center; gap: 6px; }
.utility-bar__contact a:hover { color: var(--white); }
.utility-bar__contact i { width: 14px; height: 14px; }
.utility-bar__link {
  font-size: var(--text-xs);
  color: var(--red-500);
  font-weight: 600;
  transition: color 150ms ease;
}
.utility-bar__link:hover { color: var(--white); }

/* --- Site Header --- */
.site-header > .container {
  height: 100%;
}
.site-header {
  position: fixed;
  top: var(--utility-bar-height);
  left: 0;
  right: 0;
  height: var(--header-height);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  z-index: 1000;
}
.site-header.scrolled,
.site-header.header--solid {
  background: var(--white);
  border-bottom-color: var(--grey-200);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-header__logo img {
  height: 100px;
  width: auto;
}

/* --- Primary Nav --- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
}
.primary-nav__item {
  position: relative;
}
.primary-nav__link {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--grey-800);
  transition: color 150ms ease;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.primary-nav__link:hover,
.primary-nav__link--active {
  color: var(--red-600);
}
.primary-nav__link--active {
  border-bottom: 2px solid var(--red-600);
}
/* On transparent header (hero pages before scroll), make nav links white */
.site-header:not(.scrolled):not(.header--solid) .primary-nav__link {
  color: var(--white);
}
.site-header:not(.scrolled):not(.header--solid) .primary-nav__link:hover {
  color: var(--red-500);
}
.site-header:not(.scrolled):not(.header--solid) .site-header__logo img {
  filter: brightness(0) invert(1);
}

/* --- Header Actions (right side) --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--grey-800);
}
.site-header:not(.scrolled):not(.header--solid) .hamburger {
  color: var(--white);
}

/* --- Mega Menu --- */
.mega-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--white);
  border-top: 2px solid var(--red-600);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 999;
  padding: var(--space-5) 0;
}
.mega-menu--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.mega-menu__inner {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: var(--space-5);
}
.mega-menu__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  list-style: none;
}
.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 150ms ease, border-color 150ms ease;
}
.mega-menu__item:hover {
  background: var(--red-50);
  border-left-color: var(--red-600);
}
.mega-menu__item-icon {
  width: 24px;
  height: 24px;
  color: var(--red-600);
  flex-shrink: 0;
  margin-top: 2px;
}
.mega-menu__item-name {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--grey-950);
}
.mega-menu__item-desc {
  font-size: var(--text-xs);
  color: var(--grey-600);
  margin-top: 2px;
  line-height: 1.4;
}
.mega-menu__featured {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image: url('/assets/images/menu-featured.jpg');
  background-size: cover;
  background-position: center top;
}
.mega-menu__featured::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.35) 60%,
    rgba(0,0,0,0.1) 100%
  );
  z-index: 0;
}
.mega-menu__featured-heading,
.mega-menu__featured-text,
.mega-menu__featured-cta {
  position: relative;
  z-index: 1;
}
.mega-menu__featured-heading {
  font-size: var(--text-h4);
  font-weight: 700;
  color: var(--white);
}
.mega-menu__featured-text {
  font-size: var(--text-small);
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  line-height: 1.5;
}
.mega-menu__featured-cta {
  margin-top: 20px;
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--grey-950);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  overflow-y: auto;
  padding: var(--space-3);
}
.mobile-nav--open {
  transform: translateX(0);
}
body.nav-open {
  overflow: hidden;
}
.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-3);
}
.mobile-nav__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  cursor: pointer;
  background: none;
  border: none;
}
.mobile-nav__logo img {
  height: 28px;
  filter: brightness(0) invert(1);
}
.mobile-nav__list {
  list-style: none;
}
.mobile-nav__link {
  display: block;
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 150ms ease;
}
.mobile-nav__link:hover {
  color: var(--red-500);
}
/* Products accordion in mobile nav uses native <details>/<summary> */
.mobile-nav__accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-lead);
  font-weight: 600;
  color: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  list-style: none;
}
.mobile-nav__accordion summary::-webkit-details-marker { display: none; }
.mobile-nav__accordion summary .chevron {
  transition: transform 200ms ease;
  color: var(--grey-400);
}
.mobile-nav__accordion[open] summary .chevron {
  transform: rotate(180deg);
}
.mobile-nav__sub-list {
  list-style: none;
  padding-left: var(--space-2);
  padding-bottom: var(--space-2);
}
.mobile-nav__sub-link {
  display: block;
  font-size: var(--text-body);
  color: var(--grey-400);
  padding: 10px 0;
  transition: color 150ms ease;
}
.mobile-nav__sub-link:hover {
  color: var(--red-500);
}
.mobile-nav__cta {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Responsive Header Rules --- */
@media (max-width: 1024px) {
  .utility-bar { display: none; }
  .site-header { height: var(--header-height-mobile); top: 0; }
  .primary-nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn-primary { display: none; }
  .mega-menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav { transition: none; }
  .mega-menu { transition: none; }
}


/* ========== FOOTER ========== */

/* --- Pre-footer CTA Band --- */
.pre-footer {
  background: var(--red-700);
  padding: var(--space-6) 0;
}
.pre-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.pre-footer__heading {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--white);
}
.pre-footer__sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-body);
  margin-top: 8px;
}
.pre-footer__cta {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* --- Main Footer --- */
.site-footer {
  background: var(--grey-900);
  padding: 80px 0 48px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1.5fr;
  gap: var(--space-5);
}
.site-footer__logo img {
  height: 32px;
  filter: brightness(0) invert(1);
}
.site-footer__desc {
  font-size: var(--text-small);
  color: var(--grey-400);
  margin-top: 16px;
  line-height: 1.6;
  max-width: 280px;
}
.site-footer__contact-info {
  margin-top: 20px;
}
.site-footer__contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-small);
  color: var(--grey-400);
  margin-bottom: 8px;
}
.site-footer__contact-item i { width: 16px; height: 16px; color: var(--grey-400); }
.site-footer__social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.site-footer__social a {
  color: var(--grey-400);
  transition: color 150ms ease;
}
.site-footer__social a:hover {
  color: var(--red-500);
}
.site-footer__social i { width: 20px; height: 20px; }
.footer-col__heading {
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col__list {
  list-style: none;
}
.footer-col__link {
  display: block;
  font-size: var(--text-small);
  color: var(--grey-400);
  padding: 5px 0;
  transition: color 150ms ease;
}
.footer-col__link:hover {
  color: var(--white);
}
.footer-col__address {
  font-size: var(--text-small);
  color: var(--grey-400);
  line-height: 1.7;
  font-style: normal;
}

/* --- Footer Bottom Bar --- */
.footer-bottom {
  background: var(--grey-950);
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom__copy {
  font-size: var(--text-xs);
  color: var(--grey-400);
}
.footer-bottom__links {
  display: flex;
  gap: var(--space-3);
}
.footer-bottom__link {
  font-size: var(--text-xs);
  color: var(--grey-400);
  transition: color 150ms ease;
}
.footer-bottom__link:hover {
  color: var(--white);
}

/* --- Footer Responsive --- */
@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .pre-footer__inner {
    flex-direction: column;
    text-align: center;
  }
  .pre-footer__cta {
    flex-direction: column;
    width: 100%;
  }
  .pre-footer__cta .btn-primary,
  .pre-footer__cta .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .footer-bottom__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
