/* ============================================
   RESPONSIVE MEDIA QUERIES
   Digital Falls - Adaptive Design for All Devices
   ============================================ */

/* ============================================
   EXTRA LARGE DESKTOPS (2560px+)
   4K Monitors and Ultra-Wide Displays
   ============================================ */
@media (min-width: 2560px) {
    :root {
        --max-content-width: 1600px;
    }

    .section-container {
        max-width: 1600px;
    }

    header {
        max-width: 1400px;
    }

    h1 {
        font-size: 4.5rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .section-header-modern {
        font-size: 2rem;
    }

    .squere {
        max-width: 1400px;
        padding: 50px;
    }

    .service-item p,
    .benefit-item p {
        font-size: 1rem;
    }
}

/* ============================================
   LARGE DESKTOPS (1920px - 2559px)
   Full HD Monitors
   ============================================ */
@media (min-width: 1920px) and (max-width: 2559px) {
    .section-container {
        max-width: 1400px;
    }

    header {
        max-width: 1200px;
    }

    .squere {
        max-width: 1300px;
    }
}

/* ============================================
   MEDIUM DESKTOPS (1440px - 1919px)
   Standard Desktop Monitors, 15-17" Laptops
   ============================================ */
@media (min-width: 1440px) and (max-width: 1919px) {
    .section-container {
        max-width: 1200px;
    }

    .squere {
        max-width: 1200px;
    }
}

/* ============================================
   SMALL LAPTOPS & DESKTOPS (1200px - 1439px)
   13-14" Laptops, Small Desktop Screens
   ============================================ */
@media (min-width: 1200px) and (max-width: 1439px) {
    header {
        max-width: 1000px;
    }

    .section-container {
        max-width: 1000px;
    }

    .squere {
        max-width: 1000px;
        padding: 30px;
    }

    .services-detailed,
    .benefits-detailed {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* ============================================
   TABLETS LANDSCAPE & SMALL LAPTOPS (1025px - 1199px)
   iPad Pro Landscape, Small Laptops
   ============================================ */
@media (min-width: 1025px) and (max-width: 1199px) {
    header {
        width: 95%;
        padding: 10px 20px;
    }

    .logo {
        font-size: 1.6rem;
    }

    .nav-links {
        gap: 25px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .section-container {
        width: 90%;
        padding: 50px 0;
    }

    .squere {
        width: 85%;
        max-width: 900px;
        padding: 30px;
    }

    .services-detailed,
    .benefits-detailed {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

/* ============================================
   TABLETS PORTRAIT & LANDSCAPE (768px - 1024px)
   iPad, Android Tablets, Small Laptops
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Header Adjustments */
    header {
        width: 95%;
        padding: 10px 20px;
        min-height: 60px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    header .btn-contact {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .lang-switch {
        gap: 8px;
        font-size: 0.9rem;
    }

    /* Hero Section */
    .hero {
        margin-top: 40px;
        margin-bottom: 25px;
        padding: 0 15px;
    }

    h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    h2 {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
    }

    /* Content Sections */
    .section-container {
        width: 90%;
        padding: 40px 0;
    }

    .section-header-modern {
        font-size: 1.3rem;
        text-align: center;
        margin-bottom: 25px;
    }

    /* Cards and Squares */
    .squere {
        width: 85%;
        max-width: 700px;
        padding: 25px;
        transform: none !important;
        transition: none !important;
    }

    .squere:hover {
        transform: none !important;
    }

    /* Service and Benefit Items */
    .services-detailed,
    .benefits-detailed {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .service-item,
    .benefit-item {
        padding: 15px;
    }

    .service-item h4,
    .benefit-item h4 {
        font-size: 0.95rem;
    }

    .service-item p,
    .benefit-item p {
        font-size: 0.8rem;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* CTA Section */
    .squere-another {
        max-width: 600px;
        padding: 20px 15px;
    }

    .squere-another h2 {
        font-size: 1.2rem;
    }

    .squere-another h3 {
        font-size: 0.9rem;
    }

    .cta-buttons {
        gap: 8px;
    }

    .btn-cta-request,
    .btn-cta-telegram,
    .btn-cta-email {
        width: 180px;
        height: 42px;
        font-size: 0.75rem;
    }

    /* Footer */
    footer {
        padding: 30px 15px;
    }

    .footer-links {
        gap: 20px;
    }

    /* Reviews Page - Tablet */
    .reviews-carousel {
        min-height: 450px;
    }

    .review-card {
        max-width: 700px;
        padding: 30px;
    }

    .carousel-btn.prev {
        left: -25px;
    }

    .carousel-btn.next {
        right: -25px;
    }

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

/* ============================================
   MOBILE HAMBURGER MENU (≤767px)
   Shared styles for all mobile viewports
   ============================================ */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .wooden-sign {
        flex-wrap: wrap;
    }

    .mobile-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 8px;
        animation: slideDown 0.3s ease;
    }

    .mobile-nav.open {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .lang-switch {
        justify-content: center;
        font-size: 1rem;
        gap: 8px;
    }

    .nav-buttons {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .nav-buttons .btn-contact {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
}

/* ============================================
   MOBILE LANDSCAPE (481px - 767px)
   Phones in Landscape Orientation
   ============================================ */
@media (min-width: 481px) and (max-width: 767px) {

    /* Header */
    header {
        width: 95%;
        padding: 8px 15px;
        min-height: auto;
    }

    .logo {
        font-size: 1.4rem;
    }

    /* Hero */
    .hero {
        margin-top: 30px;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 0.3rem;
    }

    h2 {
        font-size: clamp(0.8rem, 2vw, 0.95rem);
    }

    .btn-launch {
        padding: 8px 16px;
        font-size: 0.8rem;
        margin-top: 15px;
    }

    /* Sections */
    .section-container {
        width: 95%;
        padding: 30px 0;
    }

    .section-header-modern {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 20px;
    }

    /* Cards */
    .squere {
        width: 95%;
        padding: 20px;
        gap: 15px;
        margin: 20px auto;
    }

    /* Services and Benefits */
    .services-detailed,
    .benefits-detailed {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .service-item,
    .benefit-item {
        padding: 12px;
    }

    .service-item h4,
    .benefit-item h4 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .service-item p,
    .benefit-item p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .process-step {
        padding: 15px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .step-content h4 {
        font-size: 0.9rem;
    }

    .step-content p {
        font-size: 0.8rem;
    }

    /* CTA Section */
    .squere-another {
        max-width: 500px;
        padding: 18px 12px;
        margin: 30px auto;
    }

    .squere-another h2 {
        font-size: 1.1rem;
    }

    .squere-another h3 {
        font-size: 0.85rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn-cta-request,
    .btn-cta-telegram,
    .btn-cta-email {
        width: 100%;
        max-width: 250px;
        height: 40px;
        font-size: 0.75rem;
    }

    /* Footer */
    footer {
        padding: 25px 10px;
    }

    .footer-container h3 {
        font-size: 1rem;
    }

    .footer-links {
        gap: 12px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .footer-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .copyright {
        font-size: 0.8rem;
    }

    /* Tech Marquee */
    .tech-item {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Reviews Page - Mobile Landscape */
    .reviews-section {
        width: 95%;
        margin: 40px auto;
        padding: 30px 0;
    }

    .reviews-carousel {
        min-height: 400px;
    }

    .review-card {
        padding: 25px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn.prev {
        left: -15px;
    }

    .carousel-btn.next {
        right: -15px;
    }

    .client-avatar {
        width: 60px;
        height: 60px;
    }

    .client-avatar svg {
        width: 36px;
        height: 36px;
    }

    .client-name {
        font-size: 1.2rem;
    }

    .client-role {
        font-size: 0.9rem;
    }

    .review-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .review-content {
        min-height: 120px;
    }
}

/* ============================================
   MOBILE PORTRAIT (320px - 480px)
   Phones in Portrait Orientation
   ============================================ */
@media (max-width: 480px) {

    /* Header */
    header {
        width: 95%;
        padding: 8px 12px;
        min-height: auto;
        top: 10px;
        margin: 10px auto;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-icon {
        width: 20px;
        height: 20px;
    }

    /* Hero Section */
    .hero {
        margin-top: 20px;
        margin-bottom: 15px;
        padding: 0 10px;
    }

    h1 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
        margin-bottom: 0.3rem;
    }

    h2 {
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
        letter-spacing: 2px;
    }

    .btn-launch {
        padding: 8px 14px;
        font-size: 0.75rem;
        margin-top: 12px;
    }

    /* Content Sections */
    .section-container {
        width: 95%;
        padding: 25px 0;
    }

    .section-header-modern {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 15px;
        letter-spacing: 1.5px;
    }

    /* Cards and Squares */
    .squere {
        width: 95%;
        padding: 15px;
        gap: 12px;
        margin: 15px auto;
        border-radius: 15px;
    }

    .squere h3 {
        font-size: 0.9rem;
        gap: 8px;
    }

    .squere h3 svg {
        width: 18px;
        height: 18px;
    }

    /* Services and Benefits */
    .services-detailed,
    .benefits-detailed {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .service-item,
    .benefit-item {
        padding: 12px;
        border-radius: 10px;
    }

    .service-item h4,
    .benefit-item h4 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .service-item p,
    .benefit-item p {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .item-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 8px;
    }

    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .process-step {
        padding: 12px;
        gap: 10px;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .step-content h4 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .step-content p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .process-step .item-icon {
        width: 20px;
        height: 20px;
        margin-bottom: 6px;
    }

    /* CTA Section */
    .squere-another {
        max-width: 100%;
        padding: 15px 10px;
        margin: 25px auto;
        gap: 8px;
    }

    .squere-another h2 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .squere-another h3 {
        font-size: 0.8rem;
        max-width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-top: 8px;
    }

    .btn-cta-request,
    .btn-cta-telegram,
    .btn-cta-email {
        width: 100%;
        max-width: 100%;
        height: 38px;
        font-size: 0.7rem;
        padding: 0 12px;
    }

    /* Footer */
    footer {
        padding: 20px 10px;
        margin-top: 30px;
    }

    .footer-container {
        gap: 12px;
    }

    .footer-container h3 {
        font-size: 0.95rem;
    }

    .footer-links {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .footer-link {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .footer-link svg {
        width: 16px;
        height: 16px;
    }

    .copyright {
        font-size: 0.75rem;
        text-align: center;
    }

    /* Tech Marquee */
    .tech-item {
        padding: 6px 12px;
        font-size: 12px;
    }

    .tech-item::before {
        width: 6px;
        height: 6px;
    }

    .tech-track {
        gap: 20px;
        padding-right: 20px;
    }

    /* Form Elements */
    .request-form-container {
        width: 95%;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn-submit {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    /* Reviews Page - Mobile Portrait */
    .reviews-section {
        width: 95%;
        margin: 30px auto;
        padding: 20px 0;
    }

    .reviews-carousel {
        min-height: 450px;
        margin-bottom: 30px;
    }

    .review-card {
        padding: 20px;
        border-radius: 20px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-btn.prev {
        left: -10px;
    }

    .carousel-btn.next {
        right: -10px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .review-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        margin-bottom: 20px;
    }

    .client-avatar {
        width: 60px;
        height: 60px;
    }

    .client-avatar svg {
        width: 32px;
        height: 32px;
    }

    .client-name {
        font-size: 1.1rem;
    }

    .client-role {
        font-size: 0.85rem;
    }

    .rating {
        justify-content: center;
    }

    .star {
        font-size: 1rem;
    }

    .review-content {
        min-height: 150px;
        margin-bottom: 20px;
    }

    .review-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .review-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        padding-top: 15px;
    }

    .project-type {
        font-size: 0.85rem;
    }

    .date {
        font-size: 0.8rem;
    }

    .carousel-indicators {
        gap: 8px;
        margin-top: 20px;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 24px;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (max-width: 375px)
   iPhone SE, Small Android Phones
   ============================================ */
@media (max-width: 375px) {
    h1 {
        font-size: clamp(1.4rem, 4.5vw, 2rem);
    }

    h2 {
        font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    }

    .section-header-modern {
        font-size: 0.95rem;
    }

    .squere {
        padding: 12px;
    }

    .service-item h4,
    .benefit-item h4 {
        font-size: 0.8rem;
    }

    .service-item p,
    .benefit-item p {
        font-size: 0.65rem;
    }

    .step-content h4 {
        font-size: 0.8rem;
    }

    .step-content p {
        font-size: 0.7rem;
    }

    .btn-cta-request,
    .btn-cta-telegram,
    .btn-cta-email {
        height: 36px;
        font-size: 0.65rem;
    }

    .tech-item {
        padding: 5px 10px;
        font-size: 11px;
    }

    .review-card {
        padding: 15px;
    }

    .review-text {
        font-size: 0.85rem;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION FIXES
   Prevent layout issues in landscape mode
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        position: relative;
        top: 0;
        margin: 10px auto;
    }

    .hero {
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .section-container {
        padding: 20px 0;
    }

    .squere {
        margin: 15px auto;
    }

    .reviews-carousel {
        min-height: 350px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   Remove hover effects on touch devices
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .squere:hover {
        transform: none;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    .service-item:hover,
    .benefit-item:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.03);
    }

    .process-step:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.02);
    }

    .carousel-btn:hover {
        transform: translateY(-50%);
    }

    .indicator:hover {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   Optimize for printing
   ============================================ */
@media print {

    .forest-bg,
    header,
    footer,
    .btn-launch,
    .btn-contact,
    .btn-cta-request,
    .btn-cta-telegram,
    .btn-cta-email,
    .lang-switch,
    .tech-marquee,
    .carousel-btn,
    .carousel-indicators {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .squere,
    .squere-another,
    .review-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }
}