/* MediCare Hub - Responsive Styles */

/* Mobile Navigation */
@media (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition-normal);
    z-index: 1000;
  }

  .nav__menu.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--space-8);
    text-align: center;
  }

  .nav__link {
    font-size: var(--text-xl);
    font-weight: 600;
  }

  .nav__toggle,
  .nav__close {
    display: block;
  }

  .nav__close {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    font-size: var(--text-2xl);
  }
}

/* Tablet Styles */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section__title {
    font-size: var(--text-2xl);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__description {
    font-size: var(--text-base);
  }

  .hero__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__img,
  .hero__placeholder {
    height: 300px;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .service__card {
    padding: var(--space-6);
  }

  .doctors__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .doctor__image {
    height: 250px;
  }

  .doctor__info {
    padding: var(--space-6);
  }

  .articles__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .sports__content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .sports__categories {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .sports__category {
    padding: var(--space-6);
  }

  .contact__content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .form {
    padding: var(--space-6);
  }

  .footer__content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer__legal {
    justify-content: center;
  }
}

/* Mobile Styles */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .nav {
    height: 70px;
  }

  .nav__logo h2 {
    font-size: var(--text-xl);
  }

  .nav__logo span {
    font-size: var(--text-xs);
  }

  .section {
    padding: var(--space-10) 0;
  }

  .section__header {
    margin-bottom: var(--space-8);
  }

  .section__title {
    font-size: var(--text-xl);
  }

  .section__description {
    font-size: var(--text-base);
  }

  .hero {
    padding-top: 70px;
    min-height: 90vh;
  }

  .hero__title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
  }

  .hero__description {
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
  }

  .hero__img,
  .hero__placeholder {
    height: 250px;
  }

  .hero__placeholder i {
    font-size: var(--text-4xl);
  }

  .hero__placeholder p {
    font-size: var(--text-base);
  }

  .service__card {
    padding: var(--space-4);
  }

  .service__icon {
    width: 60px;
    height: 60px;
    font-size: var(--text-xl);
  }

  .service__title {
    font-size: var(--text-lg);
  }

  .doctor__image {
    height: 200px;
  }

  .doctor__info {
    padding: var(--space-4);
  }

  .doctor__name {
    font-size: var(--text-lg);
  }

  .doctor__specialty {
    font-size: var(--text-base);
  }

  .article__content {
    padding: var(--space-4);
  }

  .article__title {
    font-size: var(--text-base);
  }

  .sports__category {
    padding: var(--space-4);
  }

  .sports__icon {
    width: 60px;
    height: 60px;
    font-size: var(--text-xl);
  }

  .sports__category h3 {
    font-size: var(--text-lg);
  }

  .sports__tips {
    padding: var(--space-4);
  }

  .sports__tips h3 {
    font-size: var(--text-lg);
  }

  .contact__icon {
    width: 50px;
    height: 50px;
    font-size: var(--text-lg);
  }

  .contact__details h4 {
    font-size: var(--text-base);
  }

  .form {
    padding: var(--space-4);
  }

  .form__input {
    padding: var(--space-2) var(--space-3);
  }

  .footer {
    padding: var(--space-12) 0 var(--space-6);
  }

  .footer__section h3,
  .footer__section h4 {
    font-size: var(--text-lg);
  }

  .modal__content {
    margin: var(--space-4);
    max-height: calc(100vh - 2rem);
  }

  .modal__header {
    padding: var(--space-4);
  }

  .modal__header h2 {
    font-size: var(--text-xl);
  }

  .modal__body {
    padding: var(--space-4);
  }

  .scroll-top {
    width: 45px;
    height: 45px;
    bottom: var(--space-4);
    right: var(--space-4);
    font-size: var(--text-base);
  }
}

/* Large Desktop Styles */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }

  .hero__title {
    font-size: 4rem;
  }

  .section__title {
    font-size: var(--text-5xl);
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }

  .doctors__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-16);
  }

  .articles__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }
}

/* Print Styles */
@media print {
  .header,
  .nav__toggle,
  .nav__close,
  .scroll-top,
  .modal {
    display: none !important;
  }

  .main {
    margin-top: 0;
  }

  .section {
    padding: var(--space-4) 0;
    page-break-inside: avoid;
  }

  .hero {
    min-height: auto;
    padding-top: 0;
  }

  .service__card,
  .doctor__card,
  .article__card {
    box-shadow: none;
    border: 1px solid var(--gray-300);
    page-break-inside: avoid;
  }

  .btn {
    display: none;
  }

  .footer {
    background-color: transparent;
    color: var(--gray-900);
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --primary-dark: #000080;
    --gray-600: #000000;
    --gray-700: #000000;
    --gray-800: #000000;
    --gray-900: #000000;
  }

  .btn--secondary {
    border-width: 3px;
  }

  .form__input {
    border-width: 2px;
  }

  .service__card,
  .doctor__card,
  .article__card {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --white: #0f172a;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
  }

  .header {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--gray-200);
  }

  .hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  }

  .service__card,
  .doctor__card,
  .article__card,
  .sports__category,
  .sports__tips,
  .form {
    background-color: var(--gray-50);
    border-color: var(--gray-200);
  }

  .modal__content {
    background-color: var(--gray-50);
  }
  
  /* Article Page Mobile Styles */
  .article-content {
    margin: 1rem;
    border-radius: 12px;
  }
  
  .article-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .article-body h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
  }
  
  .article-body h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem 0;
    padding-left: 0.75rem;
  }
  
  .article-header {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .article-body {
    padding: 2rem 1.5rem;
  }
  
  .article-image {
    height: 250px;
  }
  
  .article-excerpt {
    font-size: 1.125rem;
    padding: 1.25rem;
  }
  
  .article-body p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .article-body li {
    font-size: 1rem;
    padding-left: 1.5rem;
  }
  
  .article-footer {
    padding: 1.5rem;
    margin-top: 2rem;
  }
  
  .article-footer::before {
    left: 1.5rem;
    top: -12px;
    font-size: 1.25rem;
    padding: 0.375rem;
  }
}
