/* MG SAMKO - Responsive Styles */

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
  .container {
    padding: 0 60px;
  }

  .hero__title {
    font-size: 5rem;
  }

  .model-card__content {
    padding: 3rem;
  }
}

/* Desktop (921px to 1439px) */
@media (min-width: 921px) and (max-width: 1439px) {
  .container {
    padding: 0 40px;
  }
}

/* Tablet (544px to 920px) */
@media (max-width: 920px) {
  section {
    padding: 60px 0;
  }

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

  .header__container {
    height: 70px;
  }

  .mobile-menu {
    top: 70px;
  }

  .hero {
    min-height: 500px;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .model-card__content {
    padding: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-card__icon {
    width: 60px;
    height: 60px;
  }

  .model-hero {
    min-height: 400px;
  }

  .model-hero__content {
    padding: 0 1rem;
  }

  .about__content {
    padding: 1rem;
  }

  .about__image {
    padding: 1rem;
  }

  .test-drive-form {
    padding: 2rem;
  }

  .opening-hours {
    padding: 1.5rem;
  }

  .lightbox__close {
    top: 1rem;
    right: 1rem;
  }
}

/* Mobile (543px and below) */
@media (max-width: 543px) {
  :root {
    --gutter: 20px;
  }

  section {
    padding: 40px 0;
  }

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

  .container {
    padding: 0 20px;
  }

  .header__container {
    height: 60px;
  }

  .logo img {
    height: 32px;
  }

  .logo span {
    font-size: 1.25rem;
  }

  .mobile-menu {
    top: 60px;
  }

  .mobile-menu__container {
    padding: 1.5rem;
  }

  .mobile-menu__link {
    font-size: 1.125rem;
  }

  .hero {
    min-height: 450px;
    text-align: center;
  }

  .hero__title {
    font-size: 2.25rem;
    letter-spacing: 1px;
  }

  .hero__subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

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

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

  .model-card {
    margin-bottom: 1rem;
  }

  .model-card__content {
    padding: 1.25rem;
  }

  .model-card__title {
    font-size: 1.5rem;
  }

  .model-card__price {
    font-size: 1.25rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-card__icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }

  .feature-card__icon img {
    width: 24px;
    height: 24px;
  }

  .feature-card h3 {
    font-size: 1.125rem;
  }

  .feature-card p {
    font-size: 0.875rem;
  }

  .grid.grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about__content {
    padding: 0;
  }

  .about__image {
    padding: 0;
  }

  .model-hero {
    min-height: 350px;
  }

  .model-hero__title {
    font-size: 2.5rem;
  }

  .model-hero__subtitle {
    font-size: 1rem;
  }

  .model-info {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }

  .model-info__value {
    font-size: 1.25rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .test-drive-form {
    padding: 1.5rem;
  }

  .test-drive-form h2 {
    font-size: 1.5rem;
  }

  .opening-hours {
    padding: 1rem;
  }

  .opening-hours__item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .map-container {
    height: 300px;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .cta-box {
    padding: 2.5rem 1.5rem;
  }

  .cta-box h2 {
    font-size: 1.75rem;
  }

  .cta-box p {
    font-size: 1rem;
  }

  .footer__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__section {
    text-align: center;
  }

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

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

  .alert {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
  }
}

/* Very Small Mobile (375px and below) */
@media (max-width: 375px) {
  .container {
    padding: 0 15px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .model-card__content {
    padding: 1rem;
  }

  .feature-card {
    padding: 1rem;
  }

  .test-drive-form {
    padding: 1rem;
  }

  .model-info {
    padding: 1rem;
  }

  .cta-box {
    padding: 2rem 1rem;
  }
}

/* Landscape Orientation */
@media (max-width: 920px) and (orientation: landscape) {
  .hero {
    min-height: 400px;
  }

  .mobile-menu {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .model-hero {
    min-height: 300px;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

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

  .hero__bg {
    animation: none;
  }

  .model-card:hover,
  .feature-card:hover,
  .gallery-item:hover {
    transform: none;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* This section can be uncommented if dark mode is desired in the future */
  /*
  :root {
    --mg-black: #ffffff;
    --mg-white: #000000;
    --mg-bg-grey: #1a1a1a;
    --mg-light-grey: #666666;
  }

  .header {
    background-color: var(--mg-white);
  }

  .footer {
    background-color: var(--mg-white);
    color: var(--mg-black);
  }

  .section-grey {
    background-color: var(--mg-bg-grey);
  }
  */
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .header,
  .mobile-menu,
  .footer,
  .hero__buttons,
  .btn,
  .mobile-menu-toggle {
    display: none !important;
  }

  .hero {
    height: auto;
    min-height: auto;
    padding: 2rem 0;
  }

  .hero__content {
    color: black;
  }

  .hero__overlay {
    display: none;
  }

  section {
    padding: 2rem 0;
    page-break-inside: avoid;
  }

  .model-card,
  .feature-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .contact-form,
  .test-drive-form {
    display: none;
  }

  .map-container {
    display: none;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  p, ul {
    orphans: 3;
    widows: 3;
  }
}