@media (max-width: 768px) {
    main {
        padding-top: 100px !important; /* Reduced padding for mobile */
    }
    
    .hero-content, .hero-text, .hero-buttons {
        position: static !important;
        z-index: auto !important;
    }
    .hero-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 1em !important;
        background: none !important;
        box-shadow: none !important;
        padding-bottom: 0 !important;
    }
    .hero-text {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 0.5em !important;
    }
    .hero-text h1 {
        font-size: 1.5em !important;
        text-align: left !important;
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000;
    }
    .hero-text p {
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000;
        margin-bottom: 1em !important;
    }
    .hero-buttons {
        order: 2 !important;
        width: 100% !important;
        margin-top: 0 !important;
        gap: 1em !important;
        align-items: stretch !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .hero-buttons .btn, .hero-buttons button, .hero-buttons a {
        background: #1e88e5 !important;
        color: #fff !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        border: none !important;
        font-size: 1.1em !important;
        padding: 0.9em 1.6em !important;
        font-weight: 600;
        letter-spacing: 0.03em;
        transition: background 0.2s, color 0.2s;
    }
    .hero-buttons .btn:active, .hero-buttons button:active, .hero-buttons a:active {
        background: #1565c0 !important;
        color: #fff !important;
    }
    
    /* Стилі для другого банера (graphite-texture) - піднімаємо контент на 0.5см */
    section.graphite-texture {
        padding-top: 3.5cm !important; /* Зменшуємо з 4cm на 3.5cm (піднімаємо на 0.5cm) */
    }
    
    .graphite-texture {
        padding-top: 3.5cm !important; /* Зменшуємо з 4cm на 3.5cm (піднімаємо на 0.5cm) */
    }
    
    /* Стилі для другого банера (cta-section) - зменшуємо контент */
    .cta-section {
        padding: 1.5em 1em !important; /* Зменшуємо відступи */
        min-height: 200px !important; /* Зменшуємо висоту */
        margin: 2em 0 !important; /* Зменшуємо зовнішні відступи */
    }
    
    .cta-section h3 {
        font-size: 1.8em !important; /* Зменшуємо заголовок */
        margin-bottom: 0.4em !important;
        line-height: 1.2 !important;
        padding: 0 0.5em !important;
    }
    
    .cta-section p {
        font-size: 1.1em !important; /* Зменшуємо підзаголовок */
        margin-bottom: 1em !important;
        line-height: 1.3 !important;
        padding: 0 0.5em !important;
    }
    
    .advantages-horizontal {
        min-width: unset;
        flex-wrap: wrap;
        gap: 1em;
        padding: 1em;
    }
    .advantage-item {
        width: 100%;
        max-width: none;
    }
    .team-members {
        flex-direction: column;
        align-items: center;
    }
    .team-member {
        width: 100%;
        max-width: none;
    }
    .calculator-form {
        width: 90%;
        padding: 1.5em;
    }
    .guarantee {
        margin-bottom: 1.2em !important;
        display: block !important;
        opacity: 1 !important;
        position: static !important;
    }
    .hero-content::before,
    .hero-content::after,
    .hero-overlay {
        display: none !important;
        background: none !important;
    }
    .hero, .hero-section, .hero-content {
        height: auto !important;
        min-height: unset !important;
        max-height: unset !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
}

@media (max-width: 480px) {
    main {
        padding-top: 80px !important; /* Even smaller padding for very small screens */
    }
    
    /* Стилі кнопок перенесено в animations.css */
    
    .hero-content {
        padding: 1rem !important;
        position: relative !important;
        z-index: 3 !important;
        text-align: left !important;
        gap: 0.8rem !important;
        margin-top: 60px !important; /* Further adjusted for smaller screens */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .hero-content h1 {
        font-size: 1.8em !important;
        white-space: normal !important;
        color: #fff !important;
        text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.95), 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
    }
    
    .guarantee {
        font-size: 1em !important;
        color: #fff !important;
        text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.95), 1px 1px 4px rgba(0, 0, 0, 0.8) !important;
    }
    
    /* Додаткові стилі для другого банера на дуже маленьких екранах */
    section.graphite-texture {
        padding-top: 3cm !important; /* Ще більше піднімаємо на маленьких екранах */
    }
    
    .graphite-texture {
        padding-top: 3cm !important; /* Ще більше піднімаємо на маленьких екранах */
    }
    
    .cta-section {
        padding: 1em 0.5em !important; /* Ще менші відступи */
        min-height: 180px !important; /* Ще менша висота */
        margin: 1.5em 0 !important;
    }
    
    .cta-section h3 {
        font-size: 1.5em !important; /* Ще менший заголовок */
        margin-bottom: 0.3em !important;
        padding: 0 0.3em !important;
    }
    
    .cta-section p {
        font-size: 1rem !important; /* Ще менший підзаголовок */
        margin-bottom: 0.8em !important;
        padding: 0 0.3em !important;
    }
    
    /* Стилі для cta-button перенесено в animations.css */
    .hero-buttons {
        order: 2 !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-top: 1.2em !important;
    }
    
    .hero-button {
        width: 100% !important;
    }
    
    .hero-text p {
        margin-bottom: 1.2em !important;
    }
} 

/* Анімації для hero секцій на мобільних пристроях */
@media (max-width: 768px) {
    .news-hero,
    .contacts-hero,
    .services-hero,
    .news-detail-hero,
    .projects-hero,
    .products-hero,
    .pavement-tiles-hero,
    .materials-hero {
        background: linear-gradient(135deg, #219653 0%, #2c3e50 100%);
        background-size: 200% 200%;
        animation: gradientShift 6s ease infinite;
    }
    
    .news-hero h1,
    .contacts-hero h1,
    .services-hero h1,
    .news-detail-hero h1,
    .projects-hero h1,
    .products-hero h1,
    .pavement-tiles-hero h1,
    .materials-hero h1 {
        animation: titleGlow 4s ease-in-out infinite alternate;
    }
}

@media (max-width: 480px) {
    .news-hero,
    .contacts-hero,
    .services-hero,
    .news-detail-hero,
    .projects-hero,
    .products-hero,
    .pavement-tiles-hero,
    .materials-hero {
        animation: gradientShift 5s ease infinite;
    }
    
    .news-hero h1,
    .contacts-hero h1,
    .services-hero h1,
    .news-detail-hero h1,
    .projects-hero h1,
    .products-hero h1,
    .pavement-tiles-hero h1,
    .materials-hero h1 {
        animation: titleGlow 5s ease-in-out infinite alternate;
    }
}

/* Анімації появи при завантаженні сторінки на мобільних */
@media (max-width: 768px) {
    .news-hero,
    .contacts-hero,
    .services-hero,
    .news-detail-hero,
    .projects-hero,
    .products-hero,
    .pavement-tiles-hero,
    .materials-hero {
        animation: fadeInUp 0.8s ease-out, gradientShift 6s ease infinite 0.8s;
    }
    
    .news-hero h1,
    .contacts-hero h1,
    .services-hero h1,
    .news-detail-hero h1,
    .projects-hero h1,
    .products-hero h1,
    .pavement-tiles-hero h1,
    .materials-hero h1 {
        animation: slideInFromTop 1s ease-out 0.2s both, titleGlow 4s ease-in-out infinite alternate 1.2s;
    }
    
    .news-card,
    .project-card,
    .product-card,
    .material-card {
        animation: scaleIn 0.6s ease-out both;
    }
    
    .news-card:nth-child(1) { animation-delay: 0.8s; }
    .news-card:nth-child(2) { animation-delay: 0.9s; }
    .news-card:nth-child(3) { animation-delay: 1s; }
    .news-card:nth-child(4) { animation-delay: 1.1s; }
    
    .project-card:nth-child(1) { animation-delay: 0.8s; }
    .project-card:nth-child(2) { animation-delay: 0.9s; }
    .project-card:nth-child(3) { animation-delay: 1s; }
    .project-card:nth-child(4) { animation-delay: 1.1s; }
    
    .product-card:nth-child(1) { animation-delay: 0.8s; }
    .product-card:nth-child(2) { animation-delay: 0.9s; }
    .product-card:nth-child(3) { animation-delay: 1s; }
    .product-card:nth-child(4) { animation-delay: 1.1s; }
    
    .material-card:nth-child(1) { animation-delay: 0.8s; }
    .material-card:nth-child(2) { animation-delay: 0.9s; }
    .material-card:nth-child(3) { animation-delay: 1s; }
    .material-card:nth-child(4) { animation-delay: 1.1s; }
    
    .service-item {
        animation: fadeInUp 0.6s ease-out both;
    }
    
    .service-item:nth-child(1) { animation-delay: 0.8s; }
    .service-item:nth-child(2) { animation-delay: 0.9s; }
    .service-item:nth-child(3) { animation-delay: 1s; }
    .service-item:nth-child(4) { animation-delay: 1.1s; }
}

@media (max-width: 480px) {
    .news-hero,
    .contacts-hero,
    .services-hero,
    .news-detail-hero,
    .projects-hero,
    .products-hero,
    .pavement-tiles-hero,
    .materials-hero {
        animation: fadeInUp 0.6s ease-out, gradientShift 5s ease infinite 0.6s;
    }
    
    .news-hero h1,
    .contacts-hero h1,
    .services-hero h1,
    .news-detail-hero h1,
    .projects-hero h1,
    .products-hero h1,
    .pavement-tiles-hero h1,
    .materials-hero h1 {
        animation: slideInFromTop 0.8s ease-out 0.1s both, titleGlow 5s ease-in-out infinite alternate 1s;
    }
    
    .news-card,
    .project-card,
    .product-card,
    .material-card {
        animation: scaleIn 0.5s ease-out both;
    }
    
    .news-card:nth-child(1) { animation-delay: 0.6s; }
    .news-card:nth-child(2) { animation-delay: 0.7s; }
    .news-card:nth-child(3) { animation-delay: 0.8s; }
    
    .project-card:nth-child(1) { animation-delay: 0.6s; }
    .project-card:nth-child(2) { animation-delay: 0.7s; }
    .project-card:nth-child(3) { animation-delay: 0.8s; }
    
    .product-card:nth-child(1) { animation-delay: 0.6s; }
    .product-card:nth-child(2) { animation-delay: 0.7s; }
    .product-card:nth-child(3) { animation-delay: 0.8s; }
    
    .material-card:nth-child(1) { animation-delay: 0.6s; }
    .material-card:nth-child(2) { animation-delay: 0.7s; }
    .material-card:nth-child(3) { animation-delay: 0.8s; }
    
    .service-item {
        animation: fadeInUp 0.5s ease-out both;
    }
    
    .service-item:nth-child(1) { animation-delay: 0.6s; }
    .service-item:nth-child(2) { animation-delay: 0.7s; }
    .service-item:nth-child(3) { animation-delay: 0.8s; }
}

/* Анімації для шапки на мобільних пристроях */
@media (max-width: 768px) {
    header {
        transition: all 0.3s ease;
        /* Background is defined in main stylesheet; remove debug red overlay */
    }
    
    header.scrolled {
        /* Use default scrolled styles; no debug red */
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    
    nav a {
        transition: all 0.2s ease;
    }
    
    nav a:hover {
        transform: translateY(-1px);
    }
    
    .logo {
        transition: all 0.3s ease;
    }
    
    header:hover .logo {
        transform: scale(1.03);
    }
}

@media (max-width: 480px) {
    header {
        transition: all 0.2s ease;
        /* Remove debug red overlay */
    }
    
    header.scrolled {
        /* Use default scrolled styles; no debug red */
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }
    
    nav a:hover {
        transform: none;
    }
    
    header:hover .logo {
        transform: scale(1.02);
    }
}

/* Version: mobile-v2.5 - Added header animations */ 