/* MagnetCoach Website - Responsive Styles */

/* Extra Large Desktop (> 1400px) */
@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
  
  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
}

/* Large Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
  .container {
    max-width: 1200px;
  }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.6rem; }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .certificates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .tagline {
    font-size: 1.8rem;
  }
  
  .profile-image {
    width: 200px;
    height: 200px;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  /* Typography */
  body {
    font-size: 16px; /* Keep readable size */
  }
  
  h1 { 
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
  }
  h2 { 
    font-size: 1.6rem;
    line-height: 1.3;
  }
  h3 { 
    font-size: 1.4rem;
    line-height: 1.3;
  }
  h4 { font-size: 1.2rem; }
  
  /* Layout */
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Header & Navigation */
  .header-content {
    padding: var(--spacing-md) 0;
    position: relative;
  }
  
  .header-logo {
    max-height: 100px;
  }
  
  .logo-container {
    height: 80px;
  }
  
  .menu-toggle {
    display: flex;
    z-index: 1001;
    margin-left: auto;
    order: 2;
  }
  
  nav {
    order: 3;
  }
  
  .logo-container {
    order: 1;
  }
  
  nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-md) 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    display: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-top: none;
  }
  
  nav ul.active {
    display: flex;
    animation: slideDown 0.3s ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  nav li {
    width: 100%;
  }
  
  nav a {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 0;
    font-size: 1.1rem;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  nav a:last-child {
    border-bottom: none;
  }
  
  nav a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
  }
  
  /* Hero */
  .hero {
    padding: var(--spacing-lg) 0;
    text-align: center;
  }
  
  .hero-logo {
    max-width: 180px;
  }
  
  .profile-image {
    width: 160px;
    height: 160px;
    margin: var(--spacing-md) auto;
  }
  
  .tagline {
    font-size: 1.4rem;
    line-height: 1.3;
    padding: 0 var(--spacing-sm);
  }
  
  /* Journey & Biography */
  .journey,
  .biography {
    padding: var(--spacing-md);
  }
  
  .journey-content,
  .biography-content {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: left;
  }
  
  /* Grids */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .category-cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .category-card {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
  }
  
  .category-icon {
    font-size: 3rem;
  }
  
  .package-cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .package-card {
    padding: var(--spacing-lg);
  }
  
  .package-card:hover {
    transform: translateY(-5px);
  }
  
  .package-card:active {
    transform: scale(0.98);
  }
  
  .package-card h3 {
    font-size: 1.4rem;
  }
  
  .package-price {
    font-size: 1.3rem;
  }
  
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .certificate-image {
    height: 200px;
  }
  
  .qualifications-content {
    padding: var(--spacing-md);
    font-size: 1rem;
  }
  
  /* Blog Posts */
  .blog-post {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
  }
  
  .blog-post-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  /* Contact Form */
  .contact-form {
    padding: var(--spacing-md);
    margin: var(--spacing-md) auto;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: var(--spacing-md);
    font-size: 1rem;
  }
  
  .btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
  }
  
  /* Footer */
  footer {
    padding: var(--spacing-lg) 0;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }
  
  .footer-contact {
    align-items: center;
  }
  
  .footer-contact a {
    font-size: 1.1rem;
    padding: var(--spacing-xs);
  }
  
  .social-icon {
    width: 50px;
    height: 50px;
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  h1 { 
    font-size: 1.6rem;
    line-height: 1.2;
  }
  h2 { 
    font-size: 1.4rem;
    line-height: 1.3;
  }
  h3 { 
    font-size: 1.2rem;
  }
  
  .profile-image {
    width: 140px;
    height: 140px;
  }
  
  .tagline {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  
  .category-icon {
    font-size: 2.5rem;
  }
  
  .package-card,
  .category-card,
  .certificate-card {
    padding: var(--spacing-md);
  }
  
  .package-card h3 {
    font-size: 1.2rem;
  }
  
  .package-price {
    font-size: 1.2rem;
  }
  
  .package-subtitle,
  .package-duration {
    font-size: 0.9rem;
  }
  
  .info-box h2 {
    font-size: 1.1rem;
  }
  
  .info-section h3 {
    font-size: 1rem;
  }
  
  .certificate-image {
    height: 160px;
  }
  
  .journey,
  .biography {
    padding: var(--spacing-sm);
  }
  
  .journey-content,
  .biography-content {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  nav a {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
  }
}

/* Extra Small Mobile (< 360px) */
@media (max-width: 359px) {
  .container {
    padding: 0 var(--spacing-xs);
  }
  
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .tagline {
    font-size: 1.1rem;
  }
  
  .category-card,
  .package-card,
  .certificate-card {
    padding: var(--spacing-sm);
  }
}
/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Touch devices */
  .btn {
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  .category-card,
  .package-card,
  .certificate-card {
    cursor: pointer;
  }
  
  .menu-toggle {
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
  }
  
  .social-icon {
    min-width: 48px;
    min-height: 48px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    padding: var(--spacing-md) 0;
  }
  
  .profile-image {
    width: 120px;
    height: 120px;
  }
  
  .tagline {
    font-size: 1.2rem;
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo,
  .profile-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #F9FAFB;
    --text-light: #D1D5DB;
    --bg-color: #111827;
    --bg-light: #1F2937;
    --border-color: #374151;
  }
}

/* Extra mobile optimizations for dark theme */
@media (max-width: 767px) {
  /* Ensure logo is properly sized (only for header, not booking page) */
  header .logo {
    width: 80px !important;
    height: 80px !important;
  }
  
  header .logo-moon {
    width: 35px !important;
    height: 35px !important;
  }
  
  header .logo-moon::before {
    width: 14px !important;
    height: 14px !important;
  }
  
  header .logo-star {
    width: 5px !important;
    height: 5px !important;
  }
  
  /* Improve text readability on mobile */
  p, .journey-content, .biography-content, .qualifications-content {
    color: var(--soft-cream) !important;
  }
  
  /* Ensure cards are visible */
  .card, .category-card, .package-card, .certificate-card, .blog-post {
    background: rgba(26, 35, 64, 0.8) !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
  }
  
  /* Mobile navigation improvements */
  nav a {
    color: var(--soft-cream) !important;
  }
  
  nav a:hover, nav a.active {
    color: var(--lunar-gold) !important;
  }
}

@media (max-width: 479px) {
  header .logo {
    width: 70px !important;
    height: 70px !important;
  }
  
  header .logo-moon {
    width: 30px !important;
    height: 30px !important;
  }
  
  .tagline {
    font-size: 1.2rem !important;
  }
}
/* Header height adjustments for mobile */
@media (max-width: 767px) {
  header .logo-container {
    height: 80px !important;
  }
  
  .header-logo {
    max-height: 90px !important;
  }
  
  nav a {
    font-size: 1rem !important;
  }
}

@media (max-width: 479px) {
  header .logo-container {
    height: 70px !important;
  }
  
  .header-logo {
    max-height: 75px !important;
  }
  
  .header-content {
    padding: var(--spacing-sm) 0 !important;
  }
  
  nav a {
    font-size: 0.95rem !important;
  }
}

/* Booking logo section responsive */
@media (max-width: 767px) {
  .booking-logo-section {
    padding: var(--spacing-lg) 0;
  }
  
  .booking-logo-container .logo {
    width: 150px !important;
    height: 150px !important;
  }
  
  .booking-logo-container .logo-moon {
    width: 50px !important;
    height: 50px !important;
  }
  
  .booking-logo-container .logo-moon::before {
    width: 20px !important;
    height: 20px !important;
    top: 8px !important;
    right: 5px !important;
  }
  
  .booking-logo-container .logo-star {
    width: 8px !important;
    height: 8px !important;
  }
}

@media (max-width: 479px) {
  .booking-logo-container .logo {
    width: 120px !important;
    height: 120px !important;
  }
  
  .booking-logo-container .logo-moon {
    width: 40px !important;
    height: 40px !important;
  }
  
  .booking-logo-container .logo-moon::before {
    width: 16px !important;
    height: 16px !important;
    top: 6px !important;
    right: 4px !important;
  }
  
  .booking-logo-container .logo-star {
    width: 6px !important;
    height: 6px !important;
  }
}
/* Blog post responsive layout */
@media (max-width: 768px) {
  .blog-post-content {
    flex-direction: column;
  }
  
  .blog-post-content img {
    max-width: 100%;
    margin-bottom: var(--spacing-sm);
  }
}

/* Info Box Responsive Styles */
@media (max-width: 767px) {
  .info-box {
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
  }
  
  .info-box h2 {
    font-size: 1.4rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  .info-section {
    padding: var(--spacing-sm);
  }
  
  .info-section h3 {
    font-size: 1.2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  .info-section p,
  .info-note,
  .info-exception {
    font-size: 0.95rem;
  }
}

@media (max-width: 479px) {
  .info-box {
    padding: var(--spacing-sm);
  }
  
  .info-box h2 {
    font-size: 1.2rem;
  }
  
  .info-section h3 {
    font-size: 1.1rem;
  }
  
  .info-section {
    padding: var(--spacing-xs);
  }
}
