/* ================================
   ADVERSITY MEDIA - RESPONSIVE STYLES
   Mobile-First Responsive Design
   ================================ */

/* Mobile Form Improvements */
@media (max-width: 767.98px) {
    /* Form controls */
    input, textarea, select, .form-control {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Form layout */
    form {
        margin-bottom: 30px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
    }
    
    /* Mobile Grid System Improvements */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, 
    .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, 
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 20px;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .card-body {
        flex: 1 1 auto;
        padding: 20px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
}

/* Extra Small Devices (Phones) - 0px to 575px */
@media (max-width: 575.98px) {
    /* Base Mobile Settings */
    html { 
        font-size: 15px;
        scroll-behavior: smooth;
    }
    
    body {
        -webkit-text-size-adjust: 100%; 
        -webkit-tap-highlight-color: transparent;
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }
    
    /* Container Mobile */
    .container {
        padding: 0 20px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Typography Adjustments */
    h1 { font-size: 2.4rem; line-height: 1.3; margin-bottom: 1rem; letter-spacing: -0.02em; }
    h2 { font-size: 2rem; line-height: 1.3; margin-bottom: 0.9rem; letter-spacing: -0.01em; }
    h3 { font-size: 1.6rem; line-height: 1.4; margin-bottom: 0.8rem; }
    h4 { font-size: 1.3rem; line-height: 1.4; margin-bottom: 0.7rem; }
    
    p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
        color: var(--gray-700);
    }
    
    .text-small {
        font-size: 0.9rem;
    }
    
    .text-large {
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 50px;
        border-radius: 10px;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 500;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        margin: 5px;
    }
    
    .btn-large {
        padding: 16px 28px;
        font-size: 17px;
        min-height: 54px;
        font-weight: 600;
    }
    
    .btn-full {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        font-weight: 600;
        margin: 10px 0;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin: 15px 0;
    }
    
    /* Top Bar - Hide on mobile */
    .top-bar {
        display: none !important;
    }
    
    /* Navigation Mobile */
    .navbar {
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
        min-height: 70px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }
    
    .navbar-brand {
        height: 40px;
        display: flex;
        align-items: center;
    }
    
    .navbar-brand img {
        height: 45px;
        width: auto;
        object-fit: contain;
        max-width: 100%;
    }
    
    .navbar-toggler {
        border: none;
        padding: 6px 8px;
        font-size: 1.1rem;
        color: var(--primary-blue);
        background: transparent;
        border-radius: 6px;
        transition: all 0.2s ease;
    }
    
    .navbar-toggler:hover {
        background: rgba(43, 76, 143, 0.1);
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(43, 76, 143, 0.2);
        outline: none;
    }
    
    .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin-top: 0.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(43, 76, 143, 0.15);
    border: 1px solid rgba(43, 76, 143, 0.1);
    position: absolute;
    top: 100%;
    left: 10px;
    right: 10px;
    z-index: 1050;
    animation: slideDown 0.4s ease;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.navbar-nav {
    text-align: center;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar-nav .nav-item {
    margin: 0;
    width: 100%;
    max-width: 280px; /* Control max width for better centering */
}

.navbar-nav .nav-link {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-700);
    border-bottom: 1px solid rgba(43, 76, 143, 0.08);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center; /* This centers the text */
    text-align: center;
    min-height: 44px;
    border-radius: 6px;
    margin: 2px 0;
    width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-blue);
    background: rgba(43, 76, 143, 0.08);
    border-color: transparent;
}

.navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
}

.navbar-actions {
    margin-top: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.navbar-actions .btn {
    width: 100%;
    max-width: 280px; /* Match the nav items max-width */
    padding: 14px 24px;
    margin: 8px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}
    
    /* Fix for mobile spacing */
    .mb-4, .my-4 {
        margin-bottom: 1.8rem !important;
    }
    
    .mt-4, .my-4 {
        margin-top: 1.8rem !important;
    }
    
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 120px 0 60px;
        min-height: 100vh;
        text-align: center;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    /* Improve image handling on mobile */
    img, svg {
        max-width: 100%;
        height: auto;
    }
    
    /* Improve spacing between sections */
    section {
        padding: 50px 0;
        margin-bottom: 0;
    }
    
    /* Fix for overflow issues */
    .row {
        margin-left: -10px;
        margin-right: -10px;
        width: 100%;
    }
    
    .hero-content {
        margin-bottom: 3rem;
        padding: 0 ;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-badge {
        padding: 8px 16px;
        font-size: 13px;
        margin-bottom: 1.5rem;
        display: inline-block;
        border-radius: 20px;
        font-weight: 600;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
        line-height: 1.2;
        font-weight: 800;
    }
    
    .hero-intro {
        font-size: 0.7em;
        opacity: 0.9;
    }
    
    .hero-typed-text {
        font-size: 0.6em;
        display: block;
        margin-top: 0.5rem;
    }
    
    .hero-text-wrapper {
        min-height: 80px;
        margin-bottom: 1rem;
    }
    
.hero-description {
    font-size: 1rem;
    margin-bottom: 3rem;
    line-height: 1.6;
    padding: 0 15px; /* Increased padding for better spacing */
    max-width: 420px; /* Slightly increased max-width */
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* Ensure center alignment */
    color: rgba(255, 255, 255, 0.9); /* Better contrast on gradient background */
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* General hero button styling */
.hero-actions .btn {
    width: 100%;
    max-width: 240px;
    min-width: 200px;
    padding: 12px 20px;
    font-size: 14px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
    min-height: 45px;
    box-sizing: border-box;
}

/* (Optional) If you want individual tweaks */
.hero-actions .btn:first-child {
    /* Add individual adjustments for Let's Discuss here if needed */
    transform: translateX(11px);
}

.hero-actions .btn:last-child {
    /* Add individual adjustments for View Portfolio here if needed */
    transform: translateX(7px);
}

/* (Optional) Further ensure that both buttons are always always centered */
.hero-content .hero-actions {
    text-align: center;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
}

.hero-visual {
    margin-top: -3rem; /* Reduced from -10rem */
    order: 1;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual img {
    max-width: 100%; /* Responsive width */
    width: 100%; /* Full container width */
    height: auto;
    border-radius: 12px;
    max-height: 350px; /* Increased from 300px */
    object-fit: contain;
}

    /* Hero Shapes Mobile Optimization */
    .hero-shapes .shape {
        opacity: 0.6;
        animation-duration: 8s;
    }
    
    .shape-1 {
        width: 120px;
        height: 120px;
        top: 15%;
        left: 5%;
    }
    
    .shape-2 {
        width: 100px;
        height: 100px;
        top: 65%;
        right: 10%;
    }
    
    .shape-3 {
        width: 80px;
        height: 80px;
        bottom: 25%;
        left: 15%;
    }
    
    .shape-4 {
        width: 60px;
        height: 60px;
        top: 45%;
        right: 25%;
    }
    
    /* Section Mobile */
    section {
        padding: 50px 0;
    }
    
    .section-badge {
        font-size: 11px;
        padding: 6px 16px;
        margin-bottom: 1rem;
        border-radius: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        line-height: 1.3;
        text-align: center;
    }
    
    .section-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        line-height: 1.6;
        text-align: center;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* About Section Mobile */
    .about-section {
        padding: 50px 0;
        background: #ffffff !important;
        background-color: #ffffff !important;
    }
    
    .about-image-wrapper {
        margin-bottom: 2.5rem;
        text-align: center;
        position: relative;
        justify-content: center;
        margin-left: 16.5px;
    }
    
    .about-main-img {
    border-radius: 12px;
    max-width: 90%;
    height: auto;
    box-shadow: var(--shadow);
    }
    
.experience-badge {
    position: absolute !important;
    bottom: 15px;
    left: 10%; /* Match image left margin */
    right: 5%; /* Match image right margin */
    width: 80%; /* Match the 90% image width minus padding */
    padding: 20px 25px; /* More horizontal padding for rectangular shape */
    border-radius: 8px; /* Less rounded for more rectangular look */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    z-index: 10;
    min-height: 70px; /* Set minimum height for rectangular shape */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
    .experience-number {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        color: var(--primary-blue);
    }
    
    .experience-badge p {
        font-size: 0.9rem;
        margin: 0;
        color: var(--gray-600);
    }
    
    .about-content {
        text-align: center;
        padding: 0 10px;
        margin-left: 1rem;
    }
    .about-features {
        margin: 2rem 0;
        text-align: left;
        max-width: 400px;
        margin-left: 2rem;
        margin-right: auto;
    }
    
    .feature-item {
        margin-bottom: 1rem;
        font-size: 0.9rem;
        padding: 0.5rem 0.5;
        display: flex;
        align-items: center;
    }
    
    .feature-item i {
        margin-right: 12px;
        color: var(--accent-orange);
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .founder-info {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(43, 76, 143, 0.1);
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .founder-image img {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: 2px solid var(--primary-blue);
    }
    
    .founder-details h4 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .founder-details span {
        font-size: 0.85rem;
        color: var(--primary-blue);
    }
    
/* Stats Section Mobile */
.stats-section {
    padding: 30px 0 25px; /* Reduced padding */
    background: #e7e7e7; /* Changed back to light gray */
    position: relative;
    overflow: hidden;
    margin-top: 15px; /* Reduced margin */
}

.stats-section .container {
    padding: 0 15px; /* Reduced padding */
    margin-left: auto;
    margin-right: auto;
    margin-top: -1rem; /* Reduced negative margin */
    transform: translateX(5px); /* Reduced right shift */
}

.stats-section .row {
    margin: 8px -6px 0; /* Reduced margins */
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Target your Bootstrap columns */
.stats-section .col-lg-3,
.stats-section .col-md-6 {
    padding: 0 6px; /* Reduced padding */
    margin-bottom: 8px; /* Reduced vertical spacing between rows */
    display: flex;
    align-items: stretch;
}

.stat-item {
    padding: 0.8rem 0.4rem; /* Reduced padding for smaller cards */
    margin-bottom: -0.4rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 10px; /* Slightly smaller radius */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    min-height: 115px; /* Reduced height for smaller cards */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
}

.stat-icon {
    margin-bottom: 0.4rem; /* Reduced spacing */
}

.stat-icon img {
    width: 34px; /* Smaller icons */
    height: 34px;
}

.stat-number {
    font-size: 1.7rem; /* Smaller font */
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.3rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem; /* Smaller text */
    color: var(--gray-600);
    margin: 0;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    padding: 0 4px;
}

/* Mobile specific - Force 2 columns with very tight spacing */
@media (max-width: 767.98px) {
    .stats-section {
        padding: 25px 0 20px; /* More compact mobile padding */
        margin-top: 10px;
    }
    
    .stats-section .container {
        padding: 0 12px;
        margin-top: -0.5rem;
        transform: translateX(3px);
    }
    
    .stats-section .row {
        margin: 5px -4px 0; /* Very tight margins */
    }
    
    .stats-section .col-lg-3,
    .stats-section .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 4px; /* Very tight padding */
        margin-bottom: 6px; /* Very reduced spacing between rows */
        display: flex;
    }
    
    .stat-item {
        min-height: 105px; /* Smaller mobile cards */
        padding: 0.7rem 0.3rem;
        flex: 1;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.68rem;
    }
    
    .stat-icon img {
        width: 30px; /* Even smaller on mobile */
        height: 30px;
    }
}


/* Services Section Mobile */
.services-section {
    padding: 50px 0;
}

.services-section .container {
    padding: 0 20px;
}

.services-section .row {
    margin: 0;
    justify-content: center;
}

.services-section [class*="col-"] {
    padding: 0 15px;
}

.service-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(43, 76, 143, 0.08);
    width: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 1);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-icon img {
    width: 50px;
    height: 50px;
}

.service-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.service-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.service-features {
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 0;
    list-style: none;
}

.service-features li {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
}

.service-features i {
    color: var(--accent-orange);
    margin-right: 8px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.service-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.service-link:hover {
    background: var(--accent-orange);
    transform: scale(1.1);
    color: var(--white);
}

/* Mobile specific - Match portfolio section structure */
@media (max-width: 767.98px) {
    .services-section {
        padding: 40px 0;
    }
    
    .services-section .container {
        padding: 0 30px;
    }
    
    .services-section .row {
        margin: 0;
    }
    
    .services-section [class*="col-"] {
        padding: 0;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .service-icon img {
        width: 60px;
        height: 60px;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    .service-description {
        font-size: 0.95rem;
    }
    
    .service-features {
        font-size: 0.9rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .services-section .container {
        padding: 0 25px;
    }
    
    .service-card {
        margin-bottom: 20px;
    }
}
/* Portfolio Section Mobile */
.portfolio-section {
    padding: 50px 0;
    background: #ffffff;
}

.portfolio-section .container {
    padding: 0 15px;
    max-width: 100%;
    margin: 0 auto;
}

.portfolio-section .row {
    margin: 0 -10px;
}

.portfolio-section [class*="col-"] {
    padding: 0 10px;
}

.portfolio-item {
    margin-bottom: 20px;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    background: var(--white);
}

.portfolio-image {
    width: 100%;
    padding-bottom: 100%; /* Creates perfect square */
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Only zoom effect on home page */
#portfolio .portfolio-image:hover img {
    transform: scale(1.08);
}

/* Remove overlay from home page */
#portfolio .portfolio-overlay {
    display: none !important;
}

/* Portfolio page - Make overlay and buttons work on mobile */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: rgba(43, 76, 143, 0.85); */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allow clicks to pass through when hidden */
}

.portfolio-image:hover .portfolio-overlay {
    opacity: 1;
    pointer-events: auto; /* Enable clicks when visible */
}

.portfolio-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.portfolio-action {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    color: var(--primary-color, #c4c4c4);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    pointer-events: auto; /* Ensure button is always clickable */
}

.portfolio-action:hover {
    background: whitesmoke;
    color: white;
    transform: scale(1.1);
}

.portfolio-content {
    text-align: center;
    color: white;
}

/* Mobile specific - Slightly reduced size for better look */
@media (max-width: 767.98px) {
    .portfolio-section {
        padding: 40px 0;
    }
    
    .portfolio-section .container {
        padding: 0 30px;
    }
    
    .portfolio-section .row {
        margin: 0;
    }
    
    .portfolio-section [class*="col-"] {
        padding: 0;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .portfolio-item {
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .portfolio-image {
        padding-bottom: 100%;
        border-radius: 15px;
    }
    
    /* Mobile: Show overlay on tap/touch */
    .portfolio-image:active .portfolio-overlay,
    .portfolio-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
    
    .portfolio-action {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .portfolio-section .container {
        padding: 0 25px;
    }
    
    .portfolio-item {
        margin-bottom: 20px;
    }
    
    .portfolio-image {
        padding-bottom: 100%;
    }
    
    .portfolio-action {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

/* Tablets - 2 columns */
@media (min-width: 768px) and (max-width: 991.98px) {
    .portfolio-section [class*="col-md-6"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .portfolio-image {
        padding-bottom: 100%;
    }
}

/* Desktop - 3 columns */
@media (min-width: 992px) {
    .portfolio-section [class*="col-lg-4"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .portfolio-image {
        padding-bottom: 100%;
    }
}
/* Portfolio Modal Fixes for Mobile */
@media (max-width: 767.98px) {
    /* Modal dialog sizing */
    #portfolioModal .modal-dialog {
        margin: 20px;
        max-width: calc(100% - 40px);
        height: auto;
        max-height: calc(100vh - 40px);
    }
    
    #portfolioModal .modal-content {
        height: auto;
        max-height: calc(100vh - 40px);
        border-radius: 20px;
    }
    
    /* Modal header */
    #portfolioModal .modal-header {
        padding: 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    #portfolioModal .modal-title {
        font-size: 1.5rem;
        font-weight: 600;
        padding-right: 30px;
    }
    
    /* Close button */
    #portfolioModal .btn-close {
        padding: 0;
        width: 30px;
        height: 30px;
        opacity: 0.7;
    }
    
    /* Modal body */
    #portfolioModal .modal-body {
        padding: 20px;
        overflow-y: auto;
        max-height: calc(100vh - 200px);
    }
    
    /* Modal image */
    #portfolioModal .modal-body img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    /* Project title in body */
    #portfolioModal .modal-body h3 {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 15px;
        color: #2B4C8F;
    }
    
    /* Description text */
    #portfolioModal .modal-body p {
        font-size: 0.95rem;
        line-height: 1.6;
        color: #666;
        margin-bottom: 20px;
    }
    
    /* Technologies section */
    #modalTechnologies {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    /* Technology tags - Fixed alignment */
    #modalTechnologies .tech-tag,
    .tech-tag {
        display: inline-block;
        padding: 8px 16px;
        background: rgba(43, 76, 143, 0.1);
        color: var(--primary-blue);
        border: 1px solid rgba(43, 76, 143, 0.2);
        color: rgb(146, 139, 158);
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
    }
    
    /* Modal footer */
    #portfolioModal .modal-footer {
        padding: 15px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        justify-content: center;
    }
    
    #portfolioModal .modal-footer .btn {
        padding: 12px 30px;
        border-radius: 25px;
        font-weight: 500;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    #portfolioModal .modal-dialog {
        margin: 15px;
        max-width: calc(100% - 30px);
    }
    
    #portfolioModal .modal-title {
        font-size: 1.25rem;
    }
    
    #portfolioModal .modal-body {
        padding: 15px;
    }
    
    #portfolioModal .modal-body h3 {
        font-size: 1.15rem;
    }
    
    #portfolioModal .modal-body p {
        font-size: 0.9rem;
    }
    
    .tech-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Desktop - keep normal modal size */
@media (min-width: 768px) {
    #portfolioModal .modal-dialog {
        max-width: 800px;
        margin: 30px auto;
    }
    
    #portfolioModal .modal-content {
        border-radius: 15px;
    }
    
    #modalTechnologies {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .tech-tag {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}
/* Contact Section Mobile */
.contact-section {
    padding: 50px 0;
    background: #ffffff;
}

.contact-section .container {
    padding: 0 15px;
    max-width: 100%;
    margin: 0 auto;
}

.contact-section .row {
    margin: 0 -10px;
}

.contact-section [class*="col-"] {
    padding: 0 10px;
}

.contact-info {
    margin-bottom: 2.5rem;
    text-align: center;
    padding: 0 10px;
}

.contact-items {
    margin-top: 2rem;
}

.contact-item {
    margin-bottom: 20px;
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(43, 76, 143, 0.08);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.contact-icon {
    margin: 0 auto 1rem auto;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    text-align: center;
}

.contact-details p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--gray-600);
    text-align: center;
}

.contact-form {
    margin-bottom: 20px;
    width: 100%;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(43, 76, 143, 0.08);
}

.form-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem; /* Slightly more space after title */
    text-align: center;
    color: var(--gray-800);
}

/* Fix Bootstrap row spacing in form */
.contact-form .row {
    margin-bottom: 0 !important;
}

.contact-form .row .col-md-6 {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.form-group {
    margin-bottom: 0.8rem !important; /* Comfortable consistent spacing */
}

.form-group input,
.form-group select,
.form-group textarea {
    font-size: 16px !important;
    padding: 14px 16px;
    border-radius: 8px;
    border: 2px solid rgba(43, 76, 143, 0.1);
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    transition: all 0.2s ease;
    font-family: var(--font-primary);
    line-height: 1.4;
    min-height: 44px;
    margin-bottom: 0 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(43, 76, 143, 0.1);
    outline: none;
    background: var(--white);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 0 !important;
}

/* Mobile specific - Single column centered layout */
@media (max-width: 767.98px) {
    .contact-section {
        padding: 40px 0;
    }
    
    .contact-section .container {
        padding: 0 30px;
    }
    
    .contact-section .row {
        margin: 0;
    }
    
    .contact-section [class*="col-"] {
        padding: 0;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .contact-item,
    .contact-form {
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .contact-info {
        padding: 0;
        margin-bottom: 2rem;
    }
    
    .form-title {
        margin-bottom: 1rem; /* Comfortable mobile title spacing */
    }
    
    /* Override Bootstrap row/column spacing on mobile */
    .contact-form .row {
        margin-bottom: 0 !important;
    }
    
    .contact-form .row .col-md-6 {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .form-group {
        margin-bottom: 0.7rem !important; /* Comfortable mobile spacing */
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 16px 18px;
        min-height: 48px;
        margin-bottom: 0 !important;
    }
    
    .form-group textarea {
        min-height: 140px;
        margin-bottom: 0 !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .contact-section .container {
        padding: 0 25px;
    }
    
    .contact-item,
    .contact-form {
        margin-bottom: 20px;
        padding: 1.2rem;
    }
    
    .form-title {
        font-size: 1.2rem;
        margin-bottom: 0.9rem; /* Comfortable small screen spacing */
    }
    
    .form-group {
        margin-bottom: 0.6rem !important; /* Still comfortable on small screens */
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Tablets - 2 columns for contact items, 1 column for form */
@media (min-width: 768px) and (max-width: 991.98px) {
    .contact-section [class*="col-md-6"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .contact-section [class*="col-md-12"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Desktop - 3 columns for contact items, centered form */
@media (min-width: 992px) {
    .contact-section [class*="col-lg-4"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .contact-section [class*="col-lg-8"] {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
        margin: 0 auto;
    }
    
    .contact-form {
        max-width: 600px;
        margin: 0 auto;
    }
}

  /* Footer Mobile */
.footer {
    text-align: center;
    padding: 50px 0;
    background: var(--gray-900);
}

.footer .container {
    padding: 0 15px;
    max-width: 100%;
    margin: 0 auto;
}

.footer .row {
    margin: 0 -10px;
}

.footer [class*="col-"] {
    padding: 0 10px;
}

.footer-about {
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.footer-logo {
    height: 50px;
    margin: 0 auto 1rem;
    display: block;
}

.footer-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--gray-400);
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.footer-social {
    justify-content: center;
    margin-bottom: 2rem;
    gap: 15px;
    display: flex;
    flex-wrap: wrap;
}

.footer-social .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social .social-link:hover {
    background: var(--accent-orange);
    transform: scale(1.1);
    color: var(--white);
}

.footer-links {
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-align: center;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li a {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: var(--gray-400);
    text-decoration: none;
    display: block;
}

.footer-links ul li a:hover {
    background: rgba(255, 140, 66, 0.1);
    color: var(--accent-orange);
}

.footer-contact {
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
}

.footer-contact .contact-item {
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    background: transparent;
    box-shadow: none;
    padding: 0.5rem;
    border: none;
    color: var(--gray-400);
    display: flex;
    align-items: center;
}

.footer-contact .contact-item:hover {
    transform: none;
    background: transparent;
    color: var(--accent-orange);
}

.footer-contact .contact-item i {
    color: var(--accent-orange);
    margin-right: 8px;
    font-size: 1rem;
}

.footer-divider {
    border-color: var(--gray-700);
    margin: 2rem 0 1rem;
    opacity: 0.5;
}

.footer-bottom {
    font-size: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    color: var(--gray-400);
    text-align: center;
}

/* Mobile specific - Single column centered layout */
@media (max-width: 767.98px) {
    .footer {
        padding: 40px 0;
    }
    
    .footer .container {
        padding: 0 30px;
    }
    
    .footer .row {
        margin: 0;
    }
    
    .footer [class*="col-"] {
        padding: 0;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .footer-about,
    .footer-links,
    .footer-contact {
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .footer-description {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .footer-social {
        margin-bottom: 2rem;
    }
    
    .footer-social .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .footer .container {
        padding: 0 25px;
    }
    
    .footer-about,
    .footer-links,
    .footer-contact {
        margin-bottom: 20px;
    }
    
    .footer-logo {
        height: 45px;
    }
    
    .footer-description {
        font-size: 0.85rem;
        padding: 0 5px;
    }
    
    .footer-social .social-link {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .footer-links ul {
        gap: 8px 15px;
    }
    
    .footer-links ul li a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Tablets - 2 columns for sections */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer [class*="col-md-6"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .footer [class*="col-md-12"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Desktop - Multi-column layout */
@media (min-width: 992px) {
    .footer [class*="col-lg-3"] {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .footer [class*="col-lg-4"] {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .footer [class*="col-lg-6"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .footer [class*="col-lg-12"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

    /* Mobile Navigation Elements */
    .whatsapp-float {
        bottom: 85px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        background: #25d366;
        color: var(--white);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        z-index: 1000;
        animation: pulse 2s infinite;
        transition: all 0.3s ease;
    }
    
    .whatsapp-float:hover {
        transform: scale(1.1);
        color: var(--white);
        background: #128c7e;
    }
    
    .back-to-top {
        bottom: 150px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
        background: var(--gradient-primary);
        color: var(--white);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .back-to-top:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }
    
    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(43, 76, 143, 0.1);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        z-index: 1001;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .mobile-nav-btn {
        padding: 12px 8px;
        color: var(--white);
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        border-radius: 0;
        min-height: 60px;
        position: relative;
    }
    
    .mobile-nav-btn:first-child {
        background: var(--primary-blue);
        color: var(--white);
    }
    
    .mobile-nav-btn:first-child:hover,
    .mobile-nav-btn:first-child:active {
        background: var(--primary-dark);
        color: var(--white);
        text-decoration: none;
    }
    
    .mobile-nav-btn:last-child {
        background: #25d366;
        color: var(--white);
    }
    
    .mobile-nav-btn:last-child:hover,
    .mobile-nav-btn:last-child:active {
        background: #128c7e;
        color: var(--white);
        text-decoration: none;
    }
    
    .mobile-nav-btn i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    
    .mobile-nav-btn span {
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1;
    }
    
    /* Grid System Mobile */
    .row > * {
        margin-bottom: 1.5rem;
    }
    
    .row > *:last-child {
        margin-bottom: 0;
    }
    
    /* Image Optimizations Mobile */
    .hero-visual img,
    .about-main-img,
    .portfolio-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .stat-icon img,
    .service-icon img {
        max-width: 50px;
        height: auto;
    }
}

/* Small Devices (Landscape Phones) - 576px to 767px */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        flex: 1;
        max-width: 200px;
        min-width: 160px;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
    
    .contact-icon {
        margin: 0 1rem 0 0;
    }
    
    .footer-links ul {
        gap: 15px 25px;
    }
}

/* Medium Devices (Tablets) - 768px to 991px */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation Tablet */
    .navbar-nav .nav-link {
        padding: 8px 12px;
        font-size: 15px;
    }
    
    /* Hero Section Tablet */
    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* About Section Tablet */
    .about-image-wrapper {
        margin-bottom: 2rem;
    }
    
    .experience-badge {
        bottom: 15px;
        right: 15px;
        padding: 15px;
        position: absolute;
    }
    
    /* Services Tablet */
    .service-card {
        height: auto;
        min-height: 400px;
    }
    
    /* Stats Tablet */
    .stat-number {
        font-size: 2.8rem;
    }
    
    /* Contact Tablet */
    .contact-form {
        margin-top: 2rem;
    }
    
    /* Footer Tablet */
    .footer-about {
        margin-bottom: 2rem;
    }
    
    .footer {
        text-align: left;
    }
    
    .footer-social {
        justify-content: flex-start;
    }
}

/* Large Devices (Desktops) - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .service-card {
        min-height: 450px;
    }
    
    .experience-badge {
        position: absolute;
        bottom: 20px;
        right: 20px;
    }
}

/* Extra Large Devices - 1200px and up */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .service-card {
        min-height: 480px;
    }
}

/* Ultra Wide Screens - 1400px and up */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    section {
        padding: 120px 0;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        margin-top: 1rem;
    }
    
    .navbar {
        padding: 8px 0;
    }
    
    section {
        padding: 40px 0;
    }
    
    .mobile-bottom-nav {
        display: none;
    }
    
    .whatsapp-float {
        bottom: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 80px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-float,
    .back-to-top,
    .mobile-bottom-nav,
    .hero-shapes,
    .preloader {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 20px 0;
        min-height: auto;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        border-top: 2px solid black;
    }
    
    a {
        text-decoration: underline;
        color: black !important;
    }
    
    .btn {
        border: 2px solid black;
        background: white !important;
        color: black !important;
        padding: 8px 16px;
    }
    
    .service-card,
    .portfolio-item,
    .contact-form {
        break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        break-after: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
    
    .service-card,
    .portfolio-item,
    .contact-form,
    .stat-item {
        border: 2px solid var(--gray-600);
    }
    
    .btn {
        border-width: 3px;
        font-weight: 700;
    }
    
    .navbar {
        border-bottom: 3px solid var(--primary-blue);
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 3px solid var(--accent-orange);
        outline-offset: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-shapes .shape {
        animation: none !important;
    }
    
    .wave-animation use {
        animation: none !important;
    }
    
    .whatsapp-float {
        animation: none !important;
    }
    
    .loading-dots span {
        animation: none !important;
    }
    
    .navbar-collapse {
        animation: none !important;
    }
    
    .parallax {
        transform: none !important;
    }
}
/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 16px;
    }
    
    .social-link {
        min-width: 44px;
        min-height: 44px;
    }
    
    .service-card:hover,
    .portfolio-image:hover .portfolio-overlay,
    .btn:hover::before {
        transform: none;
        opacity: 1;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px !important;
        padding: 14px 16px;
    }
    
    /* Remove hover effects that don't work on touch */
    .card-hover:hover,
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-rotate:hover {
        transform: none !important;
    }
    
    .contact-item:hover,
    .stat-item:hover {
        transform: none !important;
    }
}

/* Accessibility Improvements */
@media (max-width: 767.98px) {
    .btn:focus,
    .nav-link:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 3px solid var(--accent-orange);
        outline-offset: 2px;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 4px;
    }
    
    .navbar-toggler:focus {
        outline: 3px solid var(--accent-orange);
        outline-offset: 2px;
    }
    
    /* Skip link for screen readers */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 6px;
        background: var(--accent-orange);
        color: var(--white);
        padding: 8px;
        text-decoration: none;
        border-radius: 4px;
        z-index: 9999;
    }
    
    .skip-link:focus {
        top: 6px;
    }
}

/* Custom Mobile Navigation Enhancements */
@media (max-width: 991.98px) {
    .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: var(--gray-50);
        border: none;
        border-radius: 8px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-submenu .dropdown-menu {
        background-color: var(--white);
        margin-left: 20px;
        border-left: 3px solid var(--accent-orange);
        border-radius: 0 8px 8px 0;
    }
    
    .dropdown-item {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
}

/* Tablet Specific Optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-visual {
        margin-top: 2rem;
    }
    
    .service-card {
        padding: 2rem;
        min-height: 420px;
    }
    
    .portfolio-item {
        margin-bottom: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .stat-item {
        padding: 2rem 1.5rem;
    }
}

/* iPad specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 0;
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    section {
        padding: 70px 0;
    }
}

/* Portfolio Responsive Styles */
@media (max-width: 768px) {
    .portfolio-header {
        padding: 80px 0 50px;
        text-align: center;
    }
    
    .portfolio-filters {
        gap: 10px;
        margin-bottom: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: 1rem;
    }
    
    .portfolio-title {
        font-size: 1.1rem;
    }
    
    .portfolio-description {
        font-size: 0.9rem;
    }
    
    .portfolio-stats {
        margin: 2rem 0;
    }
    
    .stat-badge {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-badge h3 {
        font-size: 1.5rem;
    }
    
    .breadcrumb-nav {
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .portfolio-filters {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .portfolio-actions {
        gap: 10px;
    }
    
    .portfolio-action {
        width: 45px;
        height: 45px;
    }
    
    .breadcrumb-nav {
        font-size: 0.8rem;
    }
}

/* Performance optimizations for older mobile devices */
@media (max-width: 480px) {
    .hero-shapes {
        display: none;
    }
    
    .parallax,
    .parallax-slow {
        transform: none !important;
    }
    
    .backdrop-filter {
        backdrop-filter: none;
    }
    
    .glass-morphism {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: none;
    }
}

/* Safe area handling for newer mobile devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .whatsapp-float {
        bottom: calc(85px + env(safe-area-inset-bottom));
    }
    
    .back-to-top {
        bottom: calc(150px + env(safe-area-inset-bottom));
    }
}
