/* Responsive Styles for BitsFlow Website
   Targets mobile and tablet views without affecting desktop */

/* 1280x768 Resolution Optimizations */
@media (max-width: 1280px) and (min-width: 1025px) {
    .container {
        padding: 0 40px;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* Hero Section for 1280x768 */
    .hero {
        height: 520px;
        padding: 20px 0;
    }
    
    .hero-content {
        left: 60px;
        top: 120px;
        width: 580px;
    }
    
    .hero-text h1 {
        font-size: 44px;
        line-height: 54px;
        margin-bottom: 16px;
    }
    
    .hero-text p {
        font-size: 18px;
        line-height: 26px;
        margin-bottom: 24px;
    }
    
    .hero-buttons {
        gap: 16px;
    }
    
    .hero-man-image {
        right: 40px;
        top: 60px;
        width: 480px;
        height: 400px;
    }
    
    /* Stats Section for 1280x768 */
    .stats {
        padding: 60px 0;
    }
    
    .stats-container {
        max-width: 1100px;
        padding: 0 40px;
    }
    
    .stats-grid {
        gap: 40px;
    }
    
    .stat-card {
        width: 220px;
        padding: 24px 16px;
    }
    
    /* Products Section for 1280x768 */
    .products {
        padding: 60px 40px;
    }
    
    .products-container {
        max-width: 1100px;
    }
    
    .product-tabs {
        gap: 16px;
        margin-bottom: 32px;
    }
    
    .product-display {
        padding: 32px;
        gap: 32px;
    }
    
    .product-text {
        width: 45%;
    }
    
    .product-image {
        width: 50%;
    }
    
    /* Services Section for 1280x768 */
    .services {
        padding: 60px 40px;
    }
    
    .services-container {
        max-width: 1100px;
    }
    
    .service-cards {
        gap: 24px;
    }
    
    .service-card {
        width: 30%;
        min-width: 280px;
    }
    
    /* Case Studies Section for 1280x768 */
    .case-studies {
        padding: 70px 40px;
    }
    
    .case-studies-container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    .case-studies-header {
        margin-bottom: 40px;
    }
    
    .case-studies-title {
        font-size: 44px;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    .case-studies-subtitle {
        font-size: 18px;
        line-height: 1.5;
    }
    
    /* Case Studies Section Styles for 1280x768 */
    .case-studies-section {
        padding: 70px 0;
    }
    
    .case-studies-section .case-studies-container {
        max-width: 1200px;
        padding: 0 40px;
        gap: 36px;
    }
    
    .case-studies-section .case-studies-header {
        gap: 18px;
        margin-bottom: 24px;
    }
    
    .case-studies-section .case-studies-title {
        font-size: 44px;
        line-height: 1.2;
        max-width: 900px;
    }
    
    .case-studies-section .case-studies-subtitle {
        font-size: 18px;
        line-height: 1.5;
        max-width: 650px;
    }
    
    /* Case Study Card for 1280x768 */
    .case-studies-section .case-study-card {
        max-width: 1100px;
        padding: 36px;
        gap: 36px;
        min-height: 420px;
    }
    
    .case-studies-section .case-study-text-content {
        max-width: 500px;
        gap: 28px;
    }
    
    .case-studies-section .case-study-info {
        gap: 22px;
    }
    
    .case-studies-section .case-study-logo-box {
        margin-bottom: 18px;
    }
    
    .case-studies-section .case-study-logo {
        width: 180px;
        height: 37px;
    }
    
    .case-studies-section .case-study-heading {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 18px;
    }
    
    .case-studies-section .case-study-tags {
        gap: 10px;
        margin-bottom: 22px;
    }
    
    .case-studies-section .case-study-tag {
        padding: 9px 14px;
        font-size: 13px;
    }
    
    .case-studies-section .case-study-stats-block {
        gap: 28px;
    }
    
    .case-studies-section .case-study-stat-item {
        gap: 6px;
    }
    
    .case-studies-section .stat-value {
        font-size: 44px;
        line-height: 1.1;
    }
    
    .case-studies-section .stat-label {
        font-size: 15px;
        line-height: 1.4;
    }
    
    .case-studies-section .case-study-read-more {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .case-studies-section .case-study-image-container {
        max-width: 500px;
    }
    
    .case-studies-section .case-study-image {
        max-height: 400px;
        border-radius: 12px;
    }
    
    /* Case Studies Body for 1280x768 */
    .case-studies-section .case-studies-body {
        gap: 28px;
    }
    
    .case-studies-section .case-study-card-wrapper {
        height: 420px;
    }
    
    /* Navigation for 1280x768 */
    .case-studies-section .case-study-carousel-nav {
        gap: 18px;
    }
    
    .case-studies-section .case-study-nav-button {
        width: 38px;
        height: 38px;
    }
    
    .case-studies-section .case-study-nav-button i {
        font-size: 17px;
    }
    
    .case-studies-section .case-study-nav-dots {
        gap: 16px;
        width: 14px;
    }
    
    .case-studies-section .case-study-nav-dot {
        width: 14px;
        height: 14px;
    }
    
    /* Legacy case-study-cards support */
    .case-study-cards {
        gap: 24px;
    }
    
    .case-study-card {
        width: 30%;
        min-width: 300px;
    }
    
    /* Testimonials Section for 1280x768 */
    .testimonials {
        padding: 60px 40px;
    }
    
    .testimonials-container {
        max-width: 1100px;
    }
    
    .testimonial-cards {
        gap: 24px;
    }
    
    .testimonial-card {
        width: 45%;
        min-width: 320px;
    }
    
    /* Footer adjustments for 1280x768 */
    footer {
        padding: 60px 40px 30px;
    }
    
    .footer-container {
        max-width: 1100px;
    }
    
    /* Navigation adjustments for 1280x768 */
    .navbar {
        padding: 0 40px;
    }
    
    .nav-menu {
        gap: 24px;
    }
    
    .nav-menu li a {
        font-size: 15px;
    }
    
    /* Button optimizations for 1280x768 */
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 15px;
        min-width: 160px;
    }
    
    .btn-primary {
        gap: 12px;
    }
    
    /* Form optimizations for 1280x768 */
    .contact-form-panel-new {
        padding: 32px;
    }
    
    .form-row-new {
        gap: 16px;
    }
    
    .form-group-new input,
    .form-group-new textarea {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    /* Modal optimizations for 1280x768 */
    .modal-content-wrapper {
        max-width: 900px;
        margin: 0 auto;
    }
    
    .modal-left-panel,
    .modal-right-panel {
        padding: 32px;
    }
    
    /* CTA Section for 1280x768 */
    .cta-section {
        padding: 80px 40px;
    }
    
    .cta-container {
        max-width: 700px;
    }
    
    /* Brands Section for 1280x768 */
    .brands {
        padding: 50px 40px;
    }
    
    .brand-logos {
        gap: 40px;
    }
    
    .brand-logos img {
        width: 140px;
        height: auto;
    }
    
    /* Typography adjustments for 1280x768 */
    h1 {
        font-size: 48px;
        line-height: 58px;
    }
    
    h2 {
        font-size: 36px;
        line-height: 44px;
    }
    
    h3 {
        font-size: 24px;
        line-height: 32px;
    }
    
    p {
        font-size: 16px;
        line-height: 24px;
    }
    
    /* Section spacing for 1280x768 */
    section {
        margin-bottom: 60px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* Card hover effects optimization for 1280x768 */
    .service-card:hover,
    .case-study-card:hover,
    .testimonial-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
}

/* Base Responsive Adjustments */
@media (max-width: 1024px) {
    .container {
        padding: 0 50px;
    }
    
    h1 {
        font-size: 48px;
        line-height: 60px;
    }
    
    h2 {
        font-size: 38px;
        line-height: 48px;
    }
    
    p {
        font-size: 18px;
        line-height: 28px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 36px;
        line-height: 46px;
    }
    
    h2 {
        font-size: 28px;
        line-height: 36px;
    }
    
    p {
        font-size: 16px;
        line-height: 24px;
    }
    
    /* Button adjustments for mobile */
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        justify-content: center;
    }
}

/* Hero Section Responsive */
@media (max-width: 1024px) {
    .hero {
        height: auto;
        flex-direction: column;
        padding: 40px 0;
    }
    
    .hero-content {
        position: static;
        width: 100%;
        padding: 0 50px;
        text-align: center;
        margin-bottom: 40px;
    }
    
    .hero-man-image {
        position: static;
        width: 100%;
        height: 400px;
        background-position: center;
    }
    
    .hero-gradient-overlay {
        display: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-icon {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 30px 0;
    }
    
    .hero-content {
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .hero-man-image {
        height: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-text h1 {
        margin-bottom: 15px;
    }
}

/* Brands Section Responsive */
@media (max-width: 1024px) {
    .brands {
        height: auto;
        padding: 40px 20px;
        margin-bottom: 50px;
    }
    
    .brand-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .brand-logos img {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .brands {
        padding: 30px 15px;
    }
    
    .brand-logos {
        gap: 20px;
    }
    
    .brand-logos img {
        width: 100px;
    }
}

/* Stats Section Responsive */
@media (max-width: 1024px) {
    .stats {
        height: auto;
        padding: 40px 0;
        margin-bottom: 40px;
    }
    
    .stats-container {
        width: 100%;
        max-width: 900px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .stats-header {
        text-align: center;
        margin-bottom: 40px;
        width: 100%;
    }
    
    .stats-header h2 {
        margin-bottom: 15px;
    }
    
    .stats-grid {
        width: 100%;
        flex-wrap: wrap;
        gap: 30px;
        justify-content: center;
        margin-bottom: 30px;
    }
    
    .stat-card {
        width: 45%;
        max-width: 200px;
        align-items: center;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 15px;
    }
    
    .stats-container > .btn-secondary {
        display: block;
        margin: 20px auto 0;
    }
}

@media (max-width: 768px) {
    .stats {
        padding: 30px 0;
        margin-bottom: 30px;
        overflow-x: hidden;
    }
    
    .stats-container {
        padding: 0 15px;
    }
    
    .stats-header {
        margin-bottom: 25px;
    }
    
    .stats-header h2 {
        font-size: 26px;
        line-height: 32px;
    }
    
    .stats-header p {
        font-size: 16px;
        line-height: 24px;
        padding: 0 10px;
    }
    
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .stat-card {
        width: 100%;
        height: auto;
        padding: 15px 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-radius: 10px;
        background-color: #ffffff;
        margin-bottom: 0;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }
    
    .stat-content h3 {
        font-size: 28px;
        line-height: 34px;
        margin-bottom: 5px;
    }
    
    .stat-content p {
        font-size: 14px;
        line-height: 20px;
    }
    
    .stats-container > .btn-secondary {
        margin-top: 25px;
        width: 100%;
        max-width: 220px;
    }
}

/* Products Section Responsive */
@media (max-width: 1024px) {
    .products {
        height: auto;
        padding: 40px 20px;
        gap: 30px;
        overflow-x: hidden;
    }
    
    .products-container {
        width: 100%;
        height: auto;
        padding: 0;
    }
    
    .section-header {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        margin-bottom: 10px;
    }
    
    .product-controls {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 30px;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Hide all carousel navigation elements */
    .carousel-nav, 
    .product-controls .carousel-nav,
    .products-container .carousel-nav,
    .products .carousel-nav,
    .carousel-nav.nav-arrow,
    .nav-arrow,
    .prev-arrow,
    .next-arrow,
    button.nav-arrow,
    button.prev-arrow,
    button.next-arrow,
    .products button.nav-arrow,
    .products .nav-arrow,
    .nav-arrow i,
    .carousel-nav i {
        display: none !important; /* Force hide carousel controls on mobile */
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .product-action-buttons {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .product-action-buttons .btn-primary,
    .product-action-buttons .btn-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }
    
    .product-tabs {
        width: 100%;
        gap: 12px;
        margin-bottom: 30px;
    }
    
    .tab button {
        white-space: nowrap;
        border: 1px solid #e0e7ff;
        background: #ffffff;
        color: #3b82f6;
        transition: all 0.2s ease;
    }
    
    .product-display.active {
        flex-direction: column;
    }
    
    .product-text {
        width: 100%;
        text-align: center;
        align-items: center;
    }
    
    .product-image {
        width: 100%;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .products {
        padding: 35px 15px;
    }
    
    .section-header {
        margin-bottom: 25px;
        padding: 0 10px;
    }
    
    .section-header h2 {
        font-size: 26px;
        line-height: 32px;
        margin-bottom: 8px;
    }
    
    .section-header p {
        font-size: 16px;
        line-height: 22px;
    }
    
    .product-tabs {
        gap: 12px;
        width: 100%;
        overflow-x: scroll !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding: 10px 5px 15px 5px;
        margin-bottom: 20px;
        display: flex !important;
        scroll-behavior: smooth;
        white-space: nowrap !important;
        position: relative;
        padding-right: 80px; /* Add significant space to ensure last item is scrollable */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Make sure tab items are properly sized */
    .product-tabs > .tab {
        flex: 0 0 auto !important;
        margin-right: 5px;
    }
    
    /* Add fading edge indicators to show there's more content */
    .product-tabs::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;
        width: 30px;
        background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
        pointer-events: none;
    }
    
    .product-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .tab {
        scroll-snap-align: start;
    }
    
    .tab button {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 20px;
        white-space: nowrap;
        min-width: max-content;
        border: 1px solid #e0e7ff;
        background: #ffffff;
        color: #3b82f6;
        transition: all 0.2s ease;
    }
    
    .tab.active button {
        background: #3b82f6;
        color: #ffffff;
        border-color: #3b82f6;
    }
    
    .product-display {
        padding: 15px;
        border-radius: 12px;
        background: #f8fafc;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        overflow: hidden;
        position: relative;
        z-index: 1;
    }
    
    .product-content {
        width: 100%;
        position: relative;
    }
    
    .product-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .product-cards-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }
    
    .product-card {
        width: 100%;
        max-width: 320px;
        margin: 0;
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .product-card img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        position: relative;
    }
    
    /* Fix the image overlapping issue */
    .product-card .product-info {
        padding: 15px;
        position: relative;
        z-index: 2;
        background: white;
    }
    
    .product-card h3 {
        font-size: 20px;
        line-height: 26px;
        margin-bottom: 8px;
    }
    
    .product-card p {
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 15px;
    }
    
    /* Make sure buttons are on top and clickable */
    .product-card a, .product-card .btn-secondary, .product-card .btn-primary {
        position: relative;
        z-index: 3;
        display: inline-block;
        width: auto;
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Services Section Responsive */
@media (max-width: 1024px) {
    .services {
        height: auto;
        padding: 40px 50px;
    }
    
    .services-container {
        width: 100%;
        height: auto;
    }
    
    .service-cards {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .service-card {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 30px 20px;
    }
    
    .service-card {
        width: 100%;
        max-width: 280px;
    }
}

/* Case Studies Section Responsive */
@media (max-width: 1024px) {
    .case-studies {
        height: auto;
        padding: 40px 50px;
    }
    
    .case-studies-container {
        width: 100%;
        height: auto;
    }
    
    .case-study-cards {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .case-study-card {
        width: 45%;
    }
    
    .case-studies-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
    }
    
    .carousel-nav {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .case-studies {
        padding: 30px 20px;
    }
    
    .case-study-card {
        width: 100%;
        max-width: 280px;
    }
}

/* Testimonials Section Responsive */
@media (max-width: 1024px) {
    .testimonials {
        height: auto;
        padding: 40px 50px;
    }
    
    .testimonials-container {
        width: 100%;
        height: auto;
    }
    
    .testimonial-cards {
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }
    
    .testimonial-card {
        width: 45%;
    }
    
    .testimonials-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .testimonials {
        padding: 30px 20px;
    }
    
    .testimonial-card {
        width: 100%;
        max-width: 280px;
    }
    
    .testimonial-text {
        font-size: 14px;
        line-height: 22px;
    }
    
    .testimonial-author {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
