/* ========================================
   KETHEP - Responsive Styles
   ======================================== */

/* Mobile First Approach - Default styles are for mobile */

/* ========================================
   Tablet Styles (768px and up)
   ======================================== */

@media (min-width: 768px) {
  /* Typography adjustments */
  html {
    font-size: 17px;
  }

  /* Hero Section */
  .hero {
    padding: var(--spacing-4xl) 0 var(--spacing-4xl);
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About Stats */
  .about-stats {
    gap: var(--spacing-xl);
  }
}

/* ========================================
   Desktop Styles (1024px and up)
   ======================================== */

@media (min-width: 1024px) {
  /* Typography adjustments */
  html {
    font-size: 18px;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* About Section */
  .about-content {
    grid-template-columns: 3fr 2fr;
  }
}

/* ========================================
   Mobile Navigation (max-width: 1023px)
   ======================================== */

@media (max-width: 1023px) {
  /* Navigation Toggle */
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 1001;
  }

  /* Mobile Navigation Menu */
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 80px 20px 20px 20px;
    gap: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    z-index: 1000;
  }

  /* Active Navigation State */
  .nav-active .nav-list {
    right: 0;
  }


  /* Hamburger Animation */
  .nav-active .hamburger {
    background: transparent;
  }

  .nav-active .hamburger::before {
    transform: rotate(45deg);
  }

  .nav-active .hamburger::after {
    transform: rotate(-45deg);
  }

  /* Mobile Navigation Items */
  .nav-list li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list > li > a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    border-radius: 0;
    transition: color 0.2s ease;
  }

  .nav-list > li > a:hover,
  .nav-list > li > a:focus,
  .nav-list > li > a.active {
    color: var(--color-primary);
    background: none;
  }

  /* Mobile Dropdown */
  .has-dropdown {
    position: static;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: #f8f9fa;
    margin: 10px 0 0 0;
    padding: 10px 0;
    border-radius: 5px;
  }

  .dropdown-menu a {
    display: block;
    font-size: 14px;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
  }

  .dropdown-menu a:hover,
  .dropdown-menu a:focus,
  .dropdown-menu a.active {
    background-color: #e9ecef;
    color: var(--color-primary);
  }

  /* Hero Actions */
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Hero Section */
  .hero-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    height: 300px;
  }

  /* About Section */
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .about-stats {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Facility Section */
  .facility-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .facility-image img {
    height: 250px;
  }

  /* CTA Actions */
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-address {
    margin-bottom: var(--spacing-lg);
  }
}

/* ========================================
   Small Mobile Styles (max-width: 480px)
   ======================================== */

@media (max-width: 480px) {
  /* Container padding */
  .container {
    padding: 0 var(--spacing-sm);
  }

  /* Typography */
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }

  /* Buttons */
  .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-sm);
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Service Cards */
  .service-card {
    padding: var(--spacing-lg);
  }

  /* Hero Section */
  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .hero-description {
    font-size: var(--font-size-base);
  }

  /* Section Spacing */
  .services-overview,
  .about-home,
  .cta-section {
    padding: var(--spacing-2xl) 0;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  /* Hide non-essential elements */
  .nav-toggle,
  .skip-link,
  .hero-actions,
  .cta-section {
    display: none;
  }

  /* Adjust colors for print */
  * {
    color: #000 !important;
    background: #fff !important;
  }

  /* Show URLs for links */
  a[href]::after {
    content: " (" attr(href) ")";
  }

  /* Page breaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
  }
}

/* ========================================
   Accessibility - Reduced Motion
   ======================================== */

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

  html {
    scroll-behavior: auto;
  }
}

/* ========================================
   Dark Mode Support (Future Enhancement)
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
  /* Currently keeping light theme as per project requirements */
}