/* 
 * Optimized CSS for DÍAZ & Co. Website
 * Consolidated and organized for improved performance
 */

/* ===== CSS Variables ===== */
:root {
    --color-primary: #E31837;
    --color-primary-hover: #FF1F4C;
    --color-dark: #2C1B47;
    --color-gold: #FFD700;
    --color-white: #FFFFFF;
    --color-light-gray: #F8F9FA;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-300: #D1D5DB;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-shadow: rgba(0, 0, 0, 0.1);
    
    /* Reusable shadows */
    --shadow-elevation: 0 20px 25px -5px var(--color-shadow), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 10px 15px -3px var(--color-shadow);
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 2px 0 var(--color-shadow);
    --shadow-hover: 0 10px 15px -3px rgba(227, 24, 55, 0.1);
    --shadow-xl: 0 20px 25px -5px var(--color-shadow);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Base Styles ===== */
body {
    color: var(--color-dark);
}

/* ===== Header Styles ===== */
.header-container {
    background-color: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.brand-text {
    background: linear-gradient(90deg, var(--color-white) 30%, #E5E5E5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.brand-text:hover {
    background: linear-gradient(90deg, var(--color-white) 60%, var(--color-white) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-button {
    background-color: var(--color-primary);
    color: var(--color-white);
    transition: all 0.3s ease;
    position: relative;
}

.nav-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.2);
}

/* ===== Hero Section ===== */
.gradient-hero {
    background: 
        linear-gradient(135deg, rgba(44, 27, 71, 0.85) 0%, rgba(227, 24, 55, 0.85) 100%),
        url('imgs/heroimg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Consolidated heading-highlight style - was previously duplicated 5+ times */
.heading-highlight {
    display: inline;
    background: linear-gradient(120deg, var(--color-gold) 0%, var(--color-gold) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 88%;
    transition: background-size 0.25s ease-in;
    -webkit-text-stroke: 0.5px rgba(44, 27, 71, 0.4);
    text-stroke: 0.5px rgba(44, 27, 71, 0.4);
}

.heading-highlight:hover {
    background-size: 100% 0.4em;
}

.hero-btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-white);
    box-shadow: 0 4px 6px var(--color-shadow);
    transition: all 0.3s ease;
}

.hero-btn-primary:hover {
    background-color: var(--color-light-gray);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
}

.hero-btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
    transition: all 0.3s ease;
}

.hero-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Focus States - Consolidated */
.nav-button:focus-visible,
.hero-btn-primary:focus-visible,
.hero-btn-outline:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 0;
    padding: 1rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ===== Problem Section ===== */
.problem-section {
    margin-top: -8rem;
    margin-bottom: -4rem;
    padding: 5rem 0;
    position: relative;
    z-index: 10;
}

.problem-card {
    background-color: var(--color-white);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-elevation);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background-color: transparent;
}

.problem-item:hover {
    background-color: var(--color-gray-50);
    transform: translateX(0.5rem);
}

.problem-icon {
    color: var(--color-primary);
    transition: all 0.3s ease;
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.problem-item:hover .problem-icon {
    color: var(--color-primary-hover);
    transform: scale(1.1) rotate(-10deg);
}

.problem-text {
    color: var(--color-gray-700);
    font-size: 1.125rem;
    line-height: 1.5;
    text-align: left;
}

/* ===== Solution Section ===== */
.solution-section {
    padding: 5rem 0;
    background-color: var(--color-gray-100);
    position: relative;
    overflow: hidden;
}

.solution-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--color-primary) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.03;
    pointer-events: none;
}

.solution-tag {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
}

.solution-tag::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.solution-tag:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Button styles - Consolidated */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: rgba(227, 24, 55, 0.05);
    transform: translateY(-2px);
}

/* ===== Portfolio Section ===== */
.portfolio-section {
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Masonry/Gallery Grid Shared Styles */
.masonry-grid,
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.masonry-item,
.gallery-item {
    position: relative;
    break-inside: avoid;
    border-radius: 1rem;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s ease;
}

.masonry-item:hover,
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

.masonry-item img,
.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.masonry-item:hover img,
.gallery-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay,
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 27, 71, 0.95), transparent);
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.masonry-item:hover .masonry-overlay,
.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

.category-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    transition: all 0.3s ease;
}

.masonry-item:hover .category-tag,
.gallery-item:hover .category-tag {
    background: var(--color-gold);
}

/* ===== Process Section ===== */
.process-section {
    background-color: var(--color-gray-50);
    position: relative;
    overflow: hidden;
}

.process-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--color-primary) 0%, var(--color-primary) 100%);
    opacity: 0.02;
    pointer-events: none;
}

.process-item {
    position: relative;
    padding: 2rem;
    transition: transform 0.3s var(--transition-bounce);
}

.process-item:hover {
    transform: translateY(-8px);
}

.process-circle {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    position: relative;
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 6px var(--color-shadow);
}

.process-item:hover .process-circle {
    transform: scale(1.1);
    background: var(--color-gold);
    box-shadow: 0 8px 12px rgba(212, 175, 55, 0.2);
}

.process-circle::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.process-item:hover .process-circle::after {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--color-gold);
}

.process-title {
    color: var(--color-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.process-item:hover .process-title {
    color: var(--color-primary);
}

.process-description {
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* ===== Contact Section ===== */
.contact-section {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 100% 50%, rgba(227, 24, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(44, 27, 71, 0.08) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='4' cy='4' r='2' fill='%23FFFFFF' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

.contact-link {
    position: relative;
    display: inline-block;
    color: var(--color-white);
    transition: all 0.3s ease;
    padding: 0.625rem 0;
    min-height: 44px;
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.contact-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-link:hover {
    color: var(--color-gold);
}

.contact-group {
    margin-bottom: 1.25rem;
}

.contact-group.email {
    margin-bottom: 0.5rem;
}

.phone-wrapper {
    margin-bottom: 0.5rem;
}

.contact-card {
    position: relative;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px var(--color-shadow);
}

.whatsapp-badge {
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: #25D366;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
}

.whatsapp-badge:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.1);
}

.location-text {
    color: var(--color-gray-300);
    position: relative;
    padding-top: 1rem;
    margin-top: 1rem;
}

.location-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gray-300), transparent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--color-white);
    transition: fill 0.3s ease;
}

.social-icon.facebook:hover {
    background: #1877F2;
}

.social-icon.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon:hover svg {
    fill: var(--color-white);
}

/* ===== Footer ===== */
.footer {
    background-color: #1A1A1A;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-text {
    color: #D1D5DB;
    font-size: 0.875rem;
}

.footer p:nth-child(2) {
    color: #a0a6b0;
    font-size: 0.875rem;
}

.footer p:nth-child(2) a {
    color: inherit;
    transition: color 0.3s ease;
}

.footer p:nth-child(2) a:hover {
    color: #E5E7EB;
}

/* ===== Carousel Styles ===== */
.carousel-container {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    user-select: none;
    padding-left: 5vw;
    padding-right: 5vw;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-out;
    cursor: grab;
}

.carousel-track.dragging {
    cursor: grabbing;
    transition: none;
}

.carousel-item {
    flex-shrink: 0;
    position: relative;
    width: 100%;
    padding: 0 0.75rem;
    pointer-events: auto;
}

.carousel-item>div {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.carousel-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    pointer-events: none;
}

.carousel-overlay h3,
.carousel-overlay p {
    color: white;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 27, 71, 0.95), transparent);
    padding: 2rem;
    opacity: 0;
    transform: translateY(100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
}

#prevBtn,
#nextBtn {
    position: absolute;
    top: 50%;
    width: 3.5rem;
    height: 3.5rem;
    background-color: white;
    border: 1px solid #D1D5DB;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px var(--color-shadow), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 20;
}

#prevBtn {
    left: 0;
    transform: translate(-1rem, -50%);
}

#nextBtn {
    right: 0;
    transform: translate(1rem, -50%);
}

#prevBtn:hover,
#nextBtn:hover {
    background-color: #E5E7EB;
    box-shadow: 0 10px 15px -3px var(--color-shadow), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#prevBtn svg,
#nextBtn svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--color-primary);
    stroke-width: 2;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-item:hover .category-tag {
    background: var(--color-gold);
}

.carousel-item:hover .carousel-overlay {
    opacity: 1;
    transform: translateY(0);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-gray-300);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0 4px;
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--color-primary);
}

/* ===== Clients Section ===== */
.clients-section {
    background-color: var(--color-white);
    padding-top: 2rem;
}

/* Modern infinite carousel */
.logo-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 0 20px;
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 5%,
            black 95%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 5%,
            black 95%,
            transparent 100%);
}

.logo-track {
    display: flex;
    align-items: center;
    width: fit-content;
    will-change: transform;
    animation: infinite-scroll 60s linear infinite;
    display: inline-flex;
}

/* Create a fixed-size container for each logo */
.logo-item {
    flex: 0 0 auto;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 120px;
}

.logo-item img {
    max-height: 80px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.logo-item.wide img {
    max-width: 180px;
}

.logo-item.tall img {
    max-height: 90px;
}

.logo-item.small img {
    max-height: 85px;
    max-width: 165px;
}

.logo-item img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.logo-track:hover {
    animation-play-state: paused;
}

@keyframes infinite-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 2));
    }
}

/* ===== Statistics Section ===== */
.stats-section {
    background-color: var(--color-gray-50);
    position: relative;
}

.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    background: linear-gradient(120deg, var(--color-primary), var(--color-primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* ===== Show More Button ===== */
.show-more-btn {
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.125rem;
}

.show-more-btn:hover {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.show-more-btn:focus {
    outline: none;
}

/* ===== Touch Device Support ===== */
@media (hover: none) {
    /* Portfolio Items */
    .masonry-item.active .masonry-overlay,
    .gallery-item.active .gallery-overlay,
    .carousel-item.active .carousel-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .masonry-item.active img,
    .gallery-item.active img,
    .carousel-item.active img {
        transform: scale(1.05);
    }

    .masonry-item.active .category-tag,
    .gallery-item.active .category-tag,
    .carousel-item.active .category-tag {
        background: var(--color-gold);
    }

    /* Process Items */
    .process-item.active,
    .process-item:active {
        transform: translateY(-8px);
    }

    .process-item.active .process-circle,
    .process-item:active .process-circle {
        transform: scale(1.1);
        background: var(--color-gold);
        box-shadow: 0 8px 12px rgba(212, 175, 55, 0.2);
    }

    .process-item.active .process-title,
    .process-item:active .process-title {
        color: var(--color-primary);
    }

    /* Contact Links */
    .contact-link:active {
        color: var(--color-gold);
    }

    .contact-link:active::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    /* Navigation */
    .nav-button:active {
        background-color: var(--color-primary-hover);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(227, 24, 55, 0.2);
    }

    /* Hero Buttons */
    .hero-btn-primary:active {
        background-color: var(--color-light-gray);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
    }

    .hero-btn-outline:active {
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }

    /* Problem Items */
    .problem-item:active {
        background-color: var(--color-gray-50);
        transform: translateX(0.5rem);
    }

    .problem-item:active .problem-icon {
        color: var(--color-primary-hover);
        transform: scale(1.1) rotate(-10deg);
    }

    /* WhatsApp Badge */
    .whatsapp-badge:active {
        background: rgba(37, 211, 102, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(37, 211, 102, 0.1);
    }

    /* Make touch targets larger on mobile */
    .nav-button,
    .contact-link,
    .process-circle,
    #prevBtn,
    #nextBtn {
        min-height: 44px;
        padding: 12px;
    }
}

/* ===== Media Queries ===== */
/* Consolidated media queries to reduce redundancy */

/* Small screens */
@media (max-width: 400px) {
    .brand-text {
        font-size: 1.4rem;
    }

    .nav-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .logo-item {
        height: 70px;
        padding: 0 15px;
        min-width: 100px;
    }

    .logo-item img {
        max-height: 45px;
        max-width: 90px;
    }
    
    .logo-track {
        animation-duration: 50s;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .brand-text {
        font-size: 1.2rem;
    }

    .nav-button {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* Extremely small screens */
@media (max-width: 300px) {
    .brand-text {
        font-size: 1rem;
    }

    .nav-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.6rem;
    }
}

/* Tablet and small desktop */
@media (min-width: 768px) {
    .carousel-item {
        width: 50%;
    }
    
    .masonry-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .masonry-item {
        width: calc(50% - 1.5rem);
    }
    
    .logo-item {
        height: 90px;
        padding: 0 20px;
        min-width: 140px;
    }

    .logo-item img {
        max-height: 60px;
        max-width: 120px;
    }
    
    .logo-track {
        animation-duration: 60s;
    }
    
    .contact-card {
        padding: 2rem;
    }
    
    .process-grid {
        gap: 2rem;
    }

    .process-item {
        padding: 1.5rem;
    }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-title {
        font-size: 3em !important;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .carousel-item {
        width: 33.333%;
    }
    
    .masonry-item {
        width: calc(25% - 1.5rem);
    }
}

/* Larger screens */
@media (min-width: 1440px) {
    .logo-item {
        padding: 0 30px;
        min-width: 200px;
        height: 140px;
    }

    .logo-item img {
        max-height: 90px;
        max-width: 170px;
    }
}

/* Common Mobile adjustments - consolidated */
@media (max-width: 768px) {
    .gradient-hero {
        padding-top: 2rem !important;
    }

    .hero-title {
        font-size: 2.15em !important;
    }
    
    .button-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .problem-section {
        margin-top: -4rem;
        padding: 2rem 1rem;
    }

    .problem-card {
        padding: 2rem;
    }
    
    .solution-section {
        padding: 3rem 1rem;
    }
    
    .process-grid {
        gap: 2rem;
    }

    .process-item {
        padding: 1.5rem;
    }
    
    .carousel-overlay {
        padding: 1.5rem;
    }

    .carousel-overlay h3 {
        font-size: 1.125rem;
    }

    .carousel-overlay p {
        font-size: 0.875rem;
    }

    .category-tag {
        padding: 0.375rem 1rem;
        font-size: 0.75rem;
    }
    
    .social-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .carousel-container {
        margin: 0;
        padding-left: 5vw;
        padding-right: 5vw;
    }
    
    .footer-text, .footer p:nth-child(2) {
        font-size: 0.75rem;
    }
}

/* Specific landscape fixes */
@media (max-width: 740px) and (max-height: 450px) and (orientation: landscape) {
    .carousel-item {
        width: 100%;
        margin-left: 0%;
        margin-right: 0%;
    }

    #prevBtn,
    #nextBtn {
        width: 3rem;
        height: 3rem;
    }

    #prevBtn {
        transform: translate(-0.5rem, -50%);
    }

    #nextBtn {
        transform: translate(0.5rem, -50%);
    }
}

/* Image lazy loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.lazy.loaded {
    opacity: 1;
}
