/* Адаптивные стили для публичной части */

/* Очень большие экраны (< 1600px) */
@media (max-width: 1600px) {
  /* LED Guide - сброс calc для предотвращения переполнения */
  .advantages-grid,
  .selection-factors,
  .screen-types--wide,
  .key-characteristics-list {
    width: 100%;
    margin-left: 0;
    padding: 0 2rem;
  }
  .screen-types--wide {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Показ кнопки "Показать еще" преимуществ */
  .advantages-toggle-wrapper {
    display: block;
  }

  .advantage-item--hidden {
    display: none;
  }
}

/* Очень большие экраны (< 1500px) */
@media (max-width: 1500px) {
  /* Фильтры проектов - reset calc to prevent overflow */
  .filters {
    width: 100%;
    margin-left: 0;
  }
}

/* Большие экраны (< 1300px) */
@media (max-width: 1300px) {
  /* Контейнеры немного уже */
  .container {
    max-width: 1140px;
  }

  /* Типы LED экранов - 2 колонки вместо 4 */
  .screen-types {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .screen-type {
    max-width: 400px;
    width: 100%;
  }

  /* Контактные карточки - 2 колонки вместо 4 */
  .contact-cards {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .contact-card {
    max-width: 400px;
    width: 100%;
  }
}

/* Средние десктопы (< 1200px) */
@media (max-width: 1200px) {
  /* Контейнеры */
  .container {
    max-width: 1000px;
    padding: 0 1.5rem;
  }

  /* Проекты */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Проекты на главной */
  .home-projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  /* Услуги - уменьшаем отступы */
  .services-main {
    padding: 1.5rem 0 3rem;
  }

  .screen-types-section {
    padding: 3rem 0;
  }

  .screen-types-section h2 {
    margin-bottom: 2.5rem;
  }

  .process-section {
    padding: 3rem 0;
  }

  .process-section h2 {
    margin-bottom: 2.5rem;
  }

  .cta-section {
    padding: 3rem 0;
  }

  /* Контакты - блоки "Быстрый старт" и тд */
  .info-blocks {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }

  .info-block {
    max-width: 450px;
    width: 100%;
  }

  .info-block:first-child {
    grid-column: 1 / -1;
    max-width: 500px;
  }

  /* Услуги на главной - адаптация пирамиды для средних экранов */
  .home-services .services-row {
    gap: 1.75rem;
  }

  .home-services .services-row-top .service-card {
    flex: 0 1 400px;
    max-width: 400px;
  }

  .home-services .services-row-bottom .service-card {
    flex: 0 1 300px;
    max-width: 300px;
  }

  /* Услуги */
  .services-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1.75rem;
  }

  /* Приватность */
  .privacy-section .container {
    max-width: 98vw;
    padding: 0 8px;
  }
  .privacy-section .privacy-block {
    padding: 1.3rem 1.1rem;
  }
}

/* Маленькие десктопы (< 1100px) */
@media (max-width: 1100px) {
  /* Главная - услуги пирамида (немного меньше) */
  .home-services .services-row-top .service-card {
    flex: 0 1 380px;
    max-width: 380px;
  }

  .home-services .services-row-bottom .service-card {
    flex: 0 1 280px;
    max-width: 280px;
  }

  /* Адаптация высоты заголовков и кнопок */
  .service-card h3 {
    min-height: 4rem;
  }

  /* Карточки проектов */
  .public-project-card {
    max-width: 420px;
  }
}

/* Планшеты большие (< 1024px) */
@media (max-width: 1024px) {
  /* Контейнеры */
  .container {
    max-width: 960px;
    padding: 0 1.25rem;
  }

  /* Главная - услуги пирамида (планшеты) */
  .home-services .services-row-top .service-card {
    flex: 0 1 350px;
    max-width: 350px;
  }

  .home-services .services-row-bottom .service-card {
    flex: 0 1 260px;
    max-width: 260px;
  }

  /* Услуги */
  .services-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1.5rem;
  }

  .services-main {
    padding: 1.5rem 0 2.5rem;
  }

  .screen-types-section {
    padding: 2.5rem 0;
  }

  .screen-types-section h2 {
    margin-bottom: 2rem;
  }

  .process-section {
    padding: 2.5rem 0;
  }

  .process-section h2 {
    margin-bottom: 2rem;
  }

  .cta-section {
    padding: 2.5rem 0;
  }

  .cta-content p {
    white-space: normal;
    max-width: 600px;
  }
  /* LED Guide */
  .selection-factors { grid-template-columns: 1fr; gap: 1.5rem; }
  /* О компании */
  .about-company-content { grid-template-columns: 250px 1fr; gap: 2rem; }
  .about-company-text h2 { font-size: 1.75rem; }
  .service-area-section h2 { font-size: 1.75rem; }
}

@media (max-width: 900px) {
  /* Главная */
  .home-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    justify-items: center;
  }
  /* Показываем 4 проекта на средних экранах */
  .home-projects-grid .home-project-card:nth-child(n+5) {
    display: none;
  }

  /* Услуги - уменьшаем размеры для средних экранов */
  .home-services .services-row {
    gap: 1.5rem;
  }

  .home-services .services-row-top .service-card {
    flex: 0 1 320px;
    max-width: 320px;
    min-width: 260px;
  }

  .home-services .services-row-bottom .service-card {
    flex: 0 1 240px;
    max-width: 240px;
    min-width: 200px;
  }

  /* Проекты - 2 колонки с меньшими карточками */
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }
  .public-project-card {
    width: 100%;
    max-width: 320px;
  }

  .project-modal__dialog {
    grid-template-columns: 1fr;
    width: min(760px, 96vw);
    max-height: 92vh;
  }
  .project-modal__media {
    height: 42vh;
    background: #111;
  }

  /* LED Guide */
  .advantages-grid {
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .selection-factors {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    margin-left: 0;
    padding: 0 1rem;
  }

  .key-characteristics-list {
    padding: 0 1rem;
    grid-template-columns: 1fr;
  }

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

  .applications-grid .screen-type {
    min-width: unset;
    max-width: unset;
  }

  .faq-accordion {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  /* LED Guide - скрытие таблицы сравнения */
  .comparison-table-section {
    display: none;
  }

  /* LED Guide - скрытие дополнительных областей применения */
  .application-item--mobile-hidden {
    display: none;
  }

  /* LED Guide - компактные типы экранов (горизонтальная компоновка) */
  .screen-type .screen-specs {
    display: none;
  }
  .screen-type p:not(.type-description) {
    display: none;
  }
  .screen-type {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    min-width: auto;
    max-width: none;
    text-align: left;
  }
  .screen-image {
    font-size: 2rem;
    flex-shrink: 0;
    width: 40px;
    margin-bottom: 0;
  }
  .screen-type-content {
    flex: 1;
  }
  .screen-type-content h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  .screen-type-content .type-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--p-text-500);
    margin: 0;
  }
  .screen-types {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .screen-types--wide {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }

  /* LED Guide - компактные ключевые характеристики */
  .key-characteristic-item {
    padding: 1rem 1.25rem;
  }
  .key-characteristic-icon, .factor-icon {
    font-size: 2rem;
    width: 40px;
  }
  .key-characteristic-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  .key-characteristic-content p, .factor-item p {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  .factor-item { padding: 1.5rem; }
  .factor-item h4 { font-size: 1.1rem; }
}


@media (max-width: 959px) and (min-width: 769px) {
  /* Статистика (футер) */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  .stat-item h3 {
    font-size: 2rem;
  }
  .stat-item p {
    font-size: 0.95rem;
  }
}


@media (max-width: 768px) {
  /* Шапка / навигация */
  .nav-container { 
    flex-direction: column; 
    gap: 1rem; 
    padding: 0 1rem; 
  }
  .nav-links { gap: 1rem; flex-wrap: wrap; }

  /* Контейнеры / отступы */
  .container {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* Основной контент */
  .main-content { 
    margin-top: 120px;
  }

  /* Заголовки секций */
  .section-header h1 { font-size: 2rem; }
  .section-header p  { font-size: 1rem; }

  /* Hero */
  .hero { padding: 8rem 0 3rem 0; }
  .hero h1 { font-size: 2.2rem; }
  .hero p  { font-size: 1.05rem; }

  /* Проекты */
  .projects .project-card { max-width: none; width: 100%; }

  /* Фильтры проектов */
  .filters {
    gap: .75rem;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .filter-btn { padding: .6rem 1.2rem; font-size: .9rem; }

  /* Проекты - 1 колонка */
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .public-project-card {
    width: 100%;
    max-width: 350px;
  }

  /* Услуги на главной - одна колонка (мобильные) */
  .home-services .services-pyramid {
    max-width: 600px;
  }

  .home-services .services-row {
    flex-direction: column;
    align-items: center;
  }

  .home-services .services-row-top .service-card,
  .home-services .services-row-bottom .service-card {
    flex: 1 1 auto;
    max-width: 600px;
    width: 100%;
  }

  /* Уменьшаем min-height для мобильных */
  .service-card h3 {
    min-height: 3.5rem;
  }

  .service-btn {
    min-height: 60px;
  }

  /* Кнопка "Больше проектов" */
  .see-all-projects-btn {
    font-size: 1.8em;
    padding: 0.65em 1.1em;
  }

  /* Услуги */
  .services { padding: 3rem 0; }
  .services h2 { font-size: 2rem; margin-bottom: 2rem; }

  /* Страница услуг - уменьшаем отступы и заголовки */
  .services-main {
    padding: 1rem 0 2rem;
  }

  .screen-types-section {
    padding: 2rem 0;
  }

  .screen-types-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

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

  .process-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

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

  /* Статистика */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .stat-item h3 { font-size: 2rem; }
  .stat-item p  { font-size: 1rem; }

  /* Footer */
  footer { padding: 1.5rem 0; }

  /* Утилита */
  .stack-md { display: grid; gap: 12px; }

  /* Контакты */
  .contact-cards {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .contact-card {
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
  }

  .contact-form-section { padding: 2rem 1rem;}

  .additional-info-section { padding: 2rem 0;}

  .info-blocks {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    justify-items: center;
  }

  .info-block {
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
  }

  .info-block:first-child {
    grid-column: auto;
  }

    /* Футер */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  .simple-footer { padding: 1.5rem 0;}
  .footer-info h3 { font-size: 1.1rem; }
  .stats-section { padding: 2.5rem 0;}

  .form-row{ grid-template-columns:1fr; gap:.75rem; }
  .form-group{ margin-bottom:.75rem; }
  .form-group :is(input, textarea, select){
    padding:.65rem; font-size:.95rem;
  }
  .btn-large{ padding:.875rem 1.5rem; font-size:1rem; }

  /* Услуги */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .service-card { padding: 1.5rem; }
  .service-icon { font-size: 2.5rem; }
  .service-card h3 { font-size: 1.2rem; }
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
  }
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .cta-content h2 { font-size: 2rem; }
  .cta-content p {
    font-size: 1rem;
    max-width: 500px;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    max-width: 350px;
  }
  .cta-buttons .btn {
    width: 100%;
    min-width: 250px;
    max-width: 300px;
    font-size: 0.95rem;
  }
  /* LED Guide */
  .led-intro-section { padding: 2rem 0 3rem; }
  .led-intro-section::before { width: 300px; height: 300px; top: -30%; right: -20%; }
  .intro-with-icon { gap: 1.5rem; }
  .intro-icon { width: 150px; }
  .intro-text { font-size: 1rem; padding: 1.2rem 1.5rem; }
  .components-list { padding: 1.5rem !important; }
  .components-list h3 { font-size: 1.3rem !important; }
  .components-list li { font-size: 0.95rem; padding: 0.6rem 0 !important; }
  .screen-types-section h2 { font-size: 2rem; }
  .screen-types-section h3 { font-size: 1.3rem; }
  .selection-guide-section, .comparison-table-section, .advantages-section, .faq-section { padding: 2.5rem 0; }
  .selection-guide-section h2, .comparison-table-section h2, .advantages-section h2, .faq-section h2 { font-size: 2rem; margin-bottom: 2rem; }
  .selection-intro { font-size: 1rem; }
  .advantages-grid { gap: 1.5rem; }
  .advantage-icon { font-size: 2.5rem; }
  .faq-question { font-size: 1rem; padding: 1.2rem 1.5rem; }
  .faq-answer { padding: 0 1.5rem; }
  .faq-item.active .faq-answer { padding: 1.2rem 1.5rem 1.5rem; }
  .selection-tip p {font-size: 0.9rem}

  /* LED Guide - дополнительные стили для мобильных */
  .nav-dropdown-toc {
    left: 0;
    right: 0;
    transform: translateX(0);
    margin: 0.5rem 1rem;
    min-width: unset;
    max-width: unset;
  }

  .nav-item-with-dropdown:hover .nav-dropdown-toc {
    transform: translateX(0) translateY(0);
  }

  .toc-dropdown-title {
    font-size: 1rem;
  }

  .toc-dropdown-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem;
  }

  .reading-progress-bar {
    height: 3px;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }

  .btn-toggle-advantages {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .btn-toggle-faq {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .selection-factors {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }

  .key-characteristics-list {
    padding: 0;
  }

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

  .faq-accordion {
    padding: 0;
  }

  /* О компании - вертикальная компоновка */
  .about-company-section { padding: 3rem 0; margin: 2rem 0; }
  .about-company-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .about-company-image { max-width: 300px; margin: 0 auto; }
  .about-company-text { text-align: left; }
  .about-company-text h2 { text-align: center; font-size: 1.5rem; }
  .about-intro { font-size: 1rem; }
  /* Карта */
  .service-area-section { padding: 3rem 0; }
  .service-area-section h2 { font-size: 1.5rem; }
  .service-area-description { font-size: 1rem; }
  .map-container iframe { height: 350px; }
}

@media (max-width: 600px) {
  .privacy-section .privacy-block { font-size: 1rem; }

  /* Все сетки с minmax на 1 колонку */
  .services-grid,
  .contact-cards,
  .info-blocks,
  .screen-types {
    grid-template-columns: 1fr !important;
  }

  /* Карточки услуг на главной - 100% ширины */
  .home-services .services-pyramid {
    max-width: 100%;
  }

  .home-services .services-row-top .service-card,
  .home-services .services-row-bottom .service-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* ВАЖНО: Все сетки переводим на 1 колонку */
  .services-grid,
  .contact-cards,
  .info-blocks,
  .screen-types,
  .stats-grid,
  .home-projects-grid,
  .projects-grid {
    grid-template-columns: 1fr !important;
  }

  /* Услуги на главной - одна колонка с уменьшенными отступами */
  .home-services .services-pyramid {
    gap: 1.5rem;
  }

  /* Показываем 3 проекта на мобильных */
  .home-projects-grid .home-project-card:nth-child(n+4) {
    display: none;
  }

  /* Главная */
  .projects {
    padding: 1.5rem 0 1.5rem;
  }
  .projects h2 {
    font-size: 1.7rem;
    margin-bottom: 1.6rem;
  }

  /* Кнопка "Смотреть все проекты" - меньше отступы */
  .projects > .container > div:last-child {
    margin-top: 1rem !important;
  }

  .see-all-projects-btn {
    margin-top: 0 !important;
    font-size: 1.5em;
    padding: 0.6em 1em;
  }

  /* Карточки проектов главной - на всю ширину */
  .home-project-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Карточки портфолио - сохраняем фиксированную ширину */
  .public-project-card {
    width: 100%;
    max-width: 350px;
  }

  /* Изображения в карточках */
  .project-image-rect {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
  }

  .home-project-card h3 { font-size: 1.1rem; }
  .projects .project-size { font-size: 1rem; }
  .home-project-card p { font-size: .95rem; }

  /* Лого и навигация */
  .logo-icon { height: 24px; width: 18px; }
  .logo-text { font-size: 1.45rem; }
  .nav-container { padding: 0 .75rem; }

  /* Меню в две строки: первые 3 пункта, затем последние 2 */
  .nav-links {
    gap: 0 0.75rem;
    justify-content: center;
    max-width: 100%;
  }

  /* Все пункты нормального размера */
  .nav-links li {
    flex: 0 0 auto;
  }

  /* Используем order для управления порядком */
  .nav-links li:nth-child(1) { order: 1; }
  .nav-links li:nth-child(2) { order: 2; }
  .nav-links li:nth-child(3) { order: 3; }
  .nav-links li:nth-child(4) { order: 5; }
  .nav-links li:nth-child(5) { order: 6; }

  /* Добавляем invisible элемент для переноса строки после 3-го пункта */
  .nav-links::before {
    content: '';
    flex-basis: 100%;
    height: 0;
    order: 4;
  }

  /* Контейнеры / отступы */
  .container { padding: 0 .75rem; }

  /* Заголовки секций */
  .section-header { margin-bottom: 1.5rem; }
  .section-header h1 { font-size: 1.8rem; }
  .section-header p  { font-size: .95rem; }

  /* Hero */
  .hero { padding: 9rem 0 3rem 0; }
  .hero h1 { font-size: 1.9rem; }
  .hero p  { font-size: 1rem; }

  /* Кнопки */
  .btn { padding: 10px 20px; font-size: .9rem; }

  /* Карточки проектов */
  .project-content { padding: 1rem; }
  .project-title   { font-size: 1.2rem; }
  .project-size    { font-size: 1rem; }

  /* Услуги */
  .services { padding: 2.2rem 0; }
  .services h2 { font-size: 1.7rem; }

  /* Статистика */
  .stats-section { padding: 2rem 0; }
  .stats-grid    { grid-template-columns: 1fr; gap: 1rem; }
  .stat-item h3  { font-size: 1.8rem; }
  .stat-item p   { font-size: .95rem; }

  /* Фильтры проектов */
  .filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: .5rem .85rem;
    font-size: .85rem;
    width: auto;
    flex: 0 1 auto;
    text-align: center;
  }

  /* Утилита */
  .hide-sm { display: none !important; }

  /* Контакты */
  .contact-icon { font-size: 2rem; }

  .contact-info-section {
    margin-bottom: 2rem;
  }

  .contact-card {
    padding: 1rem;
    max-width: 100%;
  }

  .contact-form-section {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .contact-form .btn-large { width: 100%; }

  .info-block {
    padding: 1rem;
    max-width: 100%;
  }

  /* Футер */
  .footer-content { gap: 1rem; }
  .footer-info h3 { font-size: 1rem; }
  .footer-info p,
  .footer-contact p { font-size: 0.9rem; }
  .footer-bottom {
    font-size: 0.8rem;
    padding-top: 0.75rem;
  }
  .simple-footer.compact .footer-bottom { font-size: 0.8rem;}

  /* Формы */
  .form-group :is(input, textarea, select){
    padding:.6rem; font-size:.9rem;
  }
  .checkbox-label, .radio-label{ font-size:.85rem; }
  .btn-large{ padding:.75rem 1rem; font-size:.95rem; }

  /* Услуги */
 .services-main { padding: 1rem 0 1.5rem; }
  .service-card { padding: 1rem;}
  .service-price {
    font-size: 1.1rem;
    padding: 0.75rem;
  }
  .screen-types { grid-template-columns: 1fr; }
  .screen-image { font-size: 2.5rem; }
  .process-steps {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  .process-section,
  .screen-types-section,
  .cta-section { padding: 1.5rem 0; }
  .screen-types-section h2,
  .process-section h2 { font-size: 1.7rem; margin-bottom: 1.5rem; }
  .cta-content h2 { font-size: 1.8rem; }
  .cta-buttons {
    max-width: 100%;
    width: 100%;
  }
  .cta-buttons .btn {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
    padding: 0.875rem 1.5rem;
  }
  /* LED Guide */
  .led-intro-section { padding: 1.5rem 0 2rem; }
  .led-intro-section::before { width: 250px; height: 250px; top: -25%; right: -30%; }
  .intro-with-icon { flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
  .intro-icon { width: 120px; }
  .intro-text { font-size: 0.95rem; padding: 1rem 1.2rem; }
  .components-list { padding: 1.2rem !important; }
  .components-list h3 { font-size: 1.2rem !important; }
  .components-list li { font-size: 0.9rem; }
  .screen-types-section h2 { font-size: 1.7rem; }
  .screen-types-section h3[style*="font-size"] { font-size: 1.3rem !important; }
  .screen-type h3 { font-size: 1.1rem; }
  .screen-type .type-description { font-size: 0.9rem; }
  .selection-guide-section, .comparison-table-section, .advantages-section, .faq-section { padding: 2rem 0; }
  .selection-guide-section h2, .comparison-table-section h2, .advantages-section h2, .faq-section h2 { font-size: 1.7rem; margin-bottom: 1.5rem; }
  .selection-intro { font-size: 0.95rem; }
  .factor-item { padding: 1.2rem; }
  .factor-icon { font-size: 1.8rem; }
  .factor-item h4 { font-size: 1rem; }
  .factor-item p { font-size: 0.9rem; }
  .selection-tip { padding: 1.2rem 1.5rem; font-size: 0.95rem; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 0.8rem 0.6rem; }
  .table-note { font-size: 0.9rem; }
  .advantage-icon { font-size: 2.2rem; }
  .advantage-item h4 { font-size: 1rem; }
  .advantage-item p { font-size: 0.85rem; }
  .faq-question { font-size: 0.95rem; padding: 1rem 1.2rem; }
  .faq-answer p { font-size: 0.9rem; }

  /* LED Guide - ToC и дополнительные элементы */
  .nav-dropdown-toc {
    padding: 1rem;
    margin: 0.5rem 0.5rem;
  }

  .toc-dropdown-title {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .toc-dropdown-link {
    font-size: 0.8rem;
    padding: 0.45rem 0.6rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 15px;
    right: 15px;
  }

  /* О компании */
  .about-company-section { padding: 2rem 0; margin: 1.5rem 0; }
  .about-company-content { gap: 1.5rem; }
  .about-company-image { max-width: 220px; }
  .about-company-image img { border-radius: 10px; }
  .about-company-text h2 { font-size: 1.3rem; margin-bottom: 1rem; }
  .about-intro { font-size: 0.95rem; }
  .about-company-text p { font-size: 0.9rem; line-height: 1.6; }
  .about-founder { padding: 1rem; }
  .about-founder p { font-size: 0.9rem; }
  /* Карта */
  .service-area-section { padding: 2rem 0; }
  .service-area-section h2 { font-size: 1.3rem; }
  .service-area-description { font-size: 0.95rem; padding: 0 1rem; }
  .map-container { border-radius: 10px; }
  .map-container iframe { height: 300px; }
}

/* Очень маленькие экраны (≤375px) - iPhone SE и меньше */
@media (max-width: 375px) {
  /* Карточки портфолио - на всю ширину */
  .public-project-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Фильтры */
  .filter-btn {
    padding: .45rem .75rem;
    font-size: .8rem;
  }

  /* Карточки услуг на главной - самые компактные */
  .service-card h3 {
    font-size: 1.15rem;
    min-height: 3rem;
  }
  .service-card p { font-size: .95rem; }

  .service-btn {
    min-height: 55px;
    font-size: 0.9rem;
  }

  /* Услуги - еще меньше заголовки и отступы */
  .services-main {
    padding: 0.75rem 0 1rem;
  }

  .screen-types-section,
  .process-section,
  .cta-section {
    padding: 1.25rem 0;
  }

  .screen-types-section h2,
  .process-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .cta-content h2 {
    font-size: 1.6rem;
  }

  .section-header h1 {
    font-size: 1.75rem;
  }

  /* Кнопка "Больше проектов" - самая маленькая */
  .see-all-projects-btn {
    font-size: 1.3em;
    padding: 0.55em 0.9em;
  }

  /* LED Guide */
  .led-intro-section { padding: 1.25rem 0 1.75rem; }
  .led-intro-section::before { width: 200px; height: 200px; }
  .intro-icon { width: 100px; }
  .intro-text { font-size: 0.9rem; padding: 0.9rem 1rem; }
  .components-list { padding: 1rem !important; border-radius: 10px !important; margin-top: 1.5rem !important; }
  .components-list h3 { font-size: 1.1rem !important; margin-bottom: 1rem !important; }
  .components-list li { font-size: 0.85rem; padding: 0.5rem 0 !important; }
  .screen-types-section h2 { font-size: 1.5rem; }
  .screen-types-section h3[style*="font-size"] { font-size: 1.2rem !important; }
  .screen-type { padding: 1rem; }
  .screen-type h3 { font-size: 1rem; }
  .screen-type .type-description { font-size: 0.85rem; }
  .screen-image { font-size: 2rem; }
  .advantage-item { padding: 1rem; }
  .advantage-item h4 { font-size: 0.95rem; }
  .advantage-item p { font-size: 0.8rem; }
  .selection-guide-section h2, .comparison-table-section h2, .advantages-section h2, .faq-section h2 { font-size: 1.5rem; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.6rem 0.4rem; }
  .faq-question { font-size: 0.9rem; padding: 0.9rem 1rem; }
  .faq-icon { font-size: 0.7rem; }
  /* О компании */
  .about-company-image { max-width: 180px; }
  .about-company-text h2 { font-size: 1.2rem; }
  .service-area-section h2 { font-size: 1.2rem; }
  .map-container iframe { height: 250px; }
}

@media (prefers-reduced-motion: reduce){
  .home-project-card,
  .service-card {
    transition: none !important;
  }
  .home-project-card:hover,
  .service-card:hover {
    transform: none !important;
  }

  .logo-icon, .logo-text{ 
    animation: none !important; 
    transition: none !important; 
  }
  .stat-item { 
    animation: none !important; 
    opacity: 1 !important; 
    transform: none !important; 
  }
  .process-steps .step-number { animation: none !important; }

  .public-project-card,
  .public-project-image img,
  .project-detail-btn,
  .contact-card,
  .info-block {
    transition: none !important;
  }

  /* Адаптивные фильтры на портфолио */
  .filters {
    flex-wrap: wrap !important;
  }

  .filter-btn {
    flex: 1 1 calc(50% - 0.5rem) !important;
    min-height: 50px !important;
    padding: 1rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
}