/* Base Global Styles */

/* CSS Variables */
:root {
  --theme-color: #d10b15;
  --theme-color-hover: #a10911;
  --primary: #d10b15;
  --primary-hover: #a10911;
  --accent: #a0522d;
  --secondary: #a0522d;
  --dark: #222220; /* Charcoal black */
  --light: #f0f0f0; /* Light gray instead of beige */
  --success: #556b2f;
  --danger: #8b0000;
  --warning: #d2691e;
  --info: #a52a2a;

  --bg-theme: rgba(209, 11, 21, 0.9);

  --bg-color: #ffffff; /* Light gray for main bg in light mode */
  --text-color: #111111; /* High contrast WCAG AAA on light bg */
  --border-color: #d2b48c;
  --card-bg: #f8f8f8;
  --header-bg: transparent; /* Transparent header */
  --header-scrolled-bg: #ffffff; /* White when scrolled in light */
  --footer-bg: #222220; /* Charcoal black for footer */
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(209, 11, 21, 0.2);
  --section-bg-primary: #f0f0f0; /* Light gray */
  --section-bg-alt: rgba(209, 11, 21, 0.1); /* Light red tint */
  --section-bg-dark: #222220; /* Charcoal black */

  --spacing-xs: 0.75rem;
  --spacing-sm: 1.25rem;
  --spacing-md: 2rem;
  --spacing-lg: 3.5rem;
  --spacing-xl: 5rem;

  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-lg: 24px;
  --transition: 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

[data-theme="dark"] {
  --alternative: #cd853f;
  --bg-color: #121212;
  --text-color: #ffffff; /* High contrast on dark bg */
  --border-color: #d10b15;
  --card-bg: #1e1e1e;
  --header-bg: transparent; /* Transparent header in dark mode */
  --header-scrolled-bg: #222220; /* Dark when scrolled in dark mode */
  --footer-bg: #222220; /* Charcoal black for footer */
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-hover: rgba(0, 0, 0, 0.6);
  --secondary: #d0d0d0; /* Enhanced secondary for better readability */
  --section-bg-primary: #333330; /* Dark gray for coherence */
  --section-bg-alt: rgba(
    209,
    11,
    21,
    0.2
  ); /* Theme red tint, adjusted for dark contrast */
  --section-bg-dark: #222220; /* Charcoal black */
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Stack Sans Text", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 400;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color var(--transition), color var(--transition);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 2.5rem;
  font-weight: 400;
}
h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--theme-color);
  text-decoration: none;
  transition: all var(--transition);
}

a:hover {
  color: var(--theme-color-hover);
  opacity: 0.8;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.text-white {
  color: white !important;
}

.text-black {
  color: #222220 !important;
}

/* Header */
.site-header {
  background-color: transparent;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(10px);
  &.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
  }
}

[data-theme="dark"] .site-header {
  background-color: transparent;
  box-shadow: 0 1px 0 var(--border-color);
  &.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
  }
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  img {
    width: auto;
    height: 78px;
  }
}

.logo i {
  font-size: 1.75rem;
}

/* Navigation */
.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  margin-bottom: 0;
}

.main-nav a {
  color: white;
  font-weight: 400;
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  transition: all var(--transition);
}

.site-header {
  &.scrolled .main-nav a {
    color: var(--text-color);
  }
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .main-nav {
    display: block;
  }

  .hamburger {
    display: none !important;
  }
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  transform: scale(1.05);
  color: var(--text-color);
}

.site-header {
  &.scrolled .theme-toggle {
    color: var(--text-color);
    :hover {
      color: var(--text-color);
    }
  }
}

.hamburger {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header {
  &.scrolled .hamburger {
    color: var(--text-color);
    :hover {
      color: var(--text-color);
    }
  }
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-color);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  transform: translateX(0);
}

.menu-header {
  position: sticky;
  top: 0;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.menu-back {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.menu-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Menu Levels */
.menu-level {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-color);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding-top: 60px;
}

.menu-level.active {
  transform: translateX(0);
}

.menu-level.previous {
  transform: translateX(-30%);
}

.menu-main {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-color);
  transition: transform 0.3s ease;
  padding-top: 60px;
  transform: translateX(0);
}

.menu-main.hidden {
  transform: translateX(-30%);
}

.menu-level ul,
.menu-main ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-level li,
.menu-main li {
  border-bottom: 1px solid var(--border-color);
}

.menu-level a,
.menu-level button,
.menu-main a,
.menu-main button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  color: var(--text-color);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition);
}

.menu-level a:hover,
.menu-level button:hover {
  background-color: var(--card-bg);
}

.menu-level .bi-chevron-right {
  color: var(--secondary);
}

/* Footer */
.site-footer {
  background-color: #222220; /* Charcoal black for both modes */
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  font-size: 0.9375rem;
  border-top: 1px solid #d10b15; /* Theme border for contrast */
  background-image: url("https://www.transparenttextures.com/patterns/dark-leather.png"); /* Leather texture for footer */
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: multiply;
  background-color: rgba(#222220, 0.9); /* Slight overlay for contrast */
  color: #fff8f0; /* Light text for contrast on dark bg */
}

.site-footer a,
.site-footer p,
.site-footer h4 {
  color: #fff8f0; /* Ensure light text in footer for both modes */
}

.site-footer .footer-social a {
  color: #fff8f0;
}

.site-footer .footer-social a:hover {
  color: var(--theme-color);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.footer-logo {
  height: 60px;
  margin-top: -15px;
  margin-bottom: 0px;
}

.footer-section h4 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  margin-left: 2rem;
  color: #fff8f0; /* Light color */
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #fff8f0; /* Light color */
  display: block;
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

.footer-section a:hover {
  color: var(--theme-color);
}

.footer-bottom {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid #d10b15; /* Theme border */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff8f0; /* Light color */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.footer-bottom a {
  color: #fff8f0; /* Light color */
}

.footer-social {
  margin-left: 2rem;
  display: flex;
  gap: var(--spacing-sm);
}

.footer-social a {
  font-size: 1.25rem;
  color: #fff8f0; /* Light color */
  transition: color var(--transition);
}

.footer-social a:hover {
  color: var(--theme-color);
}

/* Utility Classes */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-xl) 0;
  background-color: var(
    --section-bg-primary
  ); /* Light gray/red in light, coherent in dark */
  background-image: url("https://www.transparenttextures.com/patterns/dark-leather.png"); /* Leather texture for sections */
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: soft-light; /* Subtle blend to maintain contrast */
}

.section:first-of-type {
  background-image: none; /* No texture on hero/first section for subtlety */
}

[data-theme="dark"] .section {
  background-color: var(
    --section-bg-primary
  ); /* Adjusted for dark mode contrast */
}

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-size: 1rem;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px var(--shadow);
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px var(--shadow-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1.5px solid var(--theme-color);
  color: var(--theme-color);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px var(--shadow-hover);
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  box-shadow: 0 2px 12px var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px var(--shadow-hover);
  border-color: transparent;
}

/* Lazy Loading Images */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 767px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }

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

  .header-container {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

a.whatsapp {
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 90px;
  right: 30px;
  background-color: #45ca5b;
  color: #fff;
  z-index: 99999;
  box-shadow: 0 0 5px 5px rgba(3, 60, 45, 0.1);
  transition: 400ms ease-in-out;
}

a.whatsapp:hover {
  background-color: rgba(3, 60, 45, 1);
  box-shadow: 0 0 5px 9px rgba(3, 60, 45, 0.1);
}

a.whatsapp svg {
  color: #fff;
  font-size: 28px;
  width: 24px;
  height: 24px;
  transition: 400ms ease-in-out;
}

a.whatsapp:hover svg {
  color: #45ca5b;
  filter: inherit;
}

@media (max-width: 768px) {
  a.whatsapp {
    width: 40px;
    height: 40px;
    bottom: 70px;
    right: 20px;
  }
}

/* Biker/Rock/Texas BBQ Feel Enhancements */
body {
  background-image: linear-gradient(
    to bottom,
    rgba(34, 34, 32, 0.05),
    transparent
  ); /* Subtle texture gradient */
}

[data-theme="dark"] body {
  background-image: linear-gradient(
    to bottom,
    rgba(209, 11, 21, 0.05),
    transparent
  ); /* Red tint for dark mode */
}

.card {
  border: 1px solid rgba(209, 11, 21, 0.2); /* Red border accent */
}

.btn-primary {
  /* Bold font for rock feel */
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.iperform-development {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  img {
    width: auto;
    height: 35px;
    filter: grayscale(1);
    transition: filter var(--transition);
  }
}

/* Section Title Line */
.section-title {
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 5rem; /* Adjust width as needed */
  height: 2px;
  background-color: var(--primary);
}

/* CTA Section - Same as Home */
.cta-section {
  background-color: var(--bg-theme) !important;
  color: white;
  text-align: center;
  padding: var(--spacing-md) 0;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.cta-content p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
  line-height: 1.7;
}

.cta-content .btn-primary {
  background-color: white;
  color: var(--primary);
  border: none;
}

.cta-content .btn-primary:hover {
  background-color: var(--light);
  color: var(--primary-hover);
}
