/* ============================================
   VARIABLES Y RESET
   ============================================ */

:root {
    --primary: #3f89c1;
    --primary-dark: #2c5a8c;
    --secondary: #436987;
    --dark: #47484c;
    --light: #f5f6fa;
    --white: #ffffff;
    --gray: #8b92a0;
    --accent: #ff6b35;
    --gradient: linear-gradient(135deg, #3f89c1 0%, #2c5a8c 100%);
    --gradient-reverse: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

/* ============================================
   UTILITIES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: var(--white);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

.cta-nav {
    padding: 0.75rem 1.5rem;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(63, 137, 193, 0.3);
}

.cta-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(63, 137, 193, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 100px 20px;
    background: linear-gradient(135deg, rgba(63, 137, 193, 0.9) 0%, rgba(44, 90, 140, 0.9) 100%), url('images/hero-background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    position: relative;
    color: var(--white);
}

.hero .hero-title, .hero .hero-subtitle {
    color: var(--white);
}

.hero .text-gradient {
    background: var(--gradient-reverse);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(63, 137, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(63, 137, 193, 0.4);
}

.btn-secondary {
    background: var(--light);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-cta-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeInRight 0.8s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 450px;
}

.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animated-cards {
    position: relative;
    width: 300px;
    height: 300px;
    z-index: 2;
}

.card {
    position: absolute;
    width: 120px;
    height: 140px;
    background: var(--white);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(63, 137, 193, 0.2);
}

.card-icon {
    font-size: 2.5rem;
}

.card-1 {
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #3f89c1 0%, #2c5a8c 100%);
    color: var(--white);
    animation: float 3s ease-in-out infinite;
}

.card-2 {
    top: 80px;
    left: 90px;
    background: linear-gradient(135deg, #436987 0%, #3f89c1 100%);
    color: var(--white);
    animation: float 3s ease-in-out infinite 0.3s;
}

.card-3 {
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: var(--white);
    animation: float 3s ease-in-out infinite 0.6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.glow-sphere {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(63, 137, 193, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ============================================
   METODOLOGÍA SECTION - PREMIUM REDESIGN
   ============================================ */

.metodologia {
    padding: 120px 20px;
    background: var(--light);
    position: relative;
}

.metodologia-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 4rem auto 0;
    position: relative;
}

/* Connecting line for desktop */
@media (min-width: 1025px) {
    .metodologia-steps::before {
        content: '';
        position: absolute;
        top: 150px;
        left: 50px;
        right: 50px;
        height: 2px;
        background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
        opacity: 0.2;
        z-index: 0;
    }
}

.step {
    position: relative;
    padding: 3rem 2rem 2rem;
    background: var(--white);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 1;
}

.step:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(63, 137, 193, 0.15);
    border-color: var(--primary);
}

.step-number {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(63, 137, 193, 0.1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: absolute;
    top: -20px;
    left: 20px;
    opacity: 0.3;
    font-family: 'JetBrains Mono', monospace;
}

.step-content {
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--dark);
    font-weight: 700;
}

.step-content p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 1rem;
}

/* ============================================
   SERVICIOS SECTION
   ============================================ */

.servicios {
    padding: 80px 20px;
    background: var(--light);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.servicio-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.servicio-card:hover {
    border-color: var(--primary);
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(63, 137, 193, 0.15);
}

.servicio-icon {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    transition: all 0.3s ease;
}

.servicio-card:hover .servicio-icon {
    color: var(--accent);
    transform: scale(1.1) rotate(5deg);
}

.servicio-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.servicio-card p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   BENEFICIOS SECTION
   ============================================ */

.beneficios {
    padding: 80px 20px;
    background: var(--white);
}

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.beneficio-item {
    padding: 2rem;
    text-align: center;
    border-radius: 15px;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(63, 137, 193, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
    border: 2px solid transparent;
}

.beneficio-item:hover {
    border-color: var(--primary);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(63, 137, 193, 0.15);
}

.beneficio-number {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.beneficio-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.beneficio-item p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   CASOS DE ÉXITO
   ============================================ */

.casos {
    padding: 80px 20px;
    background: var(--light);
}

.casos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.caso-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.caso-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(63, 137, 193, 0.2);
}

.caso-image {
    width: 100%;
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.caso-img-asset {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.caso-card:hover .caso-img-asset {
    transform: scale(1.1);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3f89c1 0%, #2c5a8c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.caso-card:hover .placeholder-image {
    background: linear-gradient(135deg, #2c5a8c 0%, #3f89c1 100%);
    transform: scale(1.1);
}

.caso-content {
    padding: 2rem;
}

.caso-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.caso-industria {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.caso-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.caso-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    padding: 1rem;
    background: var(--light);
    border-radius: 10px;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.stat span {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ============================================
   FAQ SECTION - ACCORDION DESIGN
   ============================================ */

.faq {
    padding: 120px 20px;
    background: var(--light);
}

.faq-container {
    max-width: 800px;
    margin: 4rem auto 0;
}

.faq-item {
    background: var(--white);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.15rem;
    color: var(--dark);
    margin: 0;
    font-weight: 600;
    transition: color 0.3s ease;
}

.faq-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.3s ease;
}

.faq-icon::before, .faq-icon::after {
    content: '';
    position: absolute;
    background: var(--primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::before {
    width: 12px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 12px;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
    padding-bottom: 1.5rem;
    color: var(--gray);
    line-height: 1.7;
    margin: 0;
}

/* Active State */
.faq-item.active {
    border-color: var(--primary);
}

.faq-item.active .faq-question h3 {
    color: var(--primary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
    padding: 80px 20px;
    background: var(--gradient);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    color: var(--white);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ============================================
   CTA FINAL SECTION
   ============================================ */

.cta-final {
    padding: 100px 20px;
    background: linear-gradient(135deg, #2c5a8c 0%, #436987 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-final::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: drift 6s ease-in-out infinite;
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(50px, 50px);
    }
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-final h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.cta-final p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.btn-cta-large {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
    animation: slideUp 0.8s ease-out 0.6s both;
}

.btn-cta-large:hover {
    background: #ff5500;
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 20px 20px;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-visual {
        height: 300px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .nav-menu {
        display: none;
    }

    .cta-nav {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .cta-final h2 {
        font-size: 1.8rem;
    }

    .servicios-grid,
    .beneficios-grid,
    .casos-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .navbar-container {
        padding: 0.75rem 20px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .cta-nav {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .caso-stats {
        grid-template-columns: 1fr;
    }
}
