/* ========================================
   Grow Capital Mongolia - Responsive Styles
   Mobile-First Responsive Design
   ======================================== */

/* ========================================
   Large Desktop (1440px+)
   ======================================== */

@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
  
  h1 {
    font-size: 4rem;
  }
  
  .hero h1 {
    font-size: 4.5rem;
  }
}

/* ========================================
   Desktop (1024px - 1439px)
   ======================================== */

@media (max-width: 1439px) {
  h1 {
    font-size: 3rem;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
}

/* ========================================
   Tablet Landscape (768px - 1023px)
   ======================================== */

@media (max-width: 1023px) {
  /* Typography */
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.75rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  /* Grid Systems */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  /* Section Spacing */
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  /* Container Padding */
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* ========================================
   Tablet Portrait & Mobile (max 767px)
   ======================================== */

@media (max-width: 767px) {
  /* Typography */
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.125rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-description {
    font-size: 1rem;
  }
  
  /* Navigation */
  .navbar {
    padding: var(--spacing-sm) 0;
  }
  
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu li a {
    display: block;
    padding: var(--spacing-sm);
    width: 100%;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  /* Logo */
  .logo {
    height: 40px;
  }
  
  /* Hero Section */
  .hero {
    min-height: auto;
    padding: calc(80px + var(--spacing-3xl)) var(--spacing-md) var(--spacing-3xl);
  }
  
  /* Buttons */
  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9375rem;
    width: 100%;
  }
  
  .btn-large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }
  
  /* Grid Systems */
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* Cards */
  .card {
    padding: var(--spacing-lg);
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }
  
  /* Section Spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .section-header {
    margin-bottom: var(--spacing-xl);
  }
  
  /* Container */
  .container,
  .container-wide {
    padding: 0 var(--spacing-md);
  }
  
  /* Video Section */
  .video-section {
    margin: var(--spacing-xl) 0;
  }
  
  /* Testimonials */
  .testimonial {
    padding: var(--spacing-lg);
  }
  
  .testimonial-text {
    font-size: 1rem;
  }
  
  .testimonial-avatar {
    width: 50px;
    height: 50px;
  }
  
  /* Back to Top */
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
  
  /* Spacing Utilities */
  :root {
    --spacing-3xl: 4rem;
    --spacing-2xl: 3rem;
    --spacing-xl: 2rem;
  }
}

/* ========================================
   Small Mobile (max 480px)
   ======================================== */

@media (max-width: 480px) {
  /* Typography */
  h1 {
    font-size: 1.75rem;
  }
  
  .hero h1 {
    font-size: 2rem;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  /* Container */
  .container,
  .container-wide {
    padding: 0 var(--spacing-sm);
  }
  
  /* Cards */
  .card {
    padding: var(--spacing-md);
  }
  
  /* Stats */
  .stat-card {
    padding: var(--spacing-md);
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 1rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem var(--spacing-md);
    font-size: 0.875rem;
  }
  
  /* Section Tag */
  .section-tag {
    font-size: 0.75rem;
    padding: 0.375rem var(--spacing-sm);
  }
  
  /* Footer */
  .footer-logo {
    height: 40px;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
  }
  
  /* Spacing */
  :root {
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
    --spacing-xl: 1.5rem;
  }
}

/* ========================================
   Extra Small Mobile (max 360px)
   ======================================== */

@media (max-width: 360px) {
  html {
    font-size: 14px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .container,
  .container-wide {
    padding: 0 1rem;
  }
  
  .logo {
    height: 35px;
  }
}

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

@media print {
  .header,
  .nav-menu,
  .menu-toggle,
  .back-to-top,
  .footer {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  .section {
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: underline;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}

/* ========================================
   Landscape Orientation (Mobile)
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-xl);
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */

@media (hover: none) and (pointer: coarse) {
  /* Increase tap target sizes */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-menu li a {
    padding: var(--spacing-md);
  }
  
  .social-link {
    width: 44px;
    height: 44px;
  }
  
  /* Disable hover effects on touch devices */
  .card:hover {
    transform: none;
  }
  
  .hover-scale:hover,
  .hover-lift:hover {
    transform: none;
  }
}

/* ========================================
   High DPI / Retina Displays
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for high-resolution displays */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ========================================
   Reduced Motion Preference
   ======================================== */

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

/* ========================================
   Dark Mode Preference (Future)
   ======================================== */

@media (prefers-color-scheme: dark) {
  /* Reserved for future dark mode implementation */
  /* Currently maintaining light theme only as per design */
}
