/* ===== MOBILE SERVICES STYLES ===== */
/* Mobile-specific adjustments for services-styles.css */

/* ===== MOBILE SERVICES CATEGORIES SECTION ===== */
@media (max-width: 768px) {
  .services-categories-section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: var(--font-size-h3);
    margin-bottom: 2rem;
    padding: 0 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 0.5rem;
  }

  /* Ensure cards have consistent width on mobile */
  .service-category-card {
    min-width: 0;
    width: 100%;
  }

  .service-category-card {
    padding: 1rem;
  }

  .service-category-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
  }

  .service-category-content h3 {
    font-size: var(--font-size-h4);
    margin-bottom: 0.75rem;
  }

  .service-category-content p {
    font-size: var(--font-size-paragraph);
    margin-bottom: 1rem;
  }

  .service-category-content .btn {
    padding: 0.75rem 1.25rem;
    font-size: var(--font-size-paragraph);
  }
}

/* ===== MOBILE SERVICE NAVIGATION BAR ===== */
@media (max-width: 768px) {
  .service-navigation-bar {
    padding: 0.75rem 0;
  }

  .service-nav {
    gap: 0.25rem;
    padding: 0 0.5rem;
  }

  .nav-item {
    padding: 0.5rem 0.75rem;
    min-width: 100px;
  }

  .nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
  }

  .nav-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .service-nav {
    gap: 0.2rem;
  }

  .nav-item {
    padding: 0.4rem 0.6rem;
    min-width: 90px;
  }

  .nav-icon {
    font-size: 1.1rem;
  }

  .nav-text {
    font-size: 0.65rem;
  }
}

/* ===== MOBILE SERVICES SECTION ===== */
@media (max-width: 768px) {
  .services-hero-section {
    padding: 2rem 0;
    margin: 0;
  }

  .services-hero-content {
    text-align: center;
    padding: 0 1rem;
  }

  .services-hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4rem); /* Bigger hero font size for mobile */
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em; /* Reduced letter spacing for mobile */
  }

  .services-hero-content p {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Bigger hero subtitle for mobile */
    max-width: 100%;
    margin-bottom: 0;
  }

  .services-members-section {
    margin-top: 0;
  }

  .service-member-card {
    flex-direction: column !important;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    margin-bottom: 2.5rem;
    max-width: 100%;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .service-member-card.reverse {
    flex-direction: column !important;
  }

  .service-member-photo {
    order: -1;
    flex: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .service-member-photo img {
    width: 100%;
    height: 200px; /* Reduced from 500px for mobile */
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    background: var(--section-light);
  }

  .service-member-info {
    text-align: center;
    flex: 1;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .member-header {
    margin-bottom: 1rem;
  }

  .member-title {
    margin-bottom: 0.75rem;
  }

  .service-tag {
    font-size: var(--font-size-footnote);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
  }

  .member-header h2 {
    font-size: var(--font-size-h2); /* Bigger header font size for mobile */
    margin-bottom: 0.75rem;
    color: var(--primary);
    line-height: 1.3;
  }

  .member-intro {
    font-size: var(--font-size-paragraph);
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
  }

  .member-specialties {
    margin-top: 1rem;
  }

  .member-specialties h3 {
    font-size: var(--font-size-h4);
    margin-bottom: 0.75rem;
    color: var(--primary);
  }

  .specialties-list {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 100%;
    margin: 0;
  }

  .specialty-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
  }

  .specialty-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
  }

  .specialty-text {
    font-size: var(--font-size-h3);
    color: var(--text-dark);
    line-height: 1.5;
    text-align: left;
  }
}

/* ===== MOBILE SERVICE DETAIL ===== */
@media (max-width: 768px) {
  .service-detail-section {
    padding: 2rem 0;
    margin: 1rem 0;
  }

  .service-detail-container {
    max-width: 100%;
    padding: 0 1rem;
  }

  .service-detail-header {
    margin-bottom: 2rem;
  }

  .service-detail-header h1 {
    font-size: var(--font-size-h2);
    margin-bottom: 1rem;
  }

  .service-detail-header .description {
    font-size: var(--font-size-paragraph);
    margin-bottom: 1rem;
  }

  .service-detail-image {
    height: 15rem; /* 240px */
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .service-detail-content {
    font-size: var(--font-size-paragraph);
    line-height: 1.7;
  }

  .service-detail-content h2 {
    font-size: var(--font-size-h3);
    margin-top: 2rem;
    margin-bottom: 1rem;
  }

  .service-detail-content h3 {
    font-size: var(--font-size-h4);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .service-detail-content p {
    margin-bottom: 1rem;
  }

  .service-detail-content ul, .service-detail-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
  }

  .service-detail-content li {
    margin-bottom: 0.5rem;
  }

  .service-detail-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .service-detail-tags h4 {
    font-size: var(--font-size-h4);
    margin-bottom: 1rem;
  }

  .service-detail-navigation {
    margin-top: 2rem;
  }

  .service-detail-navigation .btn {
    width: 100%;
    text-align: center;
    padding: 1rem;
  }
}

/* ===== MOBILE SERVICE ICONS ===== */
@media (max-width: 768px) {
  .service-icon {
    width: 3rem; /* 48px */
    height: 3rem; /* 48px */
    margin-bottom: 0.75rem;
  }

  .service-card .icon {
    width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    margin-bottom: 0.75rem;
  }
}

/* ===== SMALL MOBILE ADJUSTMENTS ===== */
@media (max-width: 480px) {
  .services-section {
    padding: 1.5rem 0;
    margin: 0.75rem 0;
  }

  .services-container {
    padding: 0 0.75rem;
  }



  .service-member-card {
    padding: 1rem 0.75rem;
    margin-bottom: 2rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .service-member-photo img {
    height: 180px;
    padding: 0.75rem;
  }

  .service-member-info {
    padding: 0 0.25rem;
  }

  .member-header h2 {
    font-size: var(--font-size-h4);
  }

  .member-intro {
    font-size: var(--font-size-footnote);
  }

  .member-specialties h3 {
    font-size: var(--font-size-h4);
  }

  .service-detail-section {
    padding: 1.5rem 0;
    margin: 0.75rem 0;
  }

  .service-detail-container {
    padding: 0 0.75rem;
  }

  .service-detail-image {
    height: 12rem; /* 192px */
  }

  .service-detail-content h2 {
    font-size: var(--font-size-h4);
  }

  .service-detail-content h3 {
    font-size: var(--font-size-h5);
  }

  .service-card img {
    height: 8rem; /* 128px */
  }

  .service-card {
    padding: 1rem;
  }

  .team-cta-section {
    padding: 1.5rem 0.75rem;
    margin: 0.75rem 0;
  }

  .team-cta-section h2 {
    font-size: var(--font-size-h3);
  }

  .team-cta-section .cta-buttons {
    max-width: 250px;
  }
}

/* ===== MOBILE TEAM CTA SECTION (used in services page) ===== */
@media (max-width: 768px) {
  .team-cta-section {
    padding: 2rem 1rem;
    margin: 1rem 0;
    text-align: center;
  }

  .team-cta-section h2 {
    font-size: var(--font-size-h2);
    margin-bottom: 1rem;
    color: var(--text-dark);
  }

  .team-cta-section p {
    font-size: var(--font-size-paragraph);
    margin-bottom: 1.5rem;
    color: var(--text-light);
    max-width: 100%;
    line-height: 1.6;
  }

  .team-cta-section .cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    max-width: 300px;
    margin: 0 auto;
  }

  .team-cta-section .btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-paragraph);
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
  }

  .team-cta-section .btn-primary {
    background: var(--primary);
    color: white;
  }

  .team-cta-section .btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
  }
}

/* ===== MOBILE ORTHOPEDIC SERVICES SPECIFIC STYLES ===== */
@media (max-width: 768px) {
  /* Override for orthopedic page mobile layout - keep horizontal */
  /* Reset to single column for mobile */
  .services_orthopedic .container {
    display: block !important;
    flex-wrap: none !important;
    gap: 0 !important;
    justify-content: flex-start !important;
  }
  
  /* Maximum specificity override to match desktop CSS */
  body .services_orthopedic .container {
    display: block !important;
    flex-wrap: none !important;
    gap: 0 !important;
    justify-content: flex-start !important;
  }
  
  .services_orthopedic .container .service-member-card {
    flex-direction: row !important;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 1.5rem;
    margin-top: 0.75rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    width: 100% !important; /* Full width for mobile */
    max-width: none !important;
  }

  .services_orthopedic > .container > .service-member-card > .service-member-photo {
    flex: none !important;
    width: 90px !important; /* Much smaller photos for mobile */
    height: 90px !important;
    order: 1;
    margin: 0 !important; /* Remove auto margin */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 90px !important;
    min-width: 90px !important;
    align-self: center !important; /* Center vertically within the card */
  }

  .services_orthopedic > .container > .service-member-card > .service-member-photo > img {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
    border-radius: var(--radius-md) !important;
    max-width: 90px !important;
    min-width: 90px !important;
    flex-shrink: 0 !important;
  }

  .services_orthopedic .container .service-member-info {
    flex: 1;
    order: 2;
    padding: 0;
    text-align: left;
    width: 100%;
  }

  .services_orthopedic .container .service-member-info h2 {
    color: var(--primary);
    font-size: var(--font-size-h4);
    margin-bottom: 0.75rem;
    font-weight: 700;
  }

  .services_orthopedic .container .member-intro {
    color: var(--text-dark);
    line-height: 1.5;
    font-size: var(--font-size-paragraph);
  }

  .services_orthopedic .container .member-intro p {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* Ensure single column layout for very small screens */
  .services_orthopedic .container {
    display: block !important;
    flex-wrap: none !important;
    gap: 0 !important;
    justify-content: flex-start !important;
  }
  
  /* Maximum specificity override for small mobile */
  body .services_orthopedic .container {
    display: block !important;
    flex-wrap: none !important;
    gap: 0 !important;
    justify-content: flex-start !important;
  }
  
  .services_orthopedic .container .service-member-card {
    padding: 0.75rem;
    margin-bottom: 1rem;
    gap: 0.75rem;
    width: 100% !important;
    max-width: none !important;
  }

  .services_orthopedic .container .service-member-photo {
    width: 60px; /* Even smaller for very small screens */
    height: 60px;
  }

  .services_orthopedic .container .service-member-info h2 {
    font-size: var(--font-size-h5);
    margin-bottom: 0.5rem;
  }

  .services_orthopedic .container .member-intro {
    font-size: var(--font-size-paragraph);
  }

  /* Mobile navigation bar for orthopedic page */
  .services_orthopedic .service-navigation-bar {
    padding: 0.5rem 0;
  }

  .services_orthopedic .service-nav {
    gap: 0.2rem;
    padding: 0 0.25rem;
  }

  .services_orthopedic .nav-item {
    padding: 0.4rem 0.6rem;
    min-width: 80px;
    font-size: 0.7rem;
  }
}
