/* ============================================
   Responsive Styles
   Diamond Mountain Centers LP
   ============================================ */

/* ========== Mobile First Approach ========== */

/* Mobile devices (default styles in main.css) */

/* ========== Tablet (768px and up) ========== */

@media (min-width: 768px) {
  /* Typography */
  h1 {
    font-size: var(--font-size-5xl);
  }

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

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

  /* Header */
  .header__container {
    padding: 0 var(--container-padding-tablet);
  }

  /* Grid columns for tablet */
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

  /* Hero */
  .hero {
    min-height: 500px;
  }

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

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

/* ========== Desktop (1024px and up) ========== */

@media (min-width: 1024px) {
  /* Container */
  .container {
    padding: 0 var(--container-padding-desktop);
  }

  /* Header */
  .header__container {
    padding: 0 var(--container-padding-desktop);
  }

  /* Grid columns for desktop */
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }

  /* Hero */
  .hero {
    min-height: 600px;
  }

  /* Footer */
  .footer__main {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .footer__legal {
    margin-top: 0;
  }
}

/* ========== Mobile Specific (max-width: 767px) ========== */

@media (max-width: 767px) {
  /* Header adjustments */
  .header__container {
    height: var(--header-height-mobile);
  }

  .header__logo-main {
    font-size: var(--font-size-xl);
  }

  .header__logo-tagline {
    font-size: var(--font-size-xs);
  }

  /* Show mobile menu toggle */
  .nav__toggle {
    display: flex;
  }

  /* Hide desktop navigation */
  .nav__list {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    gap: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .nav__list--active {
    transform: translateX(0);
  }

  .nav__item {
    border-bottom: 1px solid var(--color-border-light);
  }

  .nav__item:last-child {
    border-bottom: none;
  }

  .nav__link {
    padding: var(--spacing-sm) 0;
  }

  .nav__cta {
    flex-direction: column;
    align-items: stretch;
    margin-top: var(--spacing-sm);
  }

  .nav__phone {
    justify-content: center;
    padding: var(--spacing-sm);
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-md);
  }

  /* Hero adjustments */
  .hero {
    min-height: 500px;
    margin-top: var(--header-height-mobile);
  }

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

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

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
  }

  /* Page header */
  .page-header {
    margin-top: var(--header-height-mobile);
    padding: var(--spacing-xl) 0;
  }

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

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

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

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

  /* Sections */
  .section {
    padding: var(--spacing-xl) 0;
  }

  /* Cards */
  .service-card__image {
    height: 200px;
  }

  /* Cookie banner */
  .cookie-banner__container {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__content {
    min-width: auto;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }

  /* Cookie modal */
  .cookie-modal {
    padding: var(--spacing-sm);
  }

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

  .cookie-modal__title {
    font-size: var(--font-size-xl);
  }

  .cookie-modal__actions {
    flex-direction: column;
  }

  .cookie-modal__actions .btn {
    width: 100%;
  }

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

  .footer__main {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

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

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

  /* Forms */
  .btn {
    width: 100%;
  }

  /* Contact info */
  .contact-info {
    padding: var(--spacing-md);
  }

  /* Map */
  .map-container {
    height: 300px;
  }

  /* Legal content */
  .legal-content {
    padding: var(--spacing-xl) var(--spacing-sm);
  }
}

/* ========== Small Mobile (max-width: 480px) ========== */

@media (max-width: 480px) {
  /* Further reduce font sizes for very small screens */
  .hero__title {
    font-size: var(--font-size-2xl);
  }

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

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

  /* Reduce spacing */
  .section {
    padding: var(--spacing-lg) 0;
  }

  /* Cookie banner */
  .cookie-banner {
    padding: var(--spacing-sm);
  }

  .cookie-banner__title {
    font-size: var(--font-size-base);
  }

  .cookie-banner__text {
    font-size: var(--font-size-xs);
  }
}

/* ========== Landscape Mobile ========== */

@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: 400px;
  }

  .page-header {
    padding: var(--spacing-md) 0;
  }
}

/* ========== Print Styles ========== */

@media print {
  /* Hide non-essential elements */
  .header,
  .nav,
  .cookie-banner,
  .cookie-modal,
  .btn,
  .hero__cta {
    display: none !important;
  }

  /* Adjust layout for print */
  .hero {
    margin-top: 0;
    min-height: auto;
    padding: var(--spacing-lg) 0;
  }

  .page-header {
    margin-top: 0;
  }

  /* Ensure content is readable */
  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 20pt;
  }

  h3 {
    font-size: 16pt;
  }

  /* Remove shadows and backgrounds */
  .card,
  .service-card,
  .contact-info {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* ========== Reduced Motion ========== */

@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-blue: #000080;
    --color-primary-teal: #006666;
    --color-border-light: #000000;
    --color-border-medium: #000000;
  }

  .btn {
    border-width: 2px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    border-width: 2px;
  }
}
