/* ========== CODEMAK - Estilos Premium en Modo Claro ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4CAF50, #2E7D32);
    border-radius: 4px;
}

/* BARRA DE NAVEGACIÓN */
.nav-link {
    position: relative;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: #1e293b;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #4CAF50;
    border-radius: 2px;
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* Al desplazarse, la barra de navegación se vuelve blanca */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-link {
    color: #64748b;
}

.navbar-scrolled .nav-link:hover,
.navbar-scrolled .nav-link.active {
    color: #1e293b;
}

.navbar-scrolled .hamburger-line {
    background: #1e293b;
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 0.75rem;
    transition: all 0.3s;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.mobile-nav-link:hover {
    color: #1e293b;
    background: rgba(76, 175, 80, 0.08);
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}




/* TARJETAS */
.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #81C784, #4CAF50);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(76, 175, 80, 0.06);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.04));
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #4CAF50;
    transition: all 0.4s;
    border: 1px solid rgba(76, 175, 80, 0.12);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.08));
    transform: scale(1.1) rotate(5deg);
}

.project-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(76, 175, 80, 0.06);
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(76, 175, 80, 0.06);
}

.contact-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(76, 175, 80, 0.06);
}

/* DIVISOR DE SECCIÓN */
.section-divider {
    width: 60px;
    height: 4px;
    border-radius: 2px;
    margin: 0 auto;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 4px;
    border-radius: 2px;
    background: rgba(76, 175, 80, 0.2);
}

.section-divider::before {
    left: -28px;
}

.section-divider::after {
    right: -28px;
}

/* ANIMACIONES */
@keyframes fp {

    0%,
    100% {
        transform: translate(0, 0)
    }

    25% {
        transform: translate(-30px, -40px)
    }

    50% {
        transform: translate(20px, -20px)
    }

    75% {
        transform: translate(-10px, 30px)
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

@keyframes scroll-down {
    0% {
        transform: translateY(0);
        opacity: 1
    }

    50% {
        transform: translateY(6px);
        opacity: .5
    }

    100% {
        transform: translateY(0);
        opacity: 1
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(40px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.animate-scroll-down {
    animation: scroll-down 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
}

.delay-100 {
    animation-delay: .1s;
    opacity: 0;
}

.delay-200 {
    animation-delay: .2s;
    opacity: 0;
}

.delay-300 {
    animation-delay: .3s;
    opacity: 0;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

::selection {
    background: rgba(76, 175, 80, 0.2);
    color: #1e293b;
}

@media (max-width: 768px) {

    .service-card,
    .stat-card {
        padding: 1.5rem;
    }
}

/* CARRUSEL */
.carousel-container {
    position: relative;
    padding: 0 50px;
}

.carousel-track-wrapper {
    overflow: hidden;
    border-radius: 1.5rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .carousel-slide {
        min-width: 50%;
    }
}

.carousel-slide .project-card {
    margin: 4px;
    height: 100%;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.carousel-arrow:hover {
    background: #4CAF50;
    color: #ffffff;
    border-color: #4CAF50;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow-left {
    left: 0;
}

.carousel-arrow-right {
    right: 0;
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-arrow:disabled:hover {
    background: #ffffff;
    color: #64748b;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-50%);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot:hover {
    background: #9ca3af;
}

.carousel-dot.active {
    background: #4CAF50;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

@media (max-width: 768px) {
    .carousel-container {
        padding: 0 40px;
    }

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