/* ============================================================
   responsive.css — Recovery Physiotherapy
   Mobile-First Responsive Styles
   Add this file to your folder and link it in demo.html
   AFTER demo.css:
   <link rel="stylesheet" href="demo.css">
   <link rel="stylesheet" href="responsive.css">  ← ADD THIS
   ============================================================ */

/* ── BASE MOBILE RESETS (applies to ALL screens) ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

iframe {
  max-width: 100%;
}

/* ── NAV — MOBILE ── */
@media (max-width: 768px) {

  /* Hide desktop nav links */
  .nav-links {
    display: none !important;
  }

  /* Show hamburger */
  .hamburger {
    display: flex !important;
  }

  /* Nav inner padding */
  .nav-inner {
    padding: 0 16px;
    height: 60px;
  }

  /* Logo text smaller */
  .nav-logo-text span:first-child {
    font-size: 0.88rem;
  }

  /* Mobile menu full width */
  .mobile-menu {
    top: 60px;
    padding: 8px 12px;
  }

  .mobile-menu a {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(10,124,110,0.08);
  }

  .mobile-menu a:last-child {
    border: none;
  }
}

/* ── SECTIONS — MOBILE ── */
@media (max-width: 768px) {
  section {
    padding: 48px 16px !important;
  }

  .container {
    padding: 0;
  }

  .section-title {
    font-size: 1.8rem !important;
  }

  .section-subtitle {
    font-size: 0.9rem !important;
  }

  .section-header {
    margin-bottom: 32px !important;
  }
}

/* ============================================================
   PAGE: HOME
   ============================================================ */

/* HERO — MOBILE */
@media (max-width: 768px) {
  .hero {
    padding: 60px 16px 40px !important;
    min-height: auto !important;
  }

  .hero-inner {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    gap: 32px !important;
    padding: 40px 0 20px !important;
  }

  .hero h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }

  .hero-qualifier {
    font-size: 0.82rem !important;
  }

  .hero p {
    font-size: 0.92rem !important;
    margin-bottom: 24px !important;
  }

  .hero-badge {
    font-size: 0.7rem !important;
    padding: 6px 12px !important;
  }

  .hero-actions {
    justify-content: center !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    max-width: 300px !important;
    justify-content: center !important;
  }

  .hero-stats {
    justify-content: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    margin-top: 28px !important;
  }

  .hero-stat strong {
    font-size: 1.8rem !important;
  }

  /* Hero image */
  .hero-image-wrap {
    justify-content: center !important;
  }

  .hero-image-card {
    width: 260px !important;
    height: 320px !important;
    border-radius: 16px 16px 0 0 !important;
  }

  /* Hide floating cards on mobile */
  .hero-floating {
    display: none !important;
  }

  /* Hero doctor name */
  .hero-doctor-name {
    font-size: 1rem !important;
    padding: 0 12px !important;
  }
}

/* SERVICES GRID — MOBILE */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .service-mini-card {
    padding: 20px 16px !important;
  }

  .service-mini-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 22px !important;
  }

  .service-mini-card h3 {
    font-size: 0.82rem !important;
  }

  .service-mini-card p {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 400px) {
  .services-grid {
    grid-template-columns: 1fr !important;
  }
}

/* WHY US — MOBILE */
@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .why-image-side {
    padding: 24px !important;
    border-radius: 16px !important;
  }

  .why-image-side h2 {
    font-size: 1.5rem !important;
  }

  .why-feature {
    padding: 14px !important;
  }

  .why-item {
    padding: 12px !important;
  }
}

/* TESTIMONIALS PREVIEW — MOBILE */
@media (max-width: 768px) {
  .testi-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .testi-card {
    padding: 20px !important;
  }

  .testi-text {
    font-size: 0.85rem !important;
  }
}

/* QUICK CONTACT STRIP — MOBILE */
@media (max-width: 768px) {
  .quick-contact {
    padding: 32px 16px !important;
  }

  .quick-contact-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 24px !important;
  }

  .qc-info {
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .quick-contact-inner .btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ============================================================
   PAGE: ABOUT
   ============================================================ */

@media (max-width: 768px) {
  .about-hero {
    padding: 90px 16px 48px !important;
  }

  .about-hero h1 {
    font-size: 2rem !important;
  }

  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .about-card-wrap {
    position: static !important;
  }

  .about-doc-photo {
    height: 260px !important;
  }

  .about-doc-meta {
    padding: 16px !important;
  }

  .about-section h2 {
    font-size: 1.4rem !important;
  }

  .about-section p {
    font-size: 0.88rem !important;
  }

  .skills-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .timeline {
    padding-left: 20px !important;
  }

  .timeline-item::before {
    left: -26px !important;
  }
}

/* ============================================================
   PAGE: SERVICES
   ============================================================ */

@media (max-width: 768px) {
  .services-hero {
    padding: 90px 16px 48px !important;
  }

  .services-hero h1 {
    font-size: 2rem !important;
  }

  /* Service cards stack vertically */
  .service-card-big {
    grid-template-columns: 1fr !important;
    direction: ltr !important;
  }

  .service-card-big:nth-child(even) {
    direction: ltr !important;
  }

  .service-sidebar {
    flex-direction: row !important;
    padding: 20px !important;
    text-align: left !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .service-icon-lg {
    font-size: 36px !important;
    flex-shrink: 0 !important;
  }

  .service-sidebar h3 {
    font-size: 1.1rem !important;
  }

  .service-content {
    padding: 20px !important;
  }

  .conditions-list {
    grid-template-columns: 1fr !important;
  }

  .service-tags {
    gap: 6px !important;
  }
}

/* ============================================================
   PAGE: APPOINTMENT
   ============================================================ */

@media (max-width: 768px) {
  .appt-hero {
    padding: 90px 16px 48px !important;
  }

  .appt-hero h1 {
    font-size: 2rem !important;
  }

  .appt-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .appt-form-wrap {
    padding: 20px 16px !important;
  }

  .appt-form-wrap h2 {
    font-size: 1.4rem !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
  }

  .form-group {
    margin-bottom: 14px !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px 14px !important;
  }

  .appt-sidebar {
    order: -1 !important; /* Show info first on mobile */
  }

  .appt-info-card {
    padding: 20px !important;
  }

  .timing-card {
    padding: 20px !important;
  }

  .timing-row {
    font-size: 0.82rem !important;
  }
}

/* ============================================================
   PAGE: TESTIMONIALS
   ============================================================ */

@media (max-width: 768px) {
  .testi-hero {
    padding: 90px 16px 48px !important;
  }

  .testi-hero h1 {
    font-size: 2rem !important;
  }

  .rating-overview {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 20px !important;
    text-align: center !important;
  }

  .rating-score {
    font-size: 3.5rem !important;
  }

  .testi-all-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .testi-full-card {
    padding: 20px !important;
  }

  .testi-full-card .testi-text {
    font-size: 0.85rem !important;
  }
}

/* ============================================================
   PAGE: BLOG / HEALTH TIPS
   ============================================================ */

@media (max-width: 768px) {
  .blog-hero {
    padding: 90px 16px 48px !important;
  }

  .blog-hero h1 {
    font-size: 2rem !important;
  }

  .blog-layout {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .blog-featured-img {
    height: 160px !important;
    font-size: 48px !important;
  }

  .blog-featured-body {
    padding: 20px !important;
  }

  .blog-featured-body h2 {
    font-size: 1.2rem !important;
  }

  .blog-grid-small {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .blog-small-img {
    height: 90px !important;
    font-size: 28px !important;
  }

  .blog-small-body {
    padding: 12px !important;
  }

  .blog-small-body h4 {
    font-size: 0.78rem !important;
  }

  .blog-sidebar {
    order: -1 !important; /* Show sidebar first on mobile */
  }

  /* Hide some sidebar widgets on very small screens */
  .blog-sidebar-widget:nth-child(4) {
    display: none;
  }
}

@media (max-width: 400px) {
  .blog-grid-small {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   PAGE: CONTACT
   ============================================================ */

@media (max-width: 768px) {
  .contact-hero {
    padding: 90px 16px 48px !important;
  }

  .contact-hero h1 {
    font-size: 2rem !important;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .contact-info-panel h2 {
    font-size: 1.5rem !important;
  }

  .contact-info-card {
    padding: 14px !important;
    gap: 12px !important;
  }

  .contact-info-card h4 {
    font-size: 0.85rem !important;
  }

  .contact-info-card p {
    font-size: 0.8rem !important;
  }

  .contact-form-panel {
    padding: 20px 16px !important;
  }

  .contact-form-panel h2 {
    font-size: 1.4rem !important;
  }

  /* Google Map iframe */
  .map-container iframe,
  .map-placeholder iframe {
    width: 100% !important;
    height: 220px !important;
  }

  .map-container {
    height: 220px !important;
  }
}

/* ============================================================
   PAGE: GALLERY
   ============================================================ */

@media (max-width: 768px) {
  .gallery-hero {
    padding: 90px 16px 48px !important;
  }

  .gallery-hero h1 {
    font-size: 2rem !important;
  }

  /* Filter buttons scroll horizontally */
  .gallery-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding-bottom: 8px !important;
    gap: 8px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none !important;
  }

  .gallery-filter-btn {
    flex-shrink: 0 !important;
    padding: 8px 16px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }

  /* 2 columns on mobile */
  .gallery-grid {
    columns: 2 !important;
    column-gap: 10px !important;
  }

  .gallery-item {
    margin-bottom: 10px !important;
  }

  .gallery-item img {
    min-height: 120px !important;
  }

  /* Stats 2x2 grid */
  .gallery-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 32px !important;
  }

  .gallery-stat-card {
    padding: 18px 12px !important;
  }

  .gallery-stat-num {
    font-size: 1.8rem !important;
  }

  .gallery-cta-box {
    padding: 28px 20px !important;
  }

  .gallery-cta-box h2 {
    font-size: 1.5rem !important;
  }

  /* Lightbox on mobile */
  .lightbox-inner {
    max-width: 95vw !important;
  }

  .lightbox-prev {
    left: -4px !important;
  }

  .lightbox-next {
    right: -4px !important;
  }

  .lightbox-close {
    top: -12px !important;
    right: -4px !important;
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    columns: 1 !important;
  }
}

/* ============================================================
   FOOTER — MOBILE
   ============================================================ */

@media (max-width: 768px) {
  footer {
    padding: 40px 16px 20px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 28px !important;
  }

  .footer-col h4 {
    font-size: 0.8rem !important;
    margin-bottom: 10px !important;
  }

  .footer-col ul li {
    margin-bottom: 8px !important;
  }

  .footer-col ul li a {
    font-size: 0.82rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 8px !important;
  }

  .footer-bottom p {
    font-size: 0.72rem !important;
  }

  .footer-desc {
    font-size: 0.82rem !important;
  }
}

/* ============================================================
   WHATSAPP FLOAT BUTTON — MOBILE
   ============================================================ */

@media (max-width: 768px) {
  .float-wa {
    bottom: 16px !important;
    right: 16px !important;
    width: 50px !important;
    height: 50px !important;
    font-size: 22px !important;
  }
}

/* ============================================================
   BUTTONS — MOBILE
   ============================================================ */

@media (max-width: 768px) {
  .btn {
    padding: 12px 22px !important;
    font-size: 0.85rem !important;
  }

  .btn-sm {
    padding: 8px 16px !important;
    font-size: 0.78rem !important;
  }
}

/* ============================================================
   TABLET (768px — 1024px)
   ============================================================ */

@media (min-width: 769px) and (max-width: 1024px) {

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }

  .hero h1 {
    font-size: 2.4rem !important;
  }

  .hero-image-card {
    width: 280px !important;
    height: 360px !important;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Why us */
  .why-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }

  /* About */
  .about-grid {
    grid-template-columns: 300px 1fr !important;
    gap: 32px !important;
  }

  /* Appointment */
  .appt-grid {
    grid-template-columns: 1fr 320px !important;
  }

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

  /* Blog */
  .blog-layout {
    grid-template-columns: 1fr 260px !important;
  }

  .blog-grid-small {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Gallery */
  .gallery-grid {
    columns: 2 !important;
  }

  .gallery-stats {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Testimonials */
  .testi-all-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Rating overview */
  .rating-overview {
    grid-template-columns: 160px 1fr !important;
  }

  /* Service cards */
  .service-card-big {
    grid-template-columns: 220px 1fr !important;
  }

  .service-card-big:nth-child(even) {
    direction: rtl !important;
  }

  .service-card-big:nth-child(even) > * {
    direction: ltr !important;
  }
}

/* ============================================================
   DESKTOP (1025px+) — fix any overflows
   ============================================================ */

@media (min-width: 1025px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* Ensure gallery is 3 columns */
  .gallery-grid {
    columns: 3;
  }

  /* Ensure footer is 4 columns */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ============================================================
   UTILITY — TOUCH IMPROVEMENTS
   ============================================================ */

/* Better tap targets on mobile */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }

  .nav-links a,
  .mobile-menu a,
  .footer-col ul li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }

  /* Better text readability */
  p {
    line-height: 1.7;
  }

  /* Remove hover effects on touch devices */
  .service-mini-card:hover,
  .card:hover,
  .testi-card:hover,
  .why-item:hover {
    transform: none;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  nav, .mobile-menu, .float-wa, .lightbox,
  .hero-floating, footer .footer-social {
    display: none !important;
  }

  .page {
    display: block !important;
  }

  body {
    font-size: 12pt;
  }
}
