/* Адаптивные стили для сайта Monocrete */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .logo {
        width: 65px;
        height: 65px;
        border-radius: 6px;
    }
    
    .contact-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.8rem;
        min-width: 120px;
    }
    
    .contact-btn .contact-text {
        font-size: 0.75rem;
        max-width: 100px;
    }
    
    .slogan {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .timeline-container {
        padding: 2rem;
    }
    
    .service-card.active {
        flex-direction: column;
    }
    
    .service-image {
        min-height: 180px;
        max-height: 220px;
    }
    
    /* Контакты */
    .contacts-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Услуги */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Портфолио */
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Модальное окно */
    .modal-body {
        grid-template-columns: 1fr;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    /* Шапка */
    .header {
        padding: 0.75rem 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 0 1rem;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    .logo {
        width: 50px;
        height: 50px;
        border-radius: 6px;
    }
    
    .site-title {
        font-size: 1.6rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        gap: 0.5rem;
    }
    
    .contact-btn {
        width: 100%;
        justify-content: center;
        min-width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .contact-btn .contact-text {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .avito-btn .contact-text {
        opacity: 1;
        position: static;
        transform: none;
    }
    
    /* Слоган */
    .slogan-section {
        padding: 0.5rem 1rem;
    }
    
    .slogan {
        font-size: 1rem;
        padding: 0;
        line-height: 1.4;
    }
    
    .working-hours {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
        margin-top: 0.5rem;
    }
    
    /* Навигация - гамбургер меню */
    .navigation {
        position: relative;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        margin: 0.5rem 1rem;
        padding: 0;
        font-size: 1.3rem;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu.mobile-active {
        display: flex !important;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--gray-light);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 1rem 1.5rem;
        text-align: left;
        font-size: 1rem;
        display: block;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--gray-light);
    }
    
    /* Основное содержимое */
    .main-content {
        padding: 0.75rem;
    }
    
    /* Герой-секция */
    .hero-section {
        margin-bottom: 1.5rem;
    }
    
    .hero-image {
        border-radius: 10px;
    }
    
    .hero-img {
        height: 200px;
        object-fit: cover;
    }
    
    .hero-text {
        padding: 1.5rem 1rem 1rem;
        position: relative;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    /* Заголовки секций */
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    /* Таймлайн (услуги на главной) */
    .services-showcase {
        padding: 1rem;
    }
    
    .timeline-container {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .timeline {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .timeline::before {
        display: none;
    }
    
    .timeline-marker {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        min-width: 80px;
    }
    
    .marker-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .marker-label {
        margin-top: 0;
        font-size: 0.8rem;
        text-align: center;
    }
    
    /* Карточки услуг в таймлайне */
    .service-details {
        min-height: auto;
        height: auto;
    }
    
    .service-card {
        border-radius: 10px;
    }
    
    .service-card.active {
        flex-direction: column;
        gap: 0;
    }
    
    .service-image {
        flex: none;
        height: 200px;
        min-height: 200px;
        max-height: 200px;
    }
    
    .service-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .service-content {
        flex: none;
        padding: 1rem;
        position: relative;
        background: var(--white);
    }
    
    .service-content h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .service-content p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }
    
    .service-content ul {
        margin-bottom: 0.75rem;
    }
    
    .service-content li {
        font-size: 0.85rem;
        padding: 0.2rem 0;
        padding-left: 1.8rem;
    }
    
    .service-content li::before {
        font-size: 1rem;
        left: 0;
        top: 0.1rem;
    }
    
    /* Страница "О нас" */
    .about-section {
        padding: 1.5rem 1rem;
    }
    
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-text {
        order: 1;
    }
    
    .about-stats {
        order: 2;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
    }
    
    .about-text h2 {
        font-size: 1.5rem;
    }
    
    .about-text h3 {
        font-size: 1.2rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Страница "Услуги" */
    .services-page {
        padding: 1.5rem 1rem;
        border-radius: 10px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-item {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-item h3 {
        font-size: 1.2rem;
    }
    
    .service-item p {
        font-size: 0.9rem;
    }
    
    .service-item li {
        font-size: 0.9rem;
        padding-left: 1.8rem;
    }
    
    .service-item li::before {
        font-size: 1rem;
        top: 0.2rem;
    }
    
    .service-price {
        padding: 0.75rem;
    }
    
    .service-price span {
        font-size: 1.1rem;
    }
    
    /* Процесс работы */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .process-step {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* CTA секция */
    .cta-section {
        padding: 2rem 1rem;
        border-radius: 10px;
    }
    
    .cta-section h2 {
        font-size: 1.3rem;
    }
    
    .cta-section p {
        font-size: 0.95rem;
    }
    
    .cta-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Страница "Портфолио" */
    .portfolio-section {
        padding: 1.5rem 1rem;
    }
    
    .portfolio-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        border-radius: 10px;
    }
    
    .portfolio-image {
        height: 220px;
    }
    
    .portfolio-info h3 {
        font-size: 1.1rem;
    }
    
    .portfolio-info p {
        font-size: 0.85rem;
    }
    
    .view-project-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Статистика портфолио */
    .portfolio-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Модальное окно */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        padding-top: 3rem;
    }
    
    .close {
        top: 0.5rem;
        right: 1rem;
        font-size: 2.5rem;
        background: rgba(0,0,0,0.5);
        color: white;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .project-gallery-container {
        order: -1;
    }
    
    .project-gallery {
        height: 250px;
    }
    
    .gallery-prev,
    .gallery-next {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .gallery-prev {
        left: 5px;
    }
    
    .gallery-next {
        right: 5px;
    }
    
    .project-details h2 {
        font-size: 1.3rem;
    }
    
    .project-details p {
        font-size: 0.9rem;
    }
    
    .project-specs {
        gap: 0.75rem;
    }
    
    .spec-item {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Страница "Оборудование" */
    .equipment-section {
        padding: 1.5rem 1rem;
        border-radius: 10px;
    }
    
    .equipment-intro {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .equipment-intro p {
        font-size: 1rem;
    }
    
    .equipment-categories {
        gap: 2rem;
    }
    
    .equipment-category h2 {
        font-size: 1.2rem;
        flex-wrap: wrap;
    }
    
    .equipment-category h2 i {
        font-size: 1.2rem;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .equipment-image {
        height: 200px;
    }
    
    .equipment-info {
        padding: 1rem;
    }
    
    .equipment-info h3 {
        font-size: 1.1rem;
    }
    
    .equipment-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    /* Фичи оборудования */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
    }
    
    /* Страница "Контакты" */
    .contacts-section {
        padding: 1.5rem 1rem;
        border-radius: 10px;
    }
    
    .contacts-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info h2,
    .contact-form h2 {
        font-size: 1.5rem;
    }
    
    .contact-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .contact-details h3 {
        font-size: 1.1rem;
    }
    
    .contact-details p {
        font-size: 0.95rem;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* Форма */
    .contact-form {
        padding: 1.5rem;
        border-radius: 10px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 16px; /* Предотвращает зум на iOS */
    }
    
    .checkbox-label {
        font-size: 0.85rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Карта */
    .map-container {
        margin-top: 1.5rem;
    }
    
    .map-container h2 {
        font-size: 1.3rem;
    }
    
    .map-container iframe {
        height: 250px;
    }
    
    /* FAQ */
    .faq-section {
        margin-top: 2rem;
    }
    
    .faq-section h2 {
        font-size: 1.3rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .faq-item {
        padding: 1rem;
    }
    
    .faq-item h3 {
        font-size: 1rem;
    }
    
    .faq-item p {
        font-size: 0.9rem;
    }
    
    /* Подвал */
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .footer-avito-btn {
        margin: 0.5rem auto 0;
    }
    
    .footer-bottom {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
}

/* Маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.5rem;
    }
    
    .site-title {
        font-size: 1.4rem;
    }
    
    .logo {
        width: 45px;
        height: 45px;
    }
    
    .slogan {
        font-size: 0.9rem;
    }
    
    .working-hours {
        font-size: 0.8rem;
    }
    
    .nav-menu a {
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .hero-img {
        height: 180px;
    }
    
    .hero-text {
        padding: 1rem 0.75rem;
    }
    
    .hero-text h2 {
        font-size: 1.15rem;
    }
    
    .hero-text p {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .timeline-container {
        padding: 0.75rem;
    }
    
    .timeline-marker {
        min-width: 70px;
    }
    
    .marker-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .marker-label {
        font-size: 0.75rem;
    }
    
    .service-image {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
    
    .service-content {
        padding: 0.75rem;
    }
    
    .service-content h3 {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .service-content p {
        font-size: 0.85rem;
    }
    
    .service-content li {
        font-size: 0.85rem;
        padding-left: 1.8rem;
    }
    
    /* О нас */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Портфолио */
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-stats {
        grid-template-columns: 1fr;
    }
    
    /* Модальное окно */
    .project-gallery {
        height: 200px;
    }
    
    /* Контакты */
    .contact-item {
        padding: 0.75rem;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    /* FAQ */
    .faq-item {
        padding: 0.75rem;
    }
    
    .faq-item h3 {
        font-size: 0.95rem;
    }
    
    .faq-item p {
        font-size: 0.85rem;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .header-container {
        flex-direction: row;
        gap: 1rem;
    }
    
    .contact-buttons {
        flex-direction: row;
        max-width: none;
        flex-wrap: wrap;
    }
    
    .contact-btn {
        width: auto;
        flex: 1;
        min-width: 120px;
    }
    
    .hero-img {
        height: 50vh;
        min-height: 150px;
    }
    
    .timeline {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .timeline-marker {
        flex-direction: column;
    }
    
    .modal-content {
        height: auto;
        max-height: 95vh;
        margin: 2.5vh auto;
        border-radius: 10px;
    }
    
    .modal-body {
        grid-template-columns: 1fr 1fr;
        padding-top: 1rem;
    }
    
    .project-gallery-container {
        order: 0;
    }
}

/* Большие экраны (более 1200px) */
@media (min-width: 1201px) {
    .header-container,
    .nav-menu,
    .main-content,
    .footer-container {
        max-width: 1400px;
    }
    
    .site-title {
        font-size: 3rem;
    }
    
    .slogan {
        font-size: 2rem;
    }
    
    .hero-img {
        height: 600px;
    }
    
    .hero-text h2 {
        font-size: 3rem;
    }
    
    .hero-text p {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Высокие экраны */
@media (min-height: 800px) and (min-width: 769px) {
    .hero-img {
        height: 70vh;
        min-height: 500px;
    }
}

/* Фикс для iOS - предотвращение зума при фокусе на input */
@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Печать */
@media print {
    .header,
    .navigation,
    .footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
        max-width: none;
    }
    
    .hero-section,
    .services-showcase {
        margin-bottom: 2rem;
    }
    
    .service-card.active {
        display: block;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .timeline-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
