@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@600;700;900&display=swap');

/* ==========================================================================
   1. VARIABLES & THEMING
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222222;
  
  --accent: #E31E24;
  --accent-hover: #FF2D33;
  
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #666666;
  
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --container-max-width: 1200px;
  --nav-height: 72px;

  /* Transitions */
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.3s ease;
}

/* ==========================================================================
   2. GLOBAL RESET + BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: #fff;
}

/* ==========================================================================
   3. TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

section {
  padding: 100px 0;
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
}

.text-accent {
  color: var(--accent);
}

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

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent);
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 60px auto;
  text-align: center;
  font-size: 1.1rem;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 16px 40px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  will-change: transform;
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(227, 30, 36, 0.4);
  color: #ffffff;
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #ffffff;
  padding: 16px 40px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid #ffffff;
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  background-color: #ffffff;
  color: var(--bg-primary);
}

/* ==========================================================================
   4. NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: transparent;
  z-index: 1000;
  transition: background-color var(--transition-fast), border-bottom var(--transition-fast);
  display: flex;
  align-items: center;
}

.navbar.nav-scrolled {
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

.lang-selector {
  display: flex;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.lang-selector button {
  color: var(--text-secondary);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-selector button.active,
.lang-selector button:hover {
  color: var(--text-primary);
  opacity: 1;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  z-index: 1001;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Menu State */
.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 1000;
  }
  
  .nav-links.mobile-active a {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Fix for mobile browsers where background-attachment: fixed causes the background to disappear or scale incorrectly */
@media (max-width: 1024px) {
  .hero {
    background-attachment: scroll;
    /* Optional: Ensure the background position is centered on mobile */
    background-position: center center;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.8) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px auto;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: float 2s infinite ease-in-out;
}

.scroll-indicator svg {
  width: 32px;
  height: 32px;
  fill: var(--text-primary);
  opacity: 0.7;
}

/* ==========================================================================
   6. SERVICES SECTION
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 60px;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(227, 30, 36, 0.15);
}

.service-img-container {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.service-img-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(180deg, rgba(10,10,10,0.6) 0%, transparent 100%);
  z-index: 1;
}

.service-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-card:hover .service-img-container img {
  transform: scale(1.08);
}

.service-content {
  padding: 32px;
}

.service-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.service-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   7. WHY CHOOSE US
   ========================================================================== */
.features-section {
  background-color: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 60px;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  transition: all var(--transition-fast);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--accent);
  transition: transform var(--transition-fast);
}

.feature-item:hover .feature-icon {
  box-shadow: 0 0 15px rgba(227, 30, 36, 0.4);
}

.feature-item:hover .feature-icon svg {
  transform: rotate(10deg) scale(1.1);
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   8. BRANDS SECTION
   ========================================================================== */
.brands-section {
  overflow: hidden;
  padding: 60px 0;
}

.brands-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.brand-item {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.4s ease;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.5;
}

.brand-item:hover {
  filter: grayscale(0);
  opacity: 1;
  color: var(--text-primary);
}

/* Special Brand Colors on Hover (Example) */
.brand-item.porsche:hover { color: #A58E62; }
.brand-item.ferrari:hover { color: #FF2800; }
.brand-item.lamborghini:hover { color: #D4AF37; }
.brand-item.bmw:hover { color: #0066B1; }
.brand-item.mercedes:hover { color: #E8E8E8; }

@media (max-width: 768px) {
  .brands-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    animation: marquee 20s linear infinite;
    width: max-content;
  }
  
  .brands-section:hover .brands-container {
    animation-play-state: paused;
  }
}

/* ==========================================================================
   9. INSTAGRAM CTA
   ========================================================================== */
.instagram-cta {
  background: linear-gradient(135deg, rgba(227, 30, 36, 0.1) 0%, rgba(10, 10, 10, 1) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.instagram-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.instagram-content svg {
  width: 64px;
  height: 64px;
  fill: var(--text-primary);
  margin-bottom: 24px;
}

.instagram-content h2 {
  font-size: 2rem;
  margin-bottom: 32px;
}

/* ==========================================================================
   10. LOCATION
   ========================================================================== */
.location-section {
  background-color: var(--bg-primary);
}

.location-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 992px) {
  .location-grid {
    grid-template-columns: 1fr;
  }
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-card); /* Placeholder */
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.location-info {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.location-info h3 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.location-info p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.location-info svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
  flex-shrink: 0;
}

.location-info .btn-outline {
  margin-top: 24px;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   11. CONTACT FORM
   ========================================================================== */
.contact-section {
  background-color: var(--bg-secondary);
}

.contact-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 48px;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .contact-card {
    padding: 32px 24px;
  }
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 600px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: absolute;
  top: 16px;
  left: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 16px 0;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

/* Floating Label Logic */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:focus + label {
  top: -12px;
  font-size: 0.7rem;
  color: var(--accent);
}

.form-group select + label {
  top: -12px;
  font-size: 0.7rem;
}

/* Need standard placeholder trick for floating label to work purely in CSS */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: transparent;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.contact-form button[type="submit"] {
  grid-column: 1 / -1;
  margin-top: 16px;
  width: 100%;
}

/* ==========================================================================
   11.5. FAQ SECTION
   ========================================================================== */
.faq-container {
  max-width: 800px;
  margin: 60px auto 0;
}

.faq-item {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background-color: var(--bg-primary);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 24px 24px;
}

.faq-answer p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.service-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.service-header-mobile {
  display: none;
}

@media (max-width: 768px) {
  .service-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 24px;
    background-color: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    text-align: left;
  }
  
  .service-header-mobile svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
  }
  
  .service-card.active .service-header-mobile svg {
    transform: rotate(180deg);
  }
  
  .service-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
  }
  
  .service-card.active .service-body {
    max-height: 1200px;
  }
  
  .desktop-title {
    display: none;
  }
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.footer {
  background-color: var(--bg-secondary);
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 32px;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

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

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-fast);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--text-secondary);
  transition: fill var(--transition-fast);
}

.social-icon:hover {
  border-color: var(--accent);
  background-color: var(--glass);
}

.social-icon:hover svg {
  fill: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   13. WHATSAPP FLOATING BUTTON
   ========================================================================== */
.floating-wa {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  animation: pulse-load 2s 1;
}

.floating-wa svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
}

.floating-wa:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   14. ANIMATIONS & UTILITIES
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

@keyframes float {
  0% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -10px); }
  100% { transform: translate(-50%, 0); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulse-load {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
