/* Reset y configuración base se encuentran en el CSS crítico en index.html */

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Mockup de la imagen del Hero */
.mockup-container {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 4 / 3;
    background: #1e293b;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    margin: 0 auto;
    position: relative;
    transition: all 0.4s ease;
}

.mockup-container:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 35px 70px -12px rgba(0, 0, 0, 0.6);
}

.animate-mockup {
    animation: mockupFloat 6s ease-in-out infinite;
}

@keyframes mockupFloat {

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

    50% {
        transform: translateY(-15px);
    }
}

.mockup-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #667eea, #764ba2, #667eea);
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    animation: glowPulse 3s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0;
        background-position: 0% 50%;
    }

    50% {
        opacity: 0.3;
        background-position: 100% 50%;
    }
}

.mockup-container:hover .mockup-glow {
    opacity: 0.5;
}

.mockup-screen {
    background: var(--white);
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.mockup-header {
    height: 35px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

.dot.red {
    background: #ff5f57;
    animation-delay: 0s;
}

.dot.yellow {
    background: #ffbd2e;
    animation-delay: 0.3s;
}

.dot.green {
    background: #28ca42;
    animation-delay: 0.6s;
}

@keyframes dotPulse {

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

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.mockup-url-bar {
    background: #e2e8f0;
    border-radius: 15px;
    padding: 4px 12px;
    min-width: 150px;
}

.url-text {
    font-size: 11px;
    color: #64748b;
    animation: typeWriterMockup 4s steps(20) infinite;
    overflow: hidden;
    white-space: nowrap;
}

@keyframes typeWriterMockup {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 100%;
    }
}

.mockup-body {
    padding: 15px;
    display: grid;
    gap: 12px;
    height: calc(100% - 35px);
}

.mockup-section {
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.section-1 {
    height: 50px;
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 100%);
    animation: sectionLoad 3s ease-in-out infinite;
    animation-delay: 1s;
}

.section-2 {
    height: 60px;
    background: #f8fafc;
    animation: sectionLoad 3s ease-in-out infinite;
    animation-delay: 1.5s;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.section-3 {
    height: 45px;
    background: #f1f5f9;
    animation: sectionLoad 3s ease-in-out infinite;
    animation-delay: 2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@keyframes sectionLoad {
    0% {
        opacity: 0.3;
        transform: translateX(-20px);
    }

    50% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0.8;
        transform: translateX(0);
    }
}

.loading-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.content-placeholder {
    width: 100%;
}

.placeholder-line {
    height: 8px;
    background: #cbd5e1;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: shimmer 2s ease-in-out infinite;
}

.placeholder-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.mockup-buttons {
    display: flex;
    gap: 8px;
}

.mockup-btn {
    width: 60px;
    height: 20px;
    border-radius: 10px;
    animation: buttonPulse 3s ease-in-out infinite;
}

.mockup-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    animation-delay: 0s;
}

.mockup-btn.secondary {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    animation-delay: 0.5s;
}

@keyframes buttonPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Secciones genéricas */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

/* Sección de Características */
.features {
    background-color: var(--background-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
}

.feature-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Casos de Éxito */
.case-study-grid {
    display: grid;
    gap: 5rem;
}

.case-study-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.case-study-item.reverse {
    grid-template-columns: 1fr 1fr;
}

.case-study-item.reverse .case-study-image-wrapper {
    order: 2;
}

.case-study-image-wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.case-study-image-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.case-study-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.case-study-image-wrapper video {
    width: 100%;
    height: 450px;
    display: block;
    object-fit: cover;
    object-position: left center;
    border-radius: 10px;
}

.case-study-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.case-study-details p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.result-highlight {
    font-weight: 600;
    color: var(--text-dark);
    background-color: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.portfolio-tech span {
    background-color: #eef2ff;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.portfolio-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.portfolio-link {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Precios */
.pricing {
    background-color: var(--background-light);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.pricing-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.08) translateY(-10px);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header h3 {
    font-size: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.pricing-header p {
    color: var(--text-light);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.pricing-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pricing-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Contacto */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item svg {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.cta-button-form {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button-form:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.success-message {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    color: #059669;
    background-color: #D1FAE5;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Footer */
.footer {
    background-color: var(--background-dark);
    color: #a0aec0;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

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

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

.footer-section a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: #a0aec0;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #2d3748;
    padding-top: 2rem;
}

/* Responsivo */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: scale(1.03) translateY(-10px);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .case-study-item,
    .case-study-item.reverse {
        grid-template-columns: 1fr;
    }

    .case-study-item.reverse .case-study-image-wrapper {
        order: 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: left 0.5s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        color: var(--text-dark);
        font-size: 1.5rem;
    }

    .navbar.scrolled .nav-link {
        color: var(--text-dark);
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background-color: var(--white);
        transition: all 0.3s;
    }

    .navbar.scrolled .hamburger span {
        background-color: var(--text-dark);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hamburger.active span {
        background-color: var(--text-dark);
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}