/* ================= BOTONES ================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
}

.btn-primary:hover {
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.42);
}

.btn-secondary {
    color: #0f172a;
    background: #ffffff;
    border-color: #dbeafe;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover {
    color: var(--color-primary);
    border-color: rgba(37, 99, 235, 0.35);
}

/* ================= TEXTOS GENERALES ================= */

.section-badge,
.section-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.10);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-title,
.section-heading h2,
.section-header h2 {
    color: var(--color-text);
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.section-description,
.section-heading p,
.section-header p {
    max-width: 720px;
    margin: 18px auto 0;
    color: var(--color-muted);
    font-size: 1.02rem;
}

/* ================= DROPDOWN NAVBAR ================= */

.nav-dropdown-menu.dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ================= HERO ================= */

.hero-content h1 {
    max-width: 760px;
    font-size: clamp(2.55rem, 5vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
    font-weight: 900;
}

.hero-content p {
    max-width: 640px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

.hero-section .section-badge {
    color: #bfdbfe;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-highlight-item {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
}

.hero-highlight-item strong {
    display: block;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
}

.hero-highlight-item span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.86rem;
    line-height: 1.35;
}

.hero-card-info span {
    display: inline-flex;
    margin-bottom: 10px;
    color: #bfdbfe;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-card-info h2 {
    color: #ffffff;
    font-size: 1.7rem;
    line-height: 1.15;
    font-weight: 900;
}

.hero-card-info p {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
}

/* ================= LOGO MAGI IM EN HERO ================= */

.hero-card-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-frame {
    width: 100%;
    max-width: 440px;
    min-height: 220px;
    margin: 0 auto 34px;
    padding: 26px 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(219, 234, 254, 0.8);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.hero-card-logo .hero-logo-img {
    width: 100%;
    height: auto;
    max-height: 135px;
    display: block;
    object-fit: contain;
    object-position: center;
    transform: translateY(8px);
}

/* ================= TARJETAS BASE ================= */

.card,
.service-card,
.why-item,
.tech-card,
.testimonial-card,
.plan-card,
.support-card,
.mission-value-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.card {
    border-radius: var(--radius-md);
}

/* ================= SERVICIOS ================= */

.service-card {
    display: flex;
    flex-direction: column;
    min-height: 360px;
    padding: 34px 30px;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: var(--shadow-card);
}

.service-icon,
.why-icon,
.tech-icon,
.testimonial-icon,
.contact-icon {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.service-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 24px;
    border-radius: 18px;
    font-size: 1.55rem;
}

.service-card h3 {
    color: var(--color-text);
    font-size: 1.18rem;
    line-height: 1.25;
    font-weight: 900;
}

.service-card p {
    margin-top: 14px;
    color: var(--color-muted);
    font-size: 0.95rem;
}

/* ================= CARRUSEL DE SERVICIOS ================= */

.services-carousel {
    position: relative;
}

.services-track {
    display: flex;
    gap: 26px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 4px 22px;
    scrollbar-width: none;
}

.services-track::-webkit-scrollbar {
    display: none;
}

.services-track .service-card {
    flex: 0 0 calc((100% - 52px) / 3);
    scroll-snap-align: start;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
    transform: translateY(-50%);
    transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.38);
}

.carousel-btn-prev {
    left: -26px;
}

.carousel-btn-next {
    right: -26px;
}

.carousel-btn.is-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ================= BENEFICIOS ================= */

.why-item {
    min-height: 280px;
    padding: 30px 24px;
    text-align: center;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.why-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card);
}

.why-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 20px;
    border-radius: 50%;
    font-size: 1.65rem;
}

.why-item h3 {
    color: var(--color-text);
    font-size: 1.08rem;
    font-weight: 900;
}

.why-item p {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.93rem;
}

/* ================= PROYECTOS / FLUJO ================= */

.project-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card);
}

.project-preview {
    width: 100%;
    height: 230px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
}

.project-image-preview {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.project-image-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.project-card:hover .project-image-preview img {
    transform: scale(1.04);
}

/* Compatibilidad por si todavía usas tarjetas con logo */
.project-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
    background: #ffffff;
}

.project-logo-preview img {
    width: 100%;
    max-width: 330px;
    height: auto;
    object-fit: contain;
}

/* Mockup visual interno */
.preview-ui {
    height: 100%;
    display: grid;
    grid-template-columns: 62px 1fr;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.preview-sidebar {
    background: linear-gradient(180deg, #0f172a, #1d4ed8);
}

.preview-content {
    padding: 16px;
}

.preview-top {
    width: 72%;
    height: 16px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: #dbeafe;
}

.preview-chart {
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.20), rgba(14, 165, 233, 0.16));
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.preview-cards span {
    height: 34px;
    border-radius: 12px;
    background: #eff6ff;
}

.project-body {
    padding: 26px;
}

.project-body h3 {
    color: var(--color-text);
    font-size: 1.16rem;
    font-weight: 900;
}

.project-body p {
    margin: 12px 0 22px;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.10);
    font-size: 0.76rem;
    font-weight: 900;
}

.card-link {
    color: var(--color-primary);
    font-size: 0.88rem;
    font-weight: 900;
    white-space: nowrap;
}

/* ================= ÁREAS DE MANTENIMIENTO ================= */

.tech-card {
    min-height: 300px;
    padding: 32px 26px;
    text-align: center;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card);
}

.tech-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 22px;
    font-size: 1.75rem;
}

.tech-card h3 {
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 900;
}

.tech-card p {
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 0.94rem;
}

/* ================= TESTIMONIOS ================= */

.testimonial-card {
    min-height: 330px;
    padding: 32px;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.testimonial-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card);
}

.testimonial-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border-radius: 18px;
    font-size: 1.45rem;
}

.testimonial-card p {
    color: #475569;
    font-size: 0.97rem;
}

.testimonial-author {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
}

.testimonial-author strong {
    display: block;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 900;
}

.testimonial-author span {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 0.84rem;
}

/* ================= CONTACTO ================= */

.contact-info .section-title {
    margin-top: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.contact-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    font-size: 1.22rem;
}

.contact-item strong {
    display: block;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 900;
}

.contact-item span {
    display: block;
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.contact-form {
    padding: 34px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--color-text);
    background: #ffffff;
    font-size: 0.95rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(37, 99, 235, 0.65);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-message {
    min-height: 22px;
    margin-top: 14px;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.success-message {
    color: #16a34a;
}

.error-message {
    color: #dc2626;
}

/* ================= FOOTER ================= */

.footer-brand p {
    color: #94a3b8;
    font-size: 0.94rem;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.footer-column a {
    color: #94a3b8;
    font-size: 0.92rem;
    transition: color 0.25s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-column p {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #94a3b8;
    font-size: 0.92rem;
}

.footer-column p i {
    margin-top: 4px;
    color: #38bdf8;
}

.footer-bottom-content p {
    color: #64748b;
    font-size: 0.86rem;
}

/* ================= PÁGINAS INTERNAS ================= */

.about-page-content h1,
.mission-page-content h1,
.plans-header h1 {
    color: var(--color-text);
    font-size: clamp(2.25rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.about-page-text p,
.mission-page-text p,
.plans-header p,
.support-content p {
    color: var(--color-muted);
    font-size: 1.02rem;
}

.mission-value-card {
    padding: 22px;
    border-radius: 22px;
}

.mission-value-card i {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 14px;
}

.mission-value-card h3 {
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 900;
}

.mission-value-card p {
    margin-top: 8px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* ================= AJUSTE PÁGINA MISIÓN ================= */

.mission-page .mission-page-layout {
    align-items: flex-start;
}

.mission-page .mission-page-content {
    padding-top: 0;
}

.mission-page .mission-page-visual {
    align-self: flex-start;
    margin-top: 72px;
}

/* ================= LOGO MAGI IT EN PÁGINA NOSOTROS ================= */

.about-logo-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: 44px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34%),
        linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    border: 1px solid #dbeafe;
    box-shadow: var(--shadow-strong);
}

.about-logo-frame {
    width: 100%;
    max-width: 460px;
    padding: 34px 42px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid rgba(219, 234, 254, 0.9);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.12);
}

.about-logo-visual .about-logo-img {
    width: 100%;
    height: auto;
    max-height: 170px;
    display: block;
    object-fit: contain;
    object-position: center;
}

/* ================= PLANES ================= */

.plans-header p {
    max-width: 760px;
    margin: 20px auto 0;
}

.plan-card {
    display: flex;
    flex-direction: column;
    min-height: 620px;
    padding: 34px;
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.plan-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card);
}

.plan-featured {
    position: relative;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 22px 56px rgba(37, 99, 235, 0.16);
}

.plan-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--color-primary);
    background: rgba(37, 99, 235, 0.10);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-top h2 {
    color: var(--color-text);
    font-size: 1.45rem;
    font-weight: 900;
}

.plan-top p {
    margin-top: 12px;
    color: var(--color-muted);
    font-size: 0.94rem;
}

.plan-price {
    margin: 28px 0 24px;
    padding: 20px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.plan-price span {
    display: block;
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-price strong {
    display: block;
    margin-top: 4px;
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 900;
}

.plan-list {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.plan-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 0.94rem;
}

.plan-list li i {
    margin-top: 4px;
    color: #16a34a;
}

.plan-card .btn {
    margin-top: auto;
}

/* ================= SOPORTE ================= */

.support-content h2 {
    color: var(--color-text);
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.support-content p {
    margin-top: 18px;
}

.support-card {
    padding: 34px;
    border-radius: var(--radius-lg);
}

.support-card h3 {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.support-card ul {
    display: grid;
    gap: 14px;
}

.support-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 0.95rem;
}

.support-card li i {
    margin-top: 4px;
    color: #16a34a;
}

/* ================= ANIMACIÓN DE APARICIÓN ================= */

.fade-in-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= RESPONSIVE CARRUSEL ================= */

@media (max-width: 1024px) {
    .services-track .service-card {
        flex: 0 0 calc((100% - 26px) / 2);
    }

    .carousel-btn-prev {
        left: -12px;
    }

    .carousel-btn-next {
        right: -12px;
    }
}

@media (max-width: 768px) {
    .services-track .service-card {
        flex: 0 0 100%;
    }

    .carousel-btn {
        width: 46px;
        height: 46px;
    }

    .carousel-btn-prev {
        left: 8px;
    }

    .carousel-btn-next {
        right: 8px;
    }

    .project-preview {
        height: 205px;
    }

    .hero-logo-frame {
        max-width: 340px;
        min-height: 190px;
        padding: 24px 28px;
        margin-bottom: 28px;
        border-radius: 24px;
    }

    .hero-card-logo .hero-logo-img {
        max-height: 110px;
        transform: translateY(6px);
    }

    .mission-page .mission-page-visual {
        margin-top: 28px;
    }

    .about-logo-visual {
        min-height: 340px;
        padding: 28px;
    }

    .about-logo-frame {
        max-width: 340px;
        padding: 26px 30px;
        border-radius: 26px;
    }

    .about-logo-visual .about-logo-img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .project-preview {
        height: 185px;
    }

    .hero-logo-frame {
        max-width: 300px;
        min-height: 170px;
        padding: 22px 24px;
    }

    .hero-card-logo .hero-logo-img {
        max-height: 95px;
        transform: translateY(5px);
    }

    .mission-page .mission-page-visual {
        margin-top: 22px;
    }

    .about-logo-frame {
        max-width: 300px;
        padding: 24px;
    }
}