/* fonts.css */
@font-face {
  font-family: "Yekan";
  src: url("../fonts/yekan/Yekan.woff2") format("woff2"),
    url("../fonts/yekan/Yekan.woff") format("woff"),
    url("../fonts/yekan/Yekan.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* base.css */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #d97706; /* Improved contrast */
  --secondary-dark: #b65c04;
  --tertiary: #fbbc04;
  --dark: #1d2535; /* Better readability */
  --light: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 0.5rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Yekan", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 1rem;
  z-index: 1000;
  transition: var(--transition);
}

.skip-link:focus {
  top: 0;
}

/* Contact Navigation */
.contact-nav {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  background: #3a6ea5;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.contact-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  font-weight: 500;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  color: var(--dark);
  border-radius: var(--radius);
  transition: var(--transition);
  text-decoration: none;
}

.contact-link:focus,
.contact-link:hover {
  background: var(--primary);
  color: white;
  outline: 2px solid var(--secondary);
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: auto;
  padding: 6rem 1rem 4rem;
  background: url("../images/car-battery.webp") center/cover;
  background-color: rgba(0, 0, 0, 0.15);
  background-blend-mode: multiply;
  color: white;
  padding: 2rem;
  display: grid;
  place-content: center;
  text-align: center;
}

.header-nav {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 10;
}

.logo img {
  width: 160px;
  height: auto;
}

#main-content {
  padding: 0; /* Remove default padding */
  margin-top: 0; /* Pull up content */
  position: relative;
  z-index: 2; /* Ensure content stays above hero background */
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin: 0 auto 3rem;
  max-width: 1200px;
  padding: 2rem 1rem;
  background-color: #2c3e50;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

.section-header::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--secondary),
    transparent
  );
  opacity: 0.7;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.5rem);
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.section-subtitle {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-header::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 25%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 75%
  );
  animation: shine 6s infinite linear;
  z-index: 0;
}

@keyframes shine {
  100% {
    transform: translateX(100%);
  }
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.highlight {
  color: var(--secondary);
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 900;
  color: var(--tertiary);
  margin-bottom: 3rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  border-radius: var(--radius);
  font-weight: 900;
  font-size: 1.1rem;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  will-change: transform;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(217, 119, 6, 0.3);
}

.cta-icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.cta-button:hover .cta-icon {
  transform: translateX(0.5rem);
}

/* Benefits Section */
.section-benefits {
  padding: 4rem 1rem;
  margin-top: -2rem;
  background: var(--gray-100);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 1fr; /* Critical for equal row heights */
  gap: 2rem;
  align-items: stretch; /* Force vertical stretching */
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.benefit-card {
  height: 100%;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition);
}

/* Add hover effect for better UX */
.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Add decorative element */
.benefit-card::after {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  text-align: center;
  position: relative;
}

/* Position last two items */
.benefit-card:nth-child(4) {
  grid-column: 2; /* Center first item of second row */
}

.benefit-card:nth-child(5) {
  grid-column: 3; /* Center second item of second row */
}

.card-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}
/* Alignment Insurance */
.section-header {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 2rem;
}

.card-icon {
  height: 100px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  min-height: 3.5em; /* 2 lines of text */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin: 0 0 1rem;
  line-height: 1.4;
  padding: 0 1rem;
}

.card-text {
  line-height: 1.8;
  max-width: 280px;
  font-weight: 500;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
  padding: 0 1rem;
  margin: 0;
}

/* Contact Section */
.section-contact {
  background: var(--dark);
  color: white;
  padding: 4rem 1rem 4rem 100px;
}

#contact-heading {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

#contact-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 410px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  text-align: right;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
}
.address {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.8;
}

.contact-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: var(--secondary);
}

.phone-numbers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phone-numbers a {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;

  text-decoration: none;
  transition: color 0.3s ease;
  text-align: center;
  margin-left: 1rem;
}

.phone-numbers a:hover {
  color: var(--secondary);
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Mobile CTA Bar */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.5rem;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-bar.hidden {
  transform: translateY(100%);
}

.cta-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  max-width: 400px;
  margin: 0 auto;
}

.cta-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  background: linear-gradient(145deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.3); /* Added border */
}

.cta-icon {
  width: 28px;
  height: 28px;
  min-width: 28px; /* Prevent compression */
  min-height: 28px;
  fill: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Enhanced WhatsApp styling */
.cta-link:nth-child(2) {
  background: linear-gradient(145deg, #1a7947, /* Darker green */ #25d366);
}

/* Hover & Active States */
.cta-link:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Add subtle animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.cta-link:nth-child(1) {
  animation: pulse 3s ease-in-out infinite;
}

/* Hide on desktop */
@media (min-width: 769px) {
  .cta-bar {
    display: none;
  }
}
/* Responsive Design */
@media (max-width: 768px) {
  .logo img {
    width: clamp(45px, 25vw, 65px); /* Fluid scaling between 100-120px */
  }

  .header-nav {
    top: 0.3rem;
    left: 0.3rem;
  }

  .hero {
    min-height: 53vh;
    padding: 3rem 1rem 2rem;
  }

  .contact-nav {
    display: none;
  }

  .hero {
    background: url("../images/car-battery.webp") center/cover;
    background-color: rgba(0, 0, 0, 0.15);
    background-blend-mode: multiply;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    margin-bottom: 2rem;
    padding-top: 1.3rem; /* Space from logo */
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .cta-button {
    padding: 1rem 2rem;
    font-size: 0.7rem;
    transform: scale(0.9); /* Proportional scaling */
  }
  .cta-icon {
    width: 0.8rem;
    height: 1rem;
  }

  .section-header {
    border-radius: 12px;
    text-align: center;
    margin: 0 auto 2rem;
    padding-bottom: 1rem;
    width: 100%;
  }

  .section-contact {
    padding: 4rem 1rem;
  }

  .contact-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
  }

  .address {
    text-align: center;
    font-size: 1rem;
  }

  .phone-numbers {
    align-items: center;
  }

  .phone-numbers a {
    margin-left: 0;
    font-size: 1.1rem;
  }

  .contact-icon {
    margin-bottom: 0.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr; /* Force single column */
    grid-auto-rows: auto; /* Allow natural row heights */
    gap: 1.5rem; /* Adjust vertical spacing */
  }

  .benefit-card {
    width: 100%; /* Full width containment */
    margin-left: 0 !important; /* Remove any horizontal offset */
    min-height: auto; /* Allow natural height */
  }

  .benefit-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }

  .map-container {
    height: 300px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1025px) {
  .contact-container {
    flex-direction: row;
  }

  .contact-info {
    width: 45%;
  }

  .map-container {
    width: 55%;
    height: 500px;
  }

  .benefits-grid {
    grid-template-rows: auto auto; /* Explicit row definition */
  }

  .benefit-card {
    margin-left: 60px;
  }
  .benefit-card:nth-child(4) {
    grid-row: 2;
    grid-column: 3;
  }

  .benefit-card:nth-child(5) {
    grid-row: 2;
    grid-column: 2;
  }

  .benefit-card:nth-child(6) {
    grid-row: 2;
    grid-column: 1;
  }
}
