/* --- Variables de Color (Paleta Artasgo) --- */
:root {
    --color-text: #000000;
    --color-text-secondary: #545454;
    --color-background: #ffffff;
    --color-background-section: #f6f6f6;
    --color-accent: #f76100;
    --font-primary: 'Inter', sans-serif;
}

/* --- Estilos para el Modo Oscuro --- */
html.dark {
    --color-text: #f6f6f6;
    --color-text-secondary: #a0aec0; /* Un gris claro para texto secundario */
    --color-background: #121212; /* Un negro más suave que el puro */
    --color-background-section: #1a202c; /* Un gris azulado oscuro */
}

/* --- Reset y Estilos Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; /* 24px */
}

/* --- Header Principal --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.8); /* Fondo blanco semitransparente */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
html.dark .main-header {
    background-color: rgba(18, 18, 18, 0.8); /* Fondo oscuro semitransparente */
    border-bottom: 1px solid #374151;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.75rem; /* 28px */
    font-weight: 800;
    text-decoration: none;
    color: var(--color-text);
}

.accent-dot {
    color: var(--color-accent);
}

.main-nav {
    display: none; /* Oculto en móvil */
}
@media (min-width: 992px) { /* Cambiado a 992px para mejor manejo de espacios */
    .main-nav {
        display: flex;
        gap: 2rem; /* 32px */
    }
}

.main-nav a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-accent);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* 16px */
}

.theme-toggle-btn, .mobile-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 0.5rem; /* 8px */
    border-radius: 9999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.theme-toggle-btn:hover, .mobile-menu-button:hover {
    background-color: var(--color-background-section);
    color: var(--color-text);
}

.icon {
    width: 24px;
    height: 24px;
}
.hidden { display: none; }

.cta-button {
    display: none; /* Oculto en móvil */
    background-color: var(--color-accent);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.25rem; /* 12px 20px */
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.cta-button:hover {
    opacity: 0.9;
}
@media (min-width: 768px) {
    .cta-button {
        display: inline-block;
    }
}

.mobile-menu-button {
    display: block;
}
@media (min-width: 992px) { /* Cambiado a 992px */
    .mobile-menu-button {
        display: none;
    }
}

/* --- Menú Móvil Desplegable --- */
.mobile-menu {
    border-top: 1px solid #e5e7eb;
    background-color: var(--color-background);
    padding: 1rem 0;
}
html.dark .mobile-menu {
    border-top: 1px solid #374151;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
}

.mobile-menu a:hover {
    background-color: var(--color-background-section);
}

/* --- Estilos para el Mega Menú --- */
.nav-item {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 600px;
    max-width: calc(100vw - 3rem);
    background-color: var(--color-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
html.dark .mega-menu {
    border-color: #374151;
}

.nav-item.is-active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

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

.mega-menu-item {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.mega-menu-item:hover {
    background-color: var(--color-background-section);
}

.mega-menu-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.mega-menu-item p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}


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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    padding-bottom: 2.5rem;
}
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-tagline {
    margin-top: 1rem;
    max-width: 250px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav a {
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}
html.dark .footer-bottom {
    border-top-color: #374151;
}

/* --- Estilos Generales para Secciones y Títulos --- */
.section-heading {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.2;
}
@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-subtitle {
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
}

.text-accent {
    color: var(--color-accent);
}


/* --- 1. Hero Section --- */
.hero-section {
    background-color: var(--color-background-section);
    padding: 5rem 0;
    text-align: center;
}
@media (min-width: 768px) {
    .hero-section {
        padding: 8rem 0;
    }
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text);
}
@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-accent {
    color: var(--color-accent);
}

.hero-subtitle {
    margin-top: 1.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    line-height: 1.7;
}
@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.hero-cta {
    margin-top: 2.5rem;
}

.cta-button-primary {
    background-color: var(--color-accent);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}
.cta-button-primary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}


/* --- 2. Services Section (Bifurcación) --- */
.services-section {
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .services-section {
        padding: 7rem 0;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.service-card {
    background-color: var(--color-background-section);
    padding: 2.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--color-accent);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.card-text {
    margin-top: 1rem;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
}

.card-link span {
    display: inline-block;
    transition: transform 0.2s ease;
}

.card-link:hover span {
    transform: translateX(4px);
}


/* --- 3. Clients Section --- */
.clients-section {
    padding: 4rem 0;
}

.clients-title {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
}

.clients-grid {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}
@media (min-width: 768px) {
    .clients-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.client-logo {
    max-width: 120px;
    margin: 0 auto;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}
.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}


/* --- 4. Manifesto Section --- */
.manifesto-section {
    background-color: var(--color-accent);
    color: white;
    padding: 5rem 0;
    text-align: center;
}
@media (min-width: 768px) {
    .manifesto-section {
        padding: 6rem 0;
    }
}

.manifesto-title {
    font-size: 2.25rem;
    font-weight: 800;
}

.manifesto-text {
    margin-top: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25rem;
    line-height: 1.7;
    font-weight: 400;
    opacity: 0.9;
}


/* --- 5. Projects Section --- */
.projects-section {
    background-color: var(--color-background-section);
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .projects-section {
        padding: 7rem 0;
    }
}

.projects-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-background);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.project-tags {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}


/* --- 6. Final CTA Section --- */
.cta-section {
    padding: 5rem 0;
    text-align: center;
}
@media (min-width: 768px) {
    .cta-section {
        padding: 7rem 0;
    }
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
}
@media (min-width: 768px) {
    .cta-title {
        font-size: 3rem;
    }
}

.cta-text {
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    line-height: 1.7;
}

.cta-button-container {
    margin-top: 2.5rem;
}


/* =========================================================== */
/* === ESTILOS PARA LA PÁGINA DE SOLUCIONES DIGITALES === */
/* =========================================================== */

.hero-digital {
    background-color: var(--color-background-section);
}

.intro-section {
    padding: 5rem 0;
    background-color: var(--color-background);
}
@media (min-width: 768px) {
    .intro-section {
        padding: 7rem 0;
    }
}

.intro-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 992px) {
    .intro-container {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

.intro-text p {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.intro-image-placeholder img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.digital-services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .digital-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.featured-project-section {
    padding: 5rem 0;
    background-color: var(--color-background-section);
}
@media (min-width: 768px) {
    .featured-project-section {
        padding: 7rem 0;
    }
}

.featured-project-content {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 992px) {
    .featured-project-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 5rem;
    }
}

.featured-project-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.featured-project-text .project-title {
    font-size: 1.75rem;
}

.featured-project-text p {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.cta-button-secondary {
    display: inline-block;
    margin-top: 2rem;
    background-color: transparent;
    color: var(--color-accent);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    border: 2px solid var(--color-accent);
    transition: all 0.2s ease;
}
.cta-button-secondary:hover {
    background-color: var(--color-accent);
    color: white;
}

/* =========================================================== */
/* === ESTILOS PARA LA PÁGINA DE SOLUCIONES TANGIBLES === */
/* =========================================================== */
.hero-tangible {
    background-color: var(--color-background-section);
}

/* =========================================================== */
/* === ESTILOS PARA LAS PÁGINAS DE SERVICIO (EJ. DEV WEB) === */
/* =========================================================== */
.hero-service {
    background-color: var(--color-background-section);
    padding: 5rem 0;
    text-align: center;
}
@media (min-width: 768px) {
    .hero-service {
        padding: 6rem 0;
    }
}

.service-hero-subtitle {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
}

.hero-service .hero-title {
    margin-top: 0.5rem;
    font-size: 2.75rem;
}
@media (min-width: 768px) {
    .hero-service .hero-title {
        font-size: 4rem;
    }
}

.hero-service .hero-subtitle {
    margin-top: 1.5rem;
}

.what-we-build-section {
    padding: 5rem 0;
    background-color: var(--color-background-section);
}
@media (min-width: 768px) {
    .what-we-build-section {
        padding: 7rem 0;
    }
}

.features-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-item {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
html.dark .feature-item {
    border-color: #374151;
}

.process-section {
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .process-section {
        padding: 7rem 0;
    }
}

.process-steps {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 768px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process-step {
    text-align: center;
}

.step-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
    background-color: var(--color-background-section);
    width: 60px;
    height: 60px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.step-text {
    line-height: 1.6;
}

.pricing-section {
    padding: 5rem 0;
    background-color: var(--color-background-section);
}
@media (min-width: 768px) {
    .pricing-section {
        padding: 7rem 0;
    }
}

.pricing-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}
@media (min-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    background-color: var(--color-background);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}
html.dark .pricing-card {
    border-color: #374151;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card.recommended {
    border: 2px solid var(--color-accent);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
}

.package-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.package-for {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: var(--color-text-secondary);
    min-height: 42px;
}

.package-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}
html.dark .package-price {
    border-color: #374151;
}

.package-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.package-features li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.package-features li::before {
    content: '✓';
    color: var(--color-accent);
    font-weight: 800;
    margin-right: 0.75rem;
    margin-top: 2px;
}

.pricing-card .cta-button-secondary, .pricing-card .cta-button-primary {
    width: 100%;
    text-align: center;
}

.package-price-usd {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.no-wrap {
    white-space: nowrap;
}


/* =========================================================== */
/* === ESTILOS PARA LA PÁGINA DE AGENTES DE IA (FUTURISTA) === */
/* =========================================================== */
#futuristic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.ia-page body {
    background-color: transparent;
}

.ia-page .hero-section,
.ia-page .tech-stack-section,
.ia-page .use-cases-section,
.ia-page .cta-section,
.ia-page .main-footer {
    position: relative;
}

html.dark .ia-page .hero-section,
html.dark .ia-page .tech-stack-section,
html.dark .ia-page .cta-section,
html.dark .ia-page .main-footer {
    background-color: rgba(26, 32, 44, 0.9);
}
html.dark .ia-page .use-cases-section {
    background-color: rgba(18, 18, 18, 0.9);
}

html:not(.dark) .ia-page .hero-section,
html:not(.dark) .ia-page .tech-stack-section,
html:not(.dark) .ia-page .cta-section,
html:not(.dark) .ia-page .main-footer {
    background-color: rgba(246, 246, 246, 0.9);
}
html:not(.dark) .ia-page .use-cases-section {
    background-color: rgba(255, 255, 255, 0.9);
}

.tech-stack-section {
    padding: 3rem 0;
    background-color: var(--color-background-section);
}

.tech-stack-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.tech-stack-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.tech-stack-logos img {
    max-height: 40px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}
.tech-stack-logos img:hover {
    opacity: 1;
    filter: none;
}
html.dark .tech-stack-logos img {
    filter: grayscale(100%) invert(100%);
}
html.dark .tech-stack-logos img:hover {
    filter: none;
}

.use-cases-section {
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .use-cases-section {
        padding: 7rem 0;
    }
}

.use-case-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 5rem;
}
@media (min-width: 992px) {
    .use-case-item {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
}

.use-case-item.reverse {
    direction: rtl;
}
.use-case-item.reverse > * {
    direction: ltr;
}

.use-case-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.use-case-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.use-case-text p {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* =========================================================== */
/* === ESTILOS PARA LA LANDING PAGE DE MIGRACIÓN === */
/* =========================================================== */

.comparison-section {
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .comparison-section {
        padding: 7rem 0;
    }
}

.comparison-table {
    margin-top: 4rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
html.dark .comparison-table {
    border-color: #374151;
}

.table-header-row, .table-data-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

.table-header-row {
    background-color: var(--color-background-section);
}

.header-cell, .data-cell {
    padding: 1.25rem;
    text-align: center;
}

.header-cell {
    font-weight: 700;
    color: var(--color-text);
}

.data-cell {
    border-top: 1px solid #e5e7eb;
}
html.dark .data-cell {
    border-top-color: #374151;
}
.data-cell:not(:first-child) {
     border-left: 1px solid #e5e7eb;
}
html.dark .data-cell:not(:first-child) {
     border-left-color: #374151;
}

.feature-col {
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
}

.alert-banner {
    display: inline-block;
    background-color: var(--color-accent);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

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

.landing-partners-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text); /* Usa la variable de color para cambiar con el tema */
    margin-bottom: 3rem;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}

.partner-logo-item {
    text-align: center;
    max-width: 200px;
}

.partner-logo-item img {
    max-height: 60px;
    opacity: 0.8;
}

.partner-logo-item p {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.pricing-card .package-features li strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 0.5rem;
}

.currency-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.currency-switcher .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.currency-switcher .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.currency-switcher .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
html.dark .currency-switcher .slider {
    background-color: #4a5568;
}

.currency-switcher .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.currency-switcher input:checked + .slider {
    background-color: var(--color-accent);
}

.currency-switcher input:checked + .slider:before {
    transform: translateX(22px);
}

.currency-switcher .slider.round {
    border-radius: 34px;
}

.currency-switcher .slider.round:before {
    border-radius: 50%;
}

.case-study-results {
    list-style: none;
    margin-top: 1.5rem;
}
.case-study-results li {
    padding: 0.5rem 0;
    font-size: 1.125rem;
}
.result-number {
    font-weight: 800;
    color: var(--color-accent);
    margin-right: 0.5rem;
}

.creative-gallery-section {
    padding: 5rem 0;
}
@media (min-width: 768px) {
    .creative-gallery-section {
        padding: 7rem 0;
    }
}

.gallery-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .gallery-item.wide {
        grid-column: span 2;
    }
    .gallery-item.tall {
        grid-row: span 2;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.4);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out, opacity 0.4s ease;
    opacity: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.gallery-overlay p {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    opacity: 0.8;
}


/* =========================================================== */
/* === ESTILOS PARA EL CHAT WIDGET === */
/* =========================================================== */

#chat-toggle-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    width: 64px;
    height: 64px;
    background-color: var(--color-accent);
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}
#chat-toggle-button:hover {
    transform: scale(1.1);
}
#chat-toggle-button .icon {
    width: 32px;
    height: 32px;
}

#chat-window {
    position: fixed;
    bottom: 7rem;
    right: 2rem;
    z-index: 99;
    width: 90vw;
    max-width: 400px;
    height: 70vh;
    max-height: 600px;
    background-color: var(--color-background);
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform-origin: bottom right;
}

/* CORRECCIÓN PARA EL BUG DE CLICS EN MÓVIL */
#chat-window.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    pointer-events: none; /* Evita que el chat intercepte clics cuando está oculto */
}

.chat-header {
    background-color: var(--color-background-section);
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}
html.dark .chat-header {
    border-bottom-color: #374151;
}
.chat-header h3 {
    color: var(--color-text);
    font-size: 1.125rem;
    margin: 0;
}
.chat-header p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0.25rem 0 0 0;
}

#chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.5;
}
.message p { margin: 0; }

.user-message {
    background-color: var(--color-accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background-color: var(--color-background-section);
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

#chat-form {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}
html.dark #chat-form {
    border-top-color: #374151;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    background-color: var(--color-background);
    color: var(--color-text);
}
html.dark #chat-input {
    border-color: #374151;
}
#chat-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

#chat-form button {
    background-color: var(--color-accent);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0 1rem;
    margin-left: 0.5rem;
    cursor: pointer;
}
#chat-form button .icon {
    width: 20px;
    height: 20px;
}

.loading-message {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.75rem 1rem;
    background-color: var(--color-background-section);
    border-radius: 12px;
    align-self: flex-start;
}
.loading-message .dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-text-secondary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.loading-message .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-message .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* ESTILOS PARA LA TABLA EN MÓVILES (CORREGIDO) */
@media (max-width: 768px) {
    .comparison-table {
        border: none;
    }
    .table-header-row {
        display: none;
    }
    .table-data-row {
        grid-template-columns: 1fr;
        margin-bottom: 2rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
    }
    html.dark .table-data-row {
        border-color: #374151;
    }
    .data-cell {
        display: flex;
        justify-content: space-between;
        text-align: right;
        border-top: none !important;
        border-left: none !important;
    }
    .data-cell:not(:last-child) {
        border-bottom: 1px solid #e5e7eb;
    }
    html.dark .data-cell:not(:last-child) {
        border-bottom-color: #374151;
    }
    .data-cell.feature-col {
        background-color: var(--color-background-section);
        font-weight: 700;
        text-align: center;
        justify-content: center;
        padding: 1rem;
    }
    .data-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text);
        text-align: left;
        margin-right: 1rem;
    }
    .data-cell.feature-col::before {
        content: "";
        margin: 0;
    }
}

