/* ============================================
   Mi Ranchito - Responsive Stylesheet
   Breakpoints: 1200px, 992px, 768px, 576px
   ============================================ */

/* ============================================
   LARGE DESKTOP (max-width: 1200px)
   ============================================ */
@media (max-width: 1200px) {
  :root {
    --container-width: 100%;
  }

  .nav__cta {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer__grid > *:last-child {
    grid-column: 1 / -1;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* ============================================
   TABLET / SMALL DESKTOP (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {
  :root {
    --section-padding: 60px;
  }

  /* Typography */
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  /* Hero */
  .hero__title {
    font-size: var(--text-5xl);
  }

  .page-hero__title {
    font-size: var(--text-4xl);
  }

  /* Navigation */
  .nav__list {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__mobile {
    display: block;
  }

  /* Featured Grid */
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About Preview */
  .about-preview {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .about-preview__image {
    order: -1;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Location Grid */
  .location-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .location-map iframe {
    height: 350px;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
    text-align: center;
  }

  .footer__social {
    justify-content: center;
  }

  .footer__grid > *:last-child {
    grid-column: auto;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  /* Menu Grid */
  .menu-grid {
    grid-template-columns: 1fr;
  }

  /* Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  /* Order Options */
  .order-options {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* About Story */
  .about-story {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .about-story--reverse {
    direction: ltr;
  }

  .about-story__image {
    order: -1;
  }

  /* About Values */
  .about-values {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* ============================================
   MOBILE LANDSCAPE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: 50px;
    --spacing-lg: 20px;
  }

  /* Typography */
  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  /* Hero */
  .hero {
    min-height: 90vh;
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

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

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

  /* Page Hero */
  .page-hero {
    min-height: 40vh;
  }

  .page-hero__title {
    font-size: var(--text-3xl);
  }

  .page-hero__subtitle {
    font-size: var(--text-base);
  }

  /* Section Header */
  .section__header {
    margin-bottom: var(--spacing-2xl);
  }

  /* Featured Grid */
  .featured-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
  }

  .footer__bottom-content {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  /* CTA */
  .cta__title {
    font-size: var(--text-3xl);
  }

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

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

  /* Menu Category */
  .menu-category__header {
    flex-direction: column;
    text-align: center;
  }

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

  /* Menu Item */
  .menu-item {
    flex-direction: column;
    text-align: center;
  }

  .menu-item__image {
    width: 100%;
    height: 200px;
    margin: 0 auto;
  }

  .menu-item__header {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  /* Contact Info Card */
  .contact-info__card {
    flex-direction: column;
    text-align: center;
  }

  .contact-info__icon {
    margin: 0 auto;
  }

  /* Form Row */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Order Card */
  .order-card {
    padding: var(--spacing-xl);
  }

  /* About Preview */
  .about-preview__accent {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: var(--spacing-md);
    display: inline-block;
  }

  /* Value Card */
  .value-card {
    padding: var(--spacing-lg);
  }

  /* Error Page */
  .error-page__code {
    font-size: 5rem;
  }

  /* Back to Top */
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
}

/* ============================================
   MOBILE PORTRAIT (max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
  :root {
    --section-padding: 40px;
    --spacing-md: 12px;
  }

  /* Container */
  .container {
    padding: 0 var(--spacing-md);
  }

  /* Typography */
  h1 {
    font-size: var(--text-2xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  /* Hero */
  .hero__badge {
    font-size: var(--text-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__content {
    padding: var(--spacing-md);
  }

  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: var(--text-sm);
  }

  .btn--lg {
    padding: 14px 28px;
    font-size: var(--text-base);
  }

  /* Featured Card */
  .featured-card__image {
    height: 200px;
  }

  .featured-card__content {
    padding: var(--spacing-md);
  }

  /* Location Info */
  .location-info__item {
    flex-direction: column;
    text-align: center;
  }

  .location-info__icon {
    margin: 0 auto var(--spacing-sm);
  }

  /* Map */
  .location-map iframe {
    height: 280px;
  }

  /* Footer */
  .footer {
    padding-top: var(--spacing-2xl);
  }

  .footer__title {
    font-size: var(--text-base);
  }

  /* Contact Form */
  .contact-form {
    padding: var(--spacing-lg);
  }

  .contact-form__title {
    font-size: var(--text-xl);
  }

  /* Testimonial Card */
  .testimonial-card {
    padding: var(--spacing-lg);
  }

  .testimonial-card__quote {
    font-size: var(--text-base);
  }

  /* CTA */
  .cta__content {
    padding: var(--spacing-2xl) var(--spacing-md);
  }

  .cta__title {
    font-size: var(--text-2xl);
  }

  .cta__text {
    font-size: var(--text-base);
  }

  /* Menu Item */
  .menu-item {
    padding: var(--spacing-md);
  }

  .menu-item__image {
    height: 160px;
  }

  /* Order Card */
  .order-card__icon {
    width: 64px;
    height: 64px;
    font-size: var(--text-2xl);
  }

  /* Error Page */
  .error-page__code {
    font-size: 4rem;
  }

  .error-page__title {
    font-size: var(--text-2xl);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .header,
  .footer,
  .nav__mobile,
  .nav__overlay,
  .back-to-top,
  .hero__scroll {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  .hero,
  .page-hero {
    min-height: auto;
    padding: 20pt 0;
    background: none !important;
  }

  .hero__overlay,
  .page-hero__overlay,
  .cta__overlay {
    display: none;
  }

  .hero__title,
  .page-hero__title,
  .hero__subtitle,
  .page-hero__subtitle {
    color: #000;
  }

  .section {
    padding: 20pt 0;
  }

  .featured-grid,
  .testimonials-grid,
  .menu-grid,
  .order-options,
  .about-values {
    grid-template-columns: 1fr;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */
@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;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-primary: #C9A227;
    --color-secondary: #A00000;
    --color-text: #000000;
    --color-text-light: #333333;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  }

  .btn {
    border-width: 3px;
  }

  .form-input,
  .form-textarea {
    border: 2px solid var(--color-text);
  }
}

/* Dark Mode Support (if user prefers) */
@media (prefers-color-scheme: dark) {
  /* Uncomment below to enable dark mode
  :root {
    --color-text: #EAEAEA;
    --color-text-light: #AAAAAA;
    --color-background: #1A1A2E;
    --color-background-alt: #16213E;
  }
  */
}
