/* ========================================
   Responsive Design Styles
   ======================================== */

@media (max-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 200px);
    height: auto;
  }

  .program-card:nth-child(1),
  .program-card:nth-child(2),
  .program-card:nth-child(3),
  .program-card:nth-child(4),
  .program-card:nth-child(5),
  .program-card:nth-child(6),
  .program-card:nth-child(7) {
    grid-column: auto;
    grid-row: auto;
  }

  .special-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 200px);
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: row;
    gap: 0;
  }

  .header {
    padding: 12px 0;
  }

  .nav {
    gap: 20px;
  }

  .hero {
    margin-top: 100px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 180px);
  }

  /* Reset grid positioning for mobile - make all cards auto-fit */
  .program-card:nth-child(6) {
    grid-column: auto;
    grid-row: auto;
  }

  /* Make last card (TREATMENT) span full width on mobile */
  .program-card:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .special-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 180px);
  }

  /* Reset special card positioning for mobile */
  .special-card:nth-child(1),
  .special-card:nth-child(2),
  .special-card:nth-child(3),
  .special-card:nth-child(4),
  .special-card:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
  }

  .contact-info {
    padding: 25px 20px;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-info {
    flex-direction: column;
    gap: 8px;
  }

  .footer-contact {
    text-align: center;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

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

  .programs-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(7, 160px);
  }

  .nav {
    flex-direction: column;
    gap: 10px;
  }

  .programs h2,
  .special-programs h2,
  .about h2,
  .cta-section h2 {
    font-size: 1.2rem;
  }

  .footer {
    padding: 20px 0;
  }

  .footer-info span {
    font-size: 10px;
    max-width: 100%;
  }

  .footer-contact {
    font-size: 12px;
  }
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .nav.active {
    transform: translateX(0);
  }

  .nav a {
    font-size: 18px;
    padding: 10px 0;
    border-radius: 0;
    background: none;
    min-width: auto;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
  }

  .nav a:hover {
    background: none;
    transform: none;
    border-bottom-color: #8b6f47;
    color: #8b6f47;
  }

  /* Instagram link in mobile nav */
  .nav-instagram {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: linear-gradient(
      45deg,
      #f09433 0%,
      #e6683c 25%,
      #dc2743 50%,
      #cc2366 75%,
      #bc1888 100%
    ) !important;
    color: white !important;
    padding: 15px 25px !important;
    border-radius: 25px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    border-bottom: none !important;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
    margin-top: 10px;
  }

  .nav-instagram:hover {
    background: linear-gradient(
      45deg,
      #f09433 0%,
      #e6683c 25%,
      #dc2743 50%,
      #cc2366 75%,
      #bc1888 100%
    ) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4) !important;
    border-bottom: none !important;
  }

  .nav-instagram svg {
    fill: currentColor;
  }

  .header .container {
    flex-direction: row;
    gap: 0;
  }

  .logo {
    flex: 1;
  }

  /* Hide header Instagram icon on mobile */
  .header-instagram {
    display: none !important;
  }
}

/* Hide nav-instagram on desktop */
.nav-instagram {
  display: none;
}

/* Enhanced Mobile-First Responsive Design */
@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }

  .header {
    padding: 5px 0;
  }

  /* Small mobile Instagram icon */
  .header-instagram {
    width: 32px;
    height: 32px;
    margin-left: 10px;
  }

  .header-instagram svg {
    width: 16px;
    height: 16px;
  }

  .hero {
    height: 60vh;
    padding: 20px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .btn-book {
    font-size: 12px;
    padding: 12px 25px;
  }

  .programs {
    padding: 40px 0;
  }

  .programs h2 {
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: center;
  }

  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 180px);
    gap: 15px;
  }

  .special-programs {
    padding: 60px 0;
    min-height: 600px;
  }

  .special-programs .container {
    padding: 0 15px;
  }

  .special-programs h2 {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 40px;
    color: #8b6f47;
  }

  .special-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 200px);
    gap: 15px;
    height: auto;
  }

  .special-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
  }

  .special-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: none;
    padding: 15px;
    color: white;
  }

  .special-card .card-content h3 {
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
  }

  .special-card .card-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 1;
  }

  .special-card .plus-icon {
    width: 30px;
    height: 30px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #8b6f47;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .special-card:nth-child(1),
  .special-card:nth-child(2),
  .special-card:nth-child(3),
  .special-card:nth-child(4),
  .special-card:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
  }

  /* Make last card span full width on small mobile */
  .special-card:nth-child(5) {
    grid-column: 1 / -1;
  }

  .contact {
    padding: 60px 0;
  }

  .contact h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 2rem;
  }

  .location-section {
    margin-bottom: 2rem;
  }

  .map-image,
  .google-map {
    height: 220px;
  }

  .location-title {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
  }

  .hours {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
  }

  .info-group {
    margin-bottom: 18px;
    padding: 15px;
  }

  .info-group h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .info-group h4::before {
    width: 16px;
    height: 16px;
  }

  .hour-row {
    padding: 8px 12px;
  }

  .hour-row span:first-child {
    font-size: 0.85rem;
  }

  .hour-row span:last-child {
    font-size: 0.8rem;
    padding: 3px 8px;
  }

  .email-contact {
    padding: 2rem 1.5rem;
    margin-top: 1.5rem;
  }

  .email-contact h4 {
    font-size: 1.2rem;
  }

  .email-contact a {
    font-size: 0.95rem;
    padding: 10px 16px;
    word-break: break-all;
    line-height: 1.3;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .service-options {
    grid-template-columns: 1fr;
  }

  .modal-features {
    grid-template-columns: 1fr;
  }

  .modal-header {
    padding: 20px 25px;
  }

  .modal-body {
    padding: 20px 25px;
  }
}
