/* =============================================================
   styles.css — Cripar Auto Service
   Custom overrides on top of Tailwind CSS
   Design tokens, component styles, and animations
   ============================================================= */

/* ── CSS Custom Properties (Design Tokens) ─────────────────── */
:root {
  --color-red:       #E41E25;
  --color-navy:      #0B1C2E;
  --color-blue:      #0621b1;
  --color-gray-bg:   #F4F6F8;
  --color-text:      #111827;
  --color-muted:     #6B7280;
  --color-white:     #FFFFFF;

  --spacing-section: 80px;
  --spacing-gutter:  24px;
  --radius-none:     0px;

  --font-heading: 'Barlow', sans-serif;
  --font-body:    'Inter',  sans-serif;

  --transition-base: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base Resets ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
}

/* ── Typography Utilities ─────────────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.1;
  color: var(--color-navy);
}

.section-title-light {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.1;
  color: var(--color-white);
}

.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
}

.label-tag::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-red);
}

.label-tag-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-red);
}

.label-tag-light::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-red);
}

.section-header {
  text-align: center;
}

.section-header-light {
  text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────────── */

/* Primary — red filled, sharp corners */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 2px solid var(--color-red);
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-decoration: none;
}

.btn-primary:hover {
  background: #bf1019;
  border-color: #bf1019;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Outline — red border on dark bg */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-decoration: none;
}

.btn-outline:hover {
  border-color: #fff;
  color: #fff;
  transform: translateY(-1px);
}

/* Outline navy — for white backgrounds */
.btn-outline-navy {
  display: inline-block;
  background: transparent;
  color: var(--color-blue);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  border: 2px solid var(--color-blue);
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  text-decoration: none;
}

.btn-outline-navy:hover {
  background: var(--color-blue);
  color: #fff;
  transform: translateY(-1px);
}

/* White button — for featured pricing card */
.btn-white {
  display: inline-block;
  background: #fff;
  color: var(--color-red);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 28px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  text-decoration: none;
}

.btn-white:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Navbar ───────────────────────────────────────────────────── */
#navbar {
  transition: box-shadow var(--transition-base);
}

/* Shrink navbar on scroll — applied via JS */
#navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.logo{
    display: flex;
    align-items: center;
    max-width:12em;
}

/* Mobile menu height animation */
.mobile-menu {
  max-height: 0;
  transition: max-height 0.35s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* Hamburger → X transform */
#hamburger.active .ham-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger.active .ham-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
#hamburger.active .ham-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Active nav link indicator */
.nav-link.active {
  color: var(--color-red);
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-red);
}

/* ── Hero Section ─────────────────────────────────────────────── */
.hero-section {
  background-color: var(--color-blue);
}

/* Diagonal clip on the right image panel */
.hero-image-panel {
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Gradient overlay on top of image */
.hero-image-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-blue) 0%, transparent 40%);
  pointer-events: none;
}

/* Red slash accent — diagonal stripe */
.hero-slash {
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(228, 30, 37, 0.15) 40%,
    rgba(228, 30, 37, 0.15) 45%,
    transparent 45%
  );
}

/* ── Intro / Experience Badge ─────────────────────────────────── */
.experience-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 4px solid var(--color-red);
  padding-left: 16px;
}

/* ── Icon Boxes ───────────────────────────────────────────────── */
.icon-box-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #EFF6FF;
  color: var(--color-blue);
  flex-shrink: 0;
}

.icon-box-blue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-blue);
  color: #fff;
}

.icon-box-red {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--color-red);
  color: #fff;
  flex-shrink: 0;
}

/* ── Service Cards ────────────────────────────────────────────── */
.service-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: 0 12px 40px rgba(11, 28, 46, 0.12);
  transform: translateY(-4px);
}

.service-card-img {
  position: relative;
  overflow: hidden;
}

/* Numbered badge on service card image */
.service-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 10px;
  letter-spacing: 0.1em;
}

.service-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.read-more-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-red);
  text-decoration: none;
  transition: letter-spacing var(--transition-base);
  margin-top: auto;
}

.read-more-link:hover {
  letter-spacing: 0.12em;
}

/* ── Slider Arrows ────────────────────────────────────────────── */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--color-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition-base);
}

.slider-arrow:hover {
  background: #bf1019;
}

.slider-arrow-left  { left: -20px; }
.slider-arrow-right { right: -20px; }

/* Dark arrows for navy background */
.slider-arrow-dark {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.slider-arrow-dark:hover {
  background: var(--color-red);
  border-color: var(--color-red);
}

/* ── Why Choose Us: Feature Bullets ──────────────────────────── */
.feature-bullet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 10px 14px;
  border-left: 3px solid transparent;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.feature-bullet svg {
  color: var(--color-red);
}

.feature-bullet:hover {
  border-left-color: var(--color-red);
  background: #fff5f5;
}

/* ── Projects ─────────────────────────────────────────────────── */
.project-card {
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11,28,46,0.95) 0%, transparent 100%);
  padding: 24px;
  transform: translateY(10px);
  opacity: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ── Service Gallery Thumbnails ───────────────────────────────── */
.service-thumb {
  cursor: pointer;
}

.service-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(11,28,46,0.9) 0%, transparent 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 12px 10px;
}

/* Filter tabs */
.filter-tab {
  padding: 8px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  border: 2px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.filter-tab:hover,
.filter-tab.active-tab {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

/* ── Contact Form ─────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: var(--color-text);
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  border-radius: 0; /* Sharp corners */
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.form-input.error {
  border-color: var(--color-red);
}

.form-error {
  font-size: 0.73rem;
  color: var(--color-red);
  margin-top: 4px;
}

/* ── Testimonials ─────────────────────────────────────────────── */
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(228, 30, 37, 0.4);
}

/* Dots */
.testi-dot {
  width: 28px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: background var(--transition-base), width var(--transition-base);
}

.testi-dot.active-dot {
  background: var(--color-red);
  width: 40px;
}

/* ── Pricing Cards ────────────────────────────────────────────── */
.pricing-card {
  border: 2px solid #e5e7eb;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.pricing-card:hover {
  box-shadow: 0 12px 40px rgba(11,28,46,0.1);
  transform: translateY(-4px);
}

.pricing-card-featured {
  background: var(--color-blue);
  border-color: var(--color-blue);
  position: relative;
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(11,28,46,0.25);
}

.pricing-card-featured:hover {
  transform: scale(1.02) translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 16px;
}

.pricing-card-header {
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}

.pricing-card-featured .pricing-card-header {
  border-bottom-color: rgba(255,255,255,0.1);
}

/* Feature lists */
.pricing-features,
.pricing-features-light {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-feature,
.pricing-feature-light {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
}

.pricing-feature::before {
  content: '✓';
  font-weight: 800;
  color: var(--color-blue);
  width: 16px;
  flex-shrink: 0;
}

.pricing-feature.off {
  opacity: 0.35;
  text-decoration: line-through;
}

.pricing-feature.off::before {
  content: '✕';
  color: var(--color-muted);
}

.pricing-feature-light::before {
  content: '✓';
  font-weight: 800;
  color: var(--color-red);
  width: 16px;
  flex-shrink: 0;
}

.pricing-feature-light {
  color: rgba(255,255,255,0.75);
}

.pricing-feature-light.off {
  opacity: 0.3;
  text-decoration: line-through;
}

.pricing-feature-light.off::before {
  content: '✕';
  color: rgba(255,255,255,0.3);
}

/* ── Process Roadmap ──────────────────────────────────────────── */
.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
}

.process-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step-num {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.65rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.process-icon {
  width: 72px;
  height: 72px;
  background: #fff;
  border: 2px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base), transform var(--transition-base);
  box-shadow: 0 4px 16px rgba(11,28,46,0.08);
}

.process-step:hover .process-icon {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
  transform: scale(1.08);
}

/* ── Blog Cards ────────────────────────────────────────────────── */
.blog-card {
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 12px 40px rgba(11,28,46,0.1);
  transform: translateY(-4px);
}

.blog-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-category {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 6px;
}

.blog-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-blue);
  line-height: 1.35;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-red);
}

.footer-link {
  color: #9CA3AF;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition-base), padding-left var(--transition-base);
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-link::before {
  content: '›';
  color: var(--color-red);
  font-size: 1rem;
  line-height: 1;
}

.footer-link:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-social {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  transition: background var(--transition-base), color var(--transition-base);
}

.footer-social:hover {
  background: var(--color-red);
  color: #fff;
}

/* ── Counter Numbers ──────────────────────────────────────────── */
[data-counter] {
  transition: all 0.1s ease;
}

/* ── Scroll Reveal Animations ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delay utilities */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* ── Responsive Adjustments ───────────────────────────────────── */

/* Hero: hide clip on mobile for perf */
@media (max-width: 767px) {
  .hero-image-panel {
    clip-path: none;
    opacity: 0.25;
  }

  .slider-arrow-left  { left: 0; }
  .slider-arrow-right { right: 0; }

  .pricing-card-featured {
    transform: none;
  }
}

/* Tablet tweaks */
@media (min-width: 768px) and (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Utility: hide scrollbar on slider tracks ─────────────────── */
.slider-overflow {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-overflow::-webkit-scrollbar {
  display: none;
}
