/* ==========================================================================
   Software Development Section
   ========================================================================== */

/* CSS Variables for consistency */
:root {
    --text-dark-mode: #F8FAFC;
    --text-light-mode: #1F2937;
    --card-bg-dark-mode: rgba(255, 255, 255, 0.03);
    --card-bg-light-mode: rgba(255, 255, 255, 0.1);
    --text-shadow-dark-mode: 0 0 4px rgba(0, 0, 0, 0.5);
    --button-shadow-dark-mode: 0 0 15px rgba(255, 255, 255, 0.5);
    --button-shadow-light-mode: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Ensure container visibility and prevent horizontal overflow */
#desarrollo-software {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 100px !important;
    overflow-x: hidden !important;
}

/* Dark Mode (default) */
#desarrollo-software h1,
#desarrollo-software h2,
#desarrollo-software h3,
#desarrollo-software p,
#desarrollo-software a,
#desarrollo-software img {
    color: var(--text-dark-mode) !important;
    text-shadow: var(--text-shadow-dark-mode) !important;
    display: block !important;
    visibility: visible !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Ensure buttons are visible */
#desarrollo-software a.pulse-button {
    display: inline-block !important;
    color: var(--text-dark-mode) !important;
}

/* Card containers */
#desarrollo-software .trust-block-container,
#desarrollo-software .service-block-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 2rem !important;
    padding: 1rem 0 !important;
}

/* Card blocks */
#desarrollo-software .trust-block,
#desarrollo-software .service-block {
    position: relative !important;
    flex: 1 1 320px !important;
    max-width: 360px !important;
    height: 400px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    transition: opacity 0.5s ease, transform 0.3s ease !important;
    opacity: 0 !important;
}

#desarrollo-software .service-block {
    flex: 0 0 calc(25% - 1.5rem) !important;
    min-width: 280px !important;
    max-width: 320px !important;
}

#desarrollo-software .trust-block.visible,
#desarrollo-software .service-block.visible {
    opacity: 1 !important;
}

/* Pseudo-elements for gradients */
#desarrollo-software .trust-block::before,
#desarrollo-software .trust-block::after,
#desarrollo-software .service-block::before,
#desarrollo-software .service-block::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 50px !important;
    width: 50% !important;
    height: 100% !important;
    border-radius: 8px !important;
    transform: skewX(15deg) !important;
    transition: 0.5s !important;
}

#desarrollo-software .trust-block::after,
#desarrollo-software .service-block::after {
    filter: blur(30px) !important;
}

#desarrollo-software .trust-block:hover::before,
#desarrollo-software .trust-block:hover::after,
#desarrollo-software .service-block:hover::before,
#desarrollo-software .service-block:hover::after {
    transform: skewX(0deg) !important;
    left: 20px !important;
    width: calc(100% - 90px) !important;
}

/* Gradients for trust-block (Dark Mode) */
#desarrollo-software .trust-block:nth-child(1)::before,
#desarrollo-software .trust-block:nth-child(1)::after {
    background: linear-gradient(315deg, #3B2A6D, #B8004C) !important;
}

#desarrollo-software .trust-block:nth-child(2)::before,
#desarrollo-software .trust-block:nth-child(2)::after {
    background: linear-gradient(315deg, #1F1447, #B8004C) !important;
}

#desarrollo-software .trust-block:nth-child(3)::before,
#desarrollo-software .trust-block:nth-child(3)::after {
    background: linear-gradient(315deg, #2A2E3B, #00A3CC) !important;
}

#desarrollo-software .trust-block:nth-child(4)::before,
#desarrollo-software .trust-block:nth-child(4)::after {
    background: linear-gradient(315deg, #0D1B47, #00A3CC) !important;
}

/* Gradients for service-block (Dark Mode) */
#desarrollo-software .service-block:nth-child(1)::before,
#desarrollo-software .service-block:nth-child(1)::after {
    background: linear-gradient(315deg, #3B2A6D, #B8004C) !important;
}

#desarrollo-software .service-block:nth-child(2)::before,
#desarrollo-software .service-block:nth-child(2)::after {
    background: linear-gradient(315deg, #1F1447, #B8004C) !important;
}

#desarrollo-software .service-block:nth-child(3)::before,
#desarrollo-software .service-block:nth-child(3)::after {
    background: linear-gradient(315deg, #2A2E3B, #00A3CC) !important;
}

#desarrollo-software .service-block:nth-child(4)::before,
#desarrollo-software .service-block:nth-child(4)::after {
    background: linear-gradient(315deg, #0D1B47, #00A3CC) !important;
}

/* Gradients for trust-block and service-block (Light Mode) */
body.light-mode #desarrollo-software .trust-block:nth-child(1)::before,
body.light-mode #desarrollo-software .trust-block:nth-child(1)::after,
body.light-mode #desarrollo-software .service-block:nth-child(1)::before,
body.light-mode #desarrollo-software .service-block:nth-child(1)::after {
    background: linear-gradient(315deg, #FCD34D, #60A5FA) !important;
}

body.light-mode #desarrollo-software .trust-block:nth-child(2)::before,
body.light-mode #desarrollo-software .trust-block:nth-child(2)::after,
body.light-mode #desarrollo-software .service-block:nth-child(2)::before,
body.light-mode #desarrollo-software .service-block:nth-child(2)::after {
    background: linear-gradient(315deg, #A3E635, #F87171) !important;
}

body.light-mode #desarrollo-software .trust-block:nth-child(3)::before,
body.light-mode #desarrollo-software .trust-block:nth-child(3)::after,
body.light-mode #desarrollo-software .service-block:nth-child(3)::before,
body.light-mode #desarrollo-software .service-block:nth-child(3)::after {
    background: linear-gradient(315deg, #FBCFE8, #4ADE80) !important;
}

body.light-mode #desarrollo-software .trust-block:nth-child(4)::before,
body.light-mode #desarrollo-software .trust-block:nth-child(4)::after,
body.light-mode #desarrollo-software .service-block:nth-child(4)::before,
body.light-mode #desarrollo-software .service-block:nth-child(4)::after {
    background: linear-gradient(315deg, #FCD34D, #A78BFA) !important;
}

/* Span for animated overlays */
#desarrollo-software .trust-block span,
#desarrollo-software .service-block span {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

#desarrollo-software .trust-block span::before,
#desarrollo-software .service-block span::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    opacity: 0 !important;
    transition: 0.1s !important;
    animation: animate 2s ease-in-out infinite !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

#desarrollo-software .trust-block:hover span::before,
#desarrollo-software .service-block:hover span::before {
    top: -50px !important;
    left: 50px !important;
    width: 100px !important;
    height: 100px !important;
    opacity: 1 !important;
}

#desarrollo-software .trust-block span::after,
#desarrollo-software .service-block span::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    opacity: 0 !important;
    transition: 0.5s !important;
    animation: animate 2s ease-in-out infinite !important;
    animation-delay: -1s !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

#desarrollo-software .trust-block:hover span::after,
#desarrollo-software .service-block:hover span::after {
    bottom: -50px !important;
    right: 50px !important;
    width: 100px !important;
    height: 100px !important;
    opacity: 1 !important;
}

@keyframes animate {
    0%, 100% {
        transform: translateY(10px) !important;
    }
    50% {
        transform: translate(-10px) !important;
    }
}

/* Card content */
#desarrollo-software .trust-block .content,
#desarrollo-software .service-block .content {
    position: relative !important;
    left: 0 !important;
    padding: 20px 40px !important;
    background: var(--card-bg-dark-mode) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
    z-index: 1 !important;
    transition: 0.5s !important;
    color: var(--text-dark-mode) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

#desarrollo-software .trust-block:hover .content,
#desarrollo-software .service-block:hover .content {
    left: -25px !important;
    padding: 60px 40px !important;
}

/* Card text */
#desarrollo-software .trust-block .content h3,
#desarrollo-software .service-block .content h3 {
    font-size: 2em !important;
    color: var(--text-dark-mode) !important;
    margin-bottom: 10px !important;
}

#desarrollo-software .trust-block .content p,
#desarrollo-software .service-block .content p {
    font-size: 1.1em !important;
    line-height: 1.4em !important;
    color: var(--text-dark-mode) !important;
    margin-bottom: 10px !important;
}

/* Service block button */
#desarrollo-software .service-block .content a {
    display: inline-block !important;
    font-size: 1.1em !important;
    color: var(--text-dark-mode) !important;
    text-decoration: none !important;
    margin-top: 5px !important;
    text-align: center !important;
    align-self: center !important;
}

/* Light Mode */
body.light-mode #desarrollo-software h1,
body.light-mode #desarrollo-software h2,
body.light-mode #desarrollo-software h3,
body.light-mode #desarrollo-software p,
body.light-mode #desarrollo-software a,
body.light-mode #desarrollo-software img,
body.light-mode #desarrollo-software .language-item span {
    color: var(--text-light-mode) !important;
    text-shadow: none !important;
}

body.light-mode #desarrollo-software a.pulse-button {
    color: var(--text-light-mode) !important;
}

body.light-mode #desarrollo-software .trust-block .content,
body.light-mode #desarrollo-software .service-block .content {
    background: var(--card-bg-light-mode) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
}

body.light-mode #desarrollo-software .trust-block .content h3,
body.light-mode #desarrollo-software .trust-block .content p,
body.light-mode #desarrollo-software .service-block .content h3,
body.light-mode #desarrollo-software .service-block .content p,
body.light-mode #desarrollo-software .service-block .content a {
    color: var(--text-light-mode) !important;
}

/* Explore Our Services Section */
#desarrollo-software .explore-services {
    padding: 4rem 1rem !important;
}

#desarrollo-software .explore-services h2 {
    color: var(--text-dark-mode) !important;
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 3rem !important;
}

#desarrollo-software .explore-services .service-subsection {
    margin-bottom: 3rem !important;
}

#desarrollo-software .explore-services .service-subsection h3 {
    color: var(--text-dark-mode) !important;
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
}

#desarrollo-software .explore-services .service-description {
    background: var(--card-bg-dark-mode) !important;
    backdrop-filter: blur(12px) !important;
    border-left: 4px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

#desarrollo-software .explore-services .service-description:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

#desarrollo-software .explore-services .service-description h3 {
    margin-bottom: 1rem !important;
}

#desarrollo-software .explore-services .service-description p {
    color: var(--text-dark-mode) !important;
    font-size: 1.125rem !important;
    line-height: 1.75 !important;
    margin-bottom: 1rem !important;
    text-align: left !important;
}

#desarrollo-software .explore-services .service-description p:last-child {
    margin-bottom: 0 !important;
}

body.light-mode #desarrollo-software .explore-services h2,
body.light-mode #desarrollo-software .explore-services h3,
body.light-mode #desarrollo-software .explore-services .service-description p {
    color: var(--text-light-mode) !important;
}

body.light-mode #desarrollo-software .explore-services .service-description {
    background: var(--card-bg-light-mode) !important;
    border-left: 4px solid rgba(0, 0, 0, 0.3) !important;
}

body.light-mode #desarrollo-software .explore-services .service-description:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Languages We Master Section */
#desarrollo-software .section .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    box-sizing: border-box !important;
}

#desarrollo-software .section .overflow-x-hidden {
    overflow-x: hidden !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#desarrollo-software .animate-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    animation: scroll 20s linear infinite !important;
    will-change: transform !important;
    width: auto !important;
    min-width: 100% !important;
}

#desarrollo-software .animate-scroll:hover {
    animation-play-state: paused !important;
}

#desarrollo-software .language-item {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    padding: 10px 15px !important;
    min-width: 120px !important;
    opacity: 1 !important;
    transition: opacity 0.5s ease, transform 0.5s ease !important;
}

#desarrollo-software .language-item.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#desarrollo-software .language-item:nth-child(1) { transition-delay: 0.1s !important; }
#desarrollo-software .language-item:nth-child(2) { transition-delay: 0.2s !important; }
#desarrollo-software .language-item:nth-child(3) { transition-delay: 0.3s !important; }
#desarrollo-software .language-item:nth-child(4) { transition-delay: 0.4s !important; }
#desarrollo-software .language-item:nth-child(5) { transition-delay: 0.5s !important; }

#desarrollo-software .language-item img {
    width: 40px !important;
    height: 40px !important;
    margin-right: 10px !important;
    object-fit: contain !important;
    display: block !important;
}

#desarrollo-software .language-item span {
    color: var(--text-dark-mode) !important;
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    display: block !important;
}

/* Animation for continuous scroll */
@keyframes scroll {
    0% {
        transform: translateX(0) !important;
    }
    100% {
        transform: translateX(-50%) !important;
    }
}

/* Pulse animation for buttons */
.pulse-button {
    position: relative !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.pulse-button:hover {
    transform: scale(1.1) !important;
    box-shadow: var(--button-shadow-dark-mode) !important;
}

.pulse-button::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: inherit !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 0 !important;
    animation: pulse 2s ease-out infinite !important;
}

body.light-mode .pulse-button:hover {
    box-shadow: var(--button-shadow-light-mode) !important;
}

body.light-mode .pulse-button::after {
    background: rgba(0, 0, 0, 0.1) !important;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 0.7 !important;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.5) !important;
        opacity: 0 !important;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5) !important;
        opacity: 0 !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #desarrollo-software .service-block {
        flex: 1 1 280px !important;
        max-width: 320px !important;
    }
}

@media (max-width: 768px) {
    #desarrollo-software .trust-block-container,
    #desarrollo-software .service-block-container {
        flex-direction: column !important;
        align-items: center !important;
    }

    #desarrollo-software .trust-block,
    #desarrollo-software .service-block {
        flex: 1 1 280px !important;
        max-width: 320px !important;
    }

    #desarrollo-software .trust-block .content,
    #desarrollo-software .service-block .content {
        padding: 16px !important;
    }

    #desarrollo-software .explore-services {
        padding: 2rem 1rem !important;
    }

    #desarrollo-software .explore-services h2 {
        font-size: 1.75rem !important;
        margin-bottom: 2rem !important;
    }

    #desarrollo-software .explore-services .service-subsection h3 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    #desarrollo-software .explore-services .service-description {
        padding: 1rem !important;
    }

    #desarrollo-software .explore-services .service-description p {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    #desarrollo-software .trust-block,
    #desarrollo-software .service-block {
        flex: 1 1 100% !important;
        max-width: 300px !important;
    }

    #desarrollo-software .trust-block:hover .content,
    #desarrollo-software .service-block:hover .content {
        padding: 40px 20px !important;
    }
}