/* Responsive Styles for Bitrix24 Expert Template - Match React/Tailwind */

/* ===== Mobile First Approach (Match Tailwind) ===== */

/* Small devices (phones, less than 640px) */
@media (max-width: 639px) {
  .container {
    padding: 0 1rem;
  }

  /* Typography */
  h1 {
    font-size: 2.25rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.875rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Header */
  .header-content {
    height: 3.5rem;
  }

  .main-content {
    padding-top: 3.5rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-icon {
    width: 2rem;
    height: 2rem;
  }

  .logo-icon span {
    font-size: 0.875rem;
  }

  /* Hero Section */
  .hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }

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

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

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

  /* Market Hero */
  .market-hero {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }

  .market-hero-title {
    font-size: 2rem;
  }

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

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

  .market-hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .market-product-types {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .product-type-card {
    padding: 1.5rem 1rem;
  }

  .product-type-icon {
    width: 3rem;
    height: 3rem;
  }

  .market-stat-number {
    font-size: 2rem;
  }

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

  .tech-icon {
    padding: 1rem;
  }

  .tech-icon-bg img {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* Sections */
  .section {
    padding: 3rem 0;
  }

  .section-large {
    padding: 4rem 0;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  .section-heading {
    font-size: 1.875rem;
    margin-bottom: 1rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  /* Grid */
  .grid {
    gap: 1rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card-header,
  .card-content {
    padding: 1rem;
  }

  .stats-card {
    padding: 1.5rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .service-card {
    padding: 1.5rem;
  }

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

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

  .footer-links {
    text-align: center;
  }

  .footer-contact {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  /* Typography */
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  h3 {
    font-size: 1.875rem;
  }

  h4 {
    font-size: 1.5rem;
  }

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

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

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

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

  /* Market Hero */
  .market-hero-title {
    font-size: 2.5rem;
  }

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

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

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

  /* Sections */
  .section-heading {
    font-size: 2.25rem;
  }

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

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

/* Large devices (desktops, 768px and up) */
@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

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

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

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

  .footer-brand {
    text-align: left;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .footer-contact {
    text-align: right;
  }

  .social-links {
    justify-content: flex-end;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Extra large devices (large desktops, 1024px and up) */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  /* Typography */
  h1 {
    font-size: 4.5rem;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.25rem;
  }

  h4 {
    font-size: 1.875rem;
  }

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

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

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

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

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

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

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

  /* Sections */
  .section-heading {
    font-size: 3rem;
  }

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

/* 2XL screens (1536px and up) */
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }

  .hero-content {
    max-width: 1536px;
  }
}

/* Print styles */
@media print {
  .site-header,
  .mobile-nav,
  .hero-actions,
  .social-links {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }

  .section {
    padding: 1rem 0;
  }

  .section-large {
    padding: 2rem 0;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn-gradient {
    background: hsl(var(--primary));
  }

  .tech-icon {
    border-color: hsl(var(--foreground));
  }

  .card {
    border-color: hsl(var(--foreground));
  }
}

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

  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .tech-icon:hover .tech-icon-bg,
  .card:hover {
    transform: none;
  }

  .product-type-card:hover {
    transform: none;
  }
}
