
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* GPU acceleration for animations */
.header, .carousel-slide, .professional-modal, .service-item,
.client-logo, .cta-button, .whatsapp-float {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

:root {
    --primary-green: #2d7d32;
    --light-green: #4caf50;
    --dark-green: #1b5e20;
    --soft-gray: #f5f5f5;
    --medium-gray: #666;
    --dark-gray: #333;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
    padding: 1rem 0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.header.scrolled {
    box-shadow: 0 2px 20px var(--shadow);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0 auto;
}

.nav-spacer {
    width: 80px; /* Same width as logo to balance */
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
}

.logo img {
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-green);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-green);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    background-image: url('../img/guardia1.webp');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
    padding-bottom: 10vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-green);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 20;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-green);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--white);
    position: relative;
    z-index: 2;
    margin-top: 0;
    clear: both;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start; /* Prevent grid items from stretching */
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    align-self: start; /* Prevent individual card from stretching */
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(45, 125, 50, 0.15);
    cursor: pointer;
}

.feature-card:hover .feature-hint {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover .feature-toggle i {
    color: var(--primary-green);
    transform: scale(1.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-content-wrapper {
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.feature-hint {
    font-size: 0.9rem;
    color: var(--medium-gray);
    opacity: 0;
    margin-top: 0.3rem;
    transform: translateY(10px);
    transition: all 0.3s ease;
    font-style: italic;
}

.feature-card p {
    color: var(--medium-gray);
    line-height: 1.7;
}

/* Arrow indicator for expansion */
.feature-arrow {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-green);
    font-size: 1.2rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    pointer-events: none;
}

.feature-card.active .feature-arrow {
    transform: translateX(-50%) rotate(180deg);
    opacity: 1;
    bottom: -2px;
    animation: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-5px);
    }
    60% {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* Feature accordion functionality */
.feature-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.feature-content {
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
    margin-top: 0.5rem;
    max-height: 0;
    padding: 0;
    opacity: 0;
    border-radius: 10px;
}

.feature-card.active .feature-content {
    max-height: 300px;
    padding: 1rem 1.5rem;
    opacity: 1;
    margin-top: -1.5rem;
}

.feature-toggle {
    position: absolute;
    bottom: -10px;
    right: 15px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.feature-toggle i {
    font-size: 1.2rem;
    color: var(--medium-gray);
    transition: all 0.3s ease;
}

/* Feature accordion for mobile */
.feature-header {
    display: flex; /* Show on desktop as flexbox */
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer; /* Changed to pointer for accordion functionality */
}

.feature-toggle {
    display: none; /* Hidden on desktop */
}

.feature-toggle i {
    transition: transform 0.3s ease;
}

/* Desktop specific styles for feature cards */
@media (min-width: 769px) {
    .feature-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        cursor: pointer;
        padding: 0;
        border: none;
        background: transparent;
        gap: 1.5rem;
    }
    
    .feature-header .feature-icon {
        width: 70px;
        height: 70px;
        margin: 0 auto;
    }
    
    .feature-header .feature-icon i {
        font-size: 2rem;
    }
    
    .feature-header h3 {
        font-size: 1.3rem;
        color: var(--primary-green);
        margin: 0;
    }
    
    /* Ensure accordion behavior works on desktop */
    .feature-card.active .feature-content {
        background: transparent;
    }
    
    .feature-card.active .feature-content p {
        color: var(--medium-gray);
        line-height: 1.7;
        margin: 0;
    }
    
    /* Ensure non-active cards stay completely closed */
    .feature-card:not(.active) .feature-content {
        max-height: 0 !important;
        padding: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    .feature-toggle {
        display: none;
    }
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        text-align: center;
        padding: 1.5rem;
    }
    
    .feature-header {
        gap: 1rem;
    }
    
    .feature-header .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-header .feature-icon i {
        font-size: 1.8rem;
    }
    
    .feature-header h3 {
        font-size: 1.2rem;
    }
    
    /* Hide the old mobile toggle completely */
    .feature-toggle {
        display: none !important;
    }
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: var(--soft-gray);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    display: inline;
}

.stat-symbol {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    display: inline;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--medium-gray);
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-left {
    flex: 0 0 auto;
}

.footer-right {
    flex: 1;
    text-align: right;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-right {
        text-align: center;
        order: 1;
    }

    .footer-left {
        order: 2;
    }

    /* Hero responsive fixes */
    .hero {
        align-items: center;
        padding-bottom: 0;
        padding-top: 20vh;
        background-position: 45% center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Mobile menu fixes */
    .nav-menu {
        position: fixed;
        top: 100px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 100px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
        color: var(--dark-gray);
    }
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about-main {
    padding: 6rem 0;
    background: var(--soft-gray);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-features {
    list-style: none;
    margin-top: 2rem;
}

.about-features li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--dark-gray);
    font-size: 1rem;
}

.about-features i {
    color: var(--primary-green);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.about-image {
    background: linear-gradient(135deg, rgba(45, 125, 50, 0.1), rgba(76, 175, 80, 0.1));
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.about-image i {
    font-size: 8rem;
    color: var(--primary-green);
    opacity: 0.7;
}

/* Mission Vision Values */
.mvv-section {
    padding: 6rem 0;
    background: var(--white);
}

.mvv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mvv-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 25px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid var(--primary-green);
}

.mvv-card:hover {
    transform: translateY(-10px);
}

.mvv-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.mvv-icon i {
    font-size: 2rem;
    color: white;
}

.mvv-card h3 {
    font-size: 1.4rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.mvv-card p {
    color: var(--medium-gray);
    line-height: 1.7;
}

/* Equipment Carousel */
.equipment-section {
    padding: 6rem 0;
    background: var(--soft-gray);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 10px 30px var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

/* Ajuste específico para la tercera imagen (vertical) */
.carousel-slide:nth-child(3) img {
    object-position: center center;
    object-fit: contain;
    background: #f5f5f5;
    padding: 20px;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
}

.carousel-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.carousel-overlay p {
    font-size: 1rem;
    opacity: 0.9;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--primary-green);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 20px;
}

.carousel-nav.next {
    right: 20px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--white);
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: var(--primary-green);
    transform: scale(1.2);
}

/* Clients Section */
.clients-section {
    padding: 6rem 0;
    background: var(--white);
    overflow: hidden;
}

.clients-section .container {
    overflow: visible;
}

.clients-section > div[style*="overflow: hidden"] {
    padding: 3rem 0;
    margin: 3rem 0;
}

.clients-carousel {
    display: flex;
    animation: scroll 60s linear infinite;
    gap: 3rem;
    width: max-content;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.client-logo {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    background: var(--soft-gray);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    margin: 10px 0;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.client-logo:hover {
    transform: translateY(-8px);
    border-color: var(--primary-green);
    box-shadow: 0 15px 35px var(--shadow);
    z-index: 10;
}

.client-logo img {
    max-width: 150px;
    max-height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.client-logo:hover img {
    transform: scale(1.05);
}

/* Special styling for estudio juridico logo */
.client-logo-large {
    width: 280px;
    height: 160px;
}

.client-logo-large img {
    max-width: 220px;
    max-height: 100px;
}

/* Links styling for client logos */
.client-logo {
    text-decoration: none;
    color: inherit;
}

.client-logo:hover {
    text-decoration: none;
}

@keyframes scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 100px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 100px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .features,
    .stats {
        padding: 4rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .stat-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* Professionals Section */
.professionals-section {
    padding: 5rem 0;
    background: var(--soft-gray);
}

.professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.professional-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.professional-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.professional-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
}

.professional-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.professional-image i {
    font-size: 4rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.professional-card:hover .professional-image img {
    transform: scale(1.1);
}

.professional-card:hover .professional-image i {
    transform: scale(1.1);
}

.professional-info {
    padding: 1.5rem;
    text-align: center;
}

.professional-info h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.professional-info p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.view-cv {
    color: var(--primary-green);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Professional Modals */
.professional-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.professional-modal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.professional-modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.professional-modal .close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
}

.modal-photo-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-photo-icon i {
    font-size: 2.5rem;
    color: white;
}

.modal-info h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-info h3 {
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.modal-body {
    padding: 2rem;
}

.cv-section {
    margin-bottom: 2rem;
}

.cv-section h4 {
    color: var(--primary-green);
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.experience-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--soft-gray);
    border-radius: 10px;
}

.experience-item h5 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.experience-item p {
    color: var(--medium-gray);
    margin: 0;
}

.cv-section ul {
    list-style: none;
    padding: 0;
}

.cv-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.cv-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

@media (max-width: 768px) {
    .professional-modal .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .professionals-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .professionals-grid {
        grid-template-columns: 1fr;
    }
}

/* VANS Section */
.vans-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.vans-section .section-title h2 {
    color: var(--primary-green);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.vans-section .professionals-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.vans-section .professional-card {
    height: 100%;
    min-height: 350px;
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
}

.vans-section .professional-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vans-section .professional-info h3 {
    font-size: 1.1rem;
    line-height: 1.2;
    word-wrap: break-word;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1200px;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.image-modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.image-modal-close:hover {
    color: #ccc;
}

.image-modal-caption {
    color: white;
    font-size: 1.2rem;
    padding: 20px;
    text-align: center;
    font-weight: 500;
}

/* Modal navigation buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    z-index: 2001;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .image-modal-close {
        top: -60px;
        right: 10px;
        font-size: 35px;
    }
    
    .modal-nav-btn {
        padding: 10px 15px;
        font-size: 20px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
}

/* Carousel image cursor */
.carousel-slide img {
    cursor: pointer;
    transition: transform 0.3s ease;
    filter: blur(1px);
}

.carousel-slide img:hover {
    transform: scale(1.05);
}

/* Lyntrix logo hover effect */
.lyntrix-link:hover img {
    transform: scale(1.1);
}

/* QR Code Styles for Index Page */
.qr-code-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
    border: 2px solid rgba(45, 125, 50, 0.1);
}

.qr-code-section h4,
.qr-code-section h5 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.qr-code {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.05);
}

.qr-description {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-style: italic;
}

@media (max-width: 768px) {
    .qr-code {
        width: 120px;
        height: 120px;
    }
    
    .qr-code-section {
        padding: 1rem;
    }
    
    /* Mobile performance optimizations */
    .clients-carousel {
        animation-duration: 80s; /* Slower on mobile for better performance */
    }
    
    .client-logo:hover {
        transform: none; /* Disable hover effects on mobile */
    }
    
    /* Reduce animations on mobile */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Optimize carousel for mobile */
    .carousel-slide img {
        filter: blur(0.5px); /* Reduce blur intensity on mobile */
    }
}

/* Performance optimizations for older devices */
@media (max-width: 480px) {
    .clients-carousel {
        animation-duration: 100s; /* Even slower for very small devices */
    }
    
    /* Disable complex animations on very small devices */
    .professional-modal {
        backdrop-filter: none;
    }
    
    .header {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.98);
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .clients-carousel {
        animation: none;
        overflow-x: auto;
    }
}
