/* MG SAMKO Dealer Website - Main Stylesheet */

/* CSS Custom Properties */
:root {
  /* Colors */
  --mg-black: #000000;
  --mg-white: #FFFFFF;
  --mg-red: #E10012;
  --mg-blue: #29C5E8;
  --mg-green: #28542E;
  --mg-petrol: #6882E7;
  --mg-grey: #696969;
  --mg-light-grey: #AEAEAE;
  --mg-bg-grey: #F7F7F7;

  /* Fuel Type Colors */
  --fuel-electric: #4CAF50; /* Zielony - czysta energia */
  --fuel-hybrid: #2196F3; /* Niebieski - technologia */
  --fuel-petrol: #F44336; /* Czerwony - spalanie */
  --fuel-diesel: #212121; /* Czarny - standard paliw */

  /* Typography */
  --font-primary: 'FavoritStd', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Layout */
  --container-max: 1440px;
  --gutter: 40px;
  --border-radius: 8px;

  /* Breakpoints */
  --mobile-max: 543px;
  --tablet-min: 544px;
  --tablet-max: 920px;
  --desktop-min: 921px;
  --large-min: 1440px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--mg-black);
  background-color: var(--mg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Font Faces */
@font-face {
  font-family: 'FavoritStd';
  src: url('../fonts/FavoritStd-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FavoritStd';
  src: url('../fonts/FavoritStd-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FavoritStd';
  src: url('../fonts/FavoritStd-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FavoritStd';
  src: url('../fonts/FavoritStd-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.6875rem);
}

h2 {
  font-size: clamp(2.1875rem, 4vw, 3.75rem);
}

h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h4 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h5 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h6 {
  font-size: clamp(1.125rem, 1.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--mg-red);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-primary);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 48px;
}

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

.btn-primary:hover {
  background-color: #c1000f;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--mg-black);
  border: 2px solid var(--mg-black);
}

.btn-secondary:hover {
  background-color: var(--mg-black);
  color: var(--mg-white);
}

.btn-outline {
  background-color: transparent;
  color: var(--mg-white);
  border: 2px solid var(--mg-white);
}

.btn-outline:hover {
  background-color: var(--mg-white);
  color: var(--mg-black);
}

/* Sections */
section {
  padding: 80px 0;
}

.section-sm {
  padding: 40px 0;
}

.section-lg {
  padding: 120px 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--mg-white);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mg-black);
}

.logo img {
  height: 40px;
  margin-right: 12px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-weight: 500;
  color: var(--mg-black);
  position: relative;
  transition: color var(--transition-fast);
}

.nav__link:hover {
  color: var(--mg-red);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--mg-red);
  transition: width var(--transition-fast);
}

.nav__link:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--mg-black);
  transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__slide.active {
  opacity: 1;
  visibility: visible;
}

.hero__slide .container {
  width: 100%;
  max-width: var(--container-max);
}

.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
  z-index: -1;
}

.hero__content {
  text-align: center;
  color: var(--mg-white);
  max-width: 800px;
}

.hero__slide .hero__content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hero__slide.active .hero__content {
  opacity: 1;
  transform: translateY(0);
}

.hero__title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 300;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero__subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 400;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero Navigation Arrows */
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: var(--mg-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 10;
  backdrop-filter: blur(5px);
}

.hero__arrow:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.hero__arrow--prev {
  left: 20px;
}

.hero__arrow--next {
  right: 20px;
}

/* Hero Dots Navigation */
.hero__dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.hero__dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.hero__dot.active {
  background-color: var(--mg-white);
  width: 36px;
  border-radius: 6px;
}

/* Model Cards */
.model-card {
  background-color: var(--mg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.model-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.model-card__image {
  position: relative;
  padding-top: 50%; /* 2:1 aspect ratio (800x400) */
  overflow: hidden;
}

.model-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

.model-card:hover .model-card__image img {
  transform: scale(1.1);
}

.model-card__content {
  padding: 2rem;
}

.model-card__title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.model-card__fuel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--mg-grey);
  margin-bottom: 1rem;
}

.model-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.model-card__price small {
  font-size: 0.875rem;
  font-weight: 400;
  opacity: 0.7;
}

/* Fuel Type Icons */
.fuel-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
}

.fuel-icon--electric {
  background-color: var(--fuel-electric);
}

.fuel-icon--hybrid {
  background-color: var(--fuel-hybrid);
}

.fuel-icon--petrol {
  background-color: var(--fuel-petrol);
}

.fuel-icon--diesel {
  background-color: var(--fuel-diesel);
}

/* Footer */
.footer {
  background-color: var(--mg-black);
  color: var(--mg-white);
  padding: 60px 0 30px;
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__section h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--mg-white);
}

.footer__section ul {
  list-style: none;
}

.footer__section li {
  margin-bottom: 0.75rem;
}

.footer__section a {
  color: var(--mg-light-grey);
  transition: color var(--transition-fast);
}

.footer__section a:hover {
  color: var(--mg-red);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  color: var(--mg-light-grey);
  font-size: 0.875rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 920px) {
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }

  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero__arrow--prev {
    left: 10px;
  }

  .hero__arrow--next {
    right: 10px;
  }

  .hero__arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 543px) {
  .grid-cols-2 { grid-template-columns: 1fr; }
  .grid-cols-4 { grid-template-columns: 1fr; }

  section {
    padding: 60px 0;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero__arrow {
    width: 36px;
    height: 36px;
  }

  .hero__arrow--prev {
    left: 5px;
  }

  .hero__arrow--next {
    right: 5px;
  }

  .hero__dots {
    bottom: 20px;
    gap: 8px;
  }

  .hero__dot {
    width: 10px;
    height: 10px;
  }

  .hero__dot.active {
    width: 28px;
  }
}