/* iForeverYoungTours - Responsive Styles */
/* Mobile-first responsive design */

/* ========================================
   MOBILE FIRST - BASE STYLES
======================================== */

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  .container {
    padding: 0 15px;
  }

  /* Typography */
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }
  h3 {
    font-size: 1.5rem;
  }

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

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .page-title {
    font-size: 2.5rem;
  }

  /* Navigation */
  .nav-container {
    padding: 1rem 15px;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 2rem 0;
    transition: left 0.3s ease;
    z-index: 999;
    gap: 1.5rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
  }

  /* Hero Section */
  .hero {
    height: 100vh;
    min-height: 500px;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-controls {
    padding: 0 1rem;
  }

  .slide-btn {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

  .featured-tours,
  .why-fyt,
  .experiences-preview,
  .special-groups,
  .testimonials,
  .cta-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* Tours Grid */
  .tours-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tour-card {
    margin: 0 auto;
    max-width: 350px;
  }

  .tour-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tour-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .tour-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Pillars Grid */
  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .pillar {
    padding: 1.5rem;
  }

  .pillar-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  /* Experiences Grid */
  .experiences-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .experience-card {
    height: 250px;
  }

  /* Groups Grid */
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .group-card {
    padding: 1.5rem;
  }

  .group-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  /* Testimonials */
  .testimonial {
    padding: 1rem;
  }

  .testimonial-text {
    font-size: 1.125rem;
  }

  .testimonial-author {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .testimonial-author img {
    width: 50px;
    height: 50px;
  }

  /* CTA Section */
  .cta-content h2 {
    font-size: 2rem;
  }

  .cta-content p {
    font-size: 1.125rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Newsletter */
  .newsletter {
    padding: 60px 0;
  }

  .newsletter-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .newsletter-text h2 {
    font-size: 1.75rem;
  }

  .form-group {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-group input {
    border-radius: 25px;
  }

  .form-group button {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Page Header */
  .page-header {
    height: 300px;
    margin-top: 70px;
  }

  .page-title {
    font-size: 2rem;
  }

  .page-subtitle {
    font-size: 1.125rem;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form {
    padding: 0 1rem;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* Cards */
  .experience-card,
  .tour-card,
  .group-card {
    margin: 0 auto;
  }
}

/* ========================================
   SMALL DEVICES (LANDSCAPE PHONES, 576px and up)
======================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    max-width: 540px;
    padding: 0 20px;
  }

  /* Hero */
  .hero-title {
    font-size: 3rem;
  }

  .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-buttons .btn {
    width: auto;
    min-width: 200px;
  }

  /* Grids */
  .tours-grid {
    grid-template-columns: 1fr;
  }

  .experiences-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Newsletter */
  .newsletter-content {
    flex-direction: row;
    text-align: left;
  }

  .form-group {
    flex-direction: row;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }

  .footer-bottom-content {
    flex-direction: row;
    text-align: left;
  }
}

/* ========================================
   MEDIUM DEVICES (TABLETS, 768px and up)
======================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }

  /* Navigation */
  .nav-container {
    padding: 1rem 2rem;
  }

  /* Hero */
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

  /* Grids */
  .tours-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .experiences-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Testimonials */
  .testimonial-author {
    flex-direction: row;
    text-align: left;
  }

  /* CTA Buttons */
  .cta-buttons {
    flex-direction: row;
  }

  .cta-buttons .btn {
    width: auto;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   LARGE DEVICES (DESKTOPS, 992px and up)
======================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  /* Grids */
  .tours-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .experiences-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   EXTRA LARGE DEVICES (LARGE DESKTOPS, 1200px and up)
======================================== */

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  /* Grids */
  .tours-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .experiences-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .groups-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   EXTRA EXTRA LARGE DEVICES (1400px and up)
======================================== */

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  /* Hero */
  .hero-title {
    font-size: 4rem;
  }

  /* Section spacing */
  .section {
    padding: 120px 0;
  }

  .featured-tours,
  .why-fyt,
  .experiences-preview,
  .special-groups,
  .testimonials,
  .cta-section {
    padding: 120px 0;
  }
}

/* ========================================
   LANDSCAPE ORIENTATION
======================================== */

@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    height: 100vh;
    min-height: 400px;
  }

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

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    gap: 0.5rem;
  }

  .hero-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   HIGH DPI DISPLAYS
======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images and icons for retina displays */
  .logo,
  .footer-logo img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ========================================
   TOUCH DEVICES
======================================== */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn {
    min-height: 44px;
    padding: 0.875rem 2rem;
  }

  .nav-link {
    padding: 0.75rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .slide-btn,
  .testimonial-btn {
    width: 50px;
    height: 50px;
  }

  /* Remove hover effects */
  .tour-card:hover,
  .experience-card:hover,
  .group-card:hover,
  .pillar:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-outline:hover {
    transform: none;
  }

  .nav-btn:hover {
    transform: none;
  }
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
  .hero-slider .slide {
    transition: none;
  }

  .testimonial.active {
    animation: none;
  }

  .hero-title,
  .hero-subtitle,
  .hero-description,
  .hero-buttons {
    animation: none;
  }

  .loading {
    animation: none;
  }

  .skeleton {
    animation: none;
    background: #f0f0f0;
  }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */

@media (prefers-color-scheme: dark) {
  /* This can be implemented if dark mode is desired */
  /* Currently maintaining light theme for luxury brand consistency */
}

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

@media print {
  /* Hide interactive elements */
  .navbar,
  .hero-controls,
  .slide-indicators,
  .testimonial-controls,
  .btn,
  .footer,
  .nav-toggle {
    display: none !important;
  }

  /* Adjust layout for print */
  .hero {
    height: auto;
    min-height: auto;
    padding: 2rem 0;
    page-break-inside: avoid;
  }

  .hero-content {
    color: #000;
  }

  .section {
    padding: 1rem 0;
    page-break-inside: avoid;
  }

  .tours-grid,
  .pillars-grid,
  .experiences-grid,
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tour-card,
  .pillar,
  .experience-card,
  .group-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }

  /* Ensure text is readable */
  body {
    color: #000;
    background: #fff;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #000;
  }

  p {
    color: #333;
  }

  /* Page breaks */
  .section-header {
    page-break-after: avoid;
  }

  .tour-card,
  .pillar,
  .group-card {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
======================================== */

/* Focus indicators for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .nav-link:focus,
  .btn:focus,
  .social-link:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
    transition: outline 0.2s ease;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn-outline {
    border-width: 3px;
  }

  .nav-link::after {
    height: 3px;
  }

  .tour-card,
  .pillar,
  .experience-card,
  .group-card {
    border: 2px solid #000;
  }
}

/* ========================================
   BROWSER-SPECIFIC FIXES
======================================== */

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
  .hero-video video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

/* Firefox specific fixes */ \
@-moz-document url-prefix() {
    .form-group input,
    .form-group select,
    .form-group textarea {
        border-radius: 8px;
    }
}

/* Edge specific fixes */
@supports (-ms-ime-align: auto) {
  .nav-menu {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
======================================== */

/* Reduce animations on slower devices */
@media (max-width: 768px) {
  .tour-card,
  .experience-card,
  .group-card,
  .pillar {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .btn {
    transition: all 0.2s ease;
  }

  .nav-link {
    transition: color 0.2s ease;
  }
}

/* Optimize for slow connections */
@media (max-width: 480px) and (max-height: 800px) {
  .hero-slider .slide {
    background-attachment: scroll;
  }

  .page-header-bg {
    background-attachment: scroll;
  }
}
