/* Página Nuestros Proyectos / Casos de Éxito */

/* Fondo light igual que home cuando está en modo claro */
body.light-theme.page-proyectos {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
}

/* Fondo oscuro igual que home: mismo gradiente que body en main.css */
body.page-proyectos:not(.light-theme) {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.4), rgba(15, 23, 42, 0.98)) !important;
    background-color: #0f172a !important;
}

/* Botón de tema visible en modo claro: fondo y borde para que la animación Rive no se pierda en blanco */
body.light-theme.page-proyectos .theme-toggle {
    background: rgba(30, 64, 175, 0.15) !important;
    border: 1px solid rgba(30, 64, 175, 0.4) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Contenido por encima del canvas de fondo (mismo que home) */
.page-proyectos .navbar,
.page-proyectos .proyectos-main,
.page-proyectos .footer {
    position: relative;
    z-index: 10;
}

.page-proyectos .navbar .navbar-link {
    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.page-proyectos .navbar .navbar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.page-proyectos .navbar .navbar-contacto-active {
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.page-proyectos .navbar .navbar-contacto-active:hover {
    border-color: rgba(56, 189, 248, 0.8);
    background: rgba(56, 189, 248, 0.25);
    color: #fff;
}

body.light-theme .page-proyectos .navbar .navbar-link {
    color: #475569;
}

body.light-theme .page-proyectos .navbar .navbar-link:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.06);
}

body.light-theme .page-proyectos .navbar .navbar-link-active {
    color: #1e40af;
}

body.light-theme .page-proyectos .navbar .navbar-contacto-active {
    border-color: rgba(30, 64, 175, 0.5);
    background: rgba(30, 64, 175, 0.1);
    color: #1e40af;
}

body.light-theme .page-proyectos .navbar .navbar-contacto-active:hover {
    border-color: rgba(30, 64, 175, 0.7);
    background: rgba(30, 64, 175, 0.15);
    color: #1e3a8a;
}

/* Hero proyectos */
.proyectos-main {
    padding-top: 5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 3rem;
}

.hero-proyectos {
    margin-bottom: 3rem;
}

.hero-proyectos-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.hero-proyectos-text {
    flex: 1;
    min-width: 0;
}

.hero-proyectos-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.hero-proyectos-desc {
    font-size: 1rem;
    color: #d1d5db;
    line-height: 1.6;
    margin: 0 0 1.5rem;
    max-width: 560px;
}

body.light-theme .hero-proyectos-title {
    color: #0f172a !important;
}

body.light-theme .hero-proyectos-desc {
    color: #334155 !important;
}

.hero-proyectos-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.6);
    color: #e5e7eb;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-btn:hover {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.7);
    color: #fff;
}

.filter-btn.active {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}

body.light-theme .filter-btn {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

body.light-theme .filter-btn:hover {
    background: #bfdbfe;
    border-color: #60a5fa;
    color: #1e3a8a;
}

body.light-theme .filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.btn-start-project {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.btn-start-project:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
}

body.light-theme .btn-start-project {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
}

body.light-theme .btn-start-project:hover {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #fff;
}

.icon-rocket {
    flex-shrink: 0;
}

/* Grid de proyectos */
.proyectos-grid-section {
    margin-bottom: 4rem;
}

.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.proyecto-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.proyecto-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

body.light-theme .proyecto-card {
    background: linear-gradient(135deg, #4660b5 0%, #4660b5 50%, #0f172a 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .proyecto-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.proyecto-card-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    width: fit-content;
}

body.light-theme .proyecto-card-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.proyecto-card-image {
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-theme .proyecto-card-image {
    background: rgba(0, 0, 0, 0.2);
}

.proyecto-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    width: 48px;
    height: 48px;
    color: #64748b;
}

body.light-theme .proyecto-card .placeholder-icon {
    color: rgba(255, 255, 255, 0.7);
}

.proyecto-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0;
}

body.light-theme .proyecto-card-title {
    color: #fff;
}

.proyecto-card-challenge,
.proyecto-card-solution {
    margin: 0;
}

.proyecto-card-challenge .label,
.proyecto-card-solution .label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.proyecto-card-challenge p,
.proyecto-card-solution p {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0;
}

body.light-theme .proyecto-card-challenge .label,
body.light-theme .proyecto-card-solution .label {
    color: rgba(255, 255, 255, 0.85);
}

body.light-theme .proyecto-card-challenge p,
body.light-theme .proyecto-card-solution p {
    color: #fff;
}

.proyecto-card-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.proyecto-card-metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f9fafb;
}

body.light-theme .metric-value {
    color: #fff;
}

body.light-theme .metric-label {
    color: rgba(255, 255, 255, 0.8);
}

.metric-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.proyecto-card-link {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.proyecto-card-link:hover {
    color: #38bdf8;
}

body.light-theme .proyecto-card-link {
    color: #fff;
}

body.light-theme .proyecto-card-link:hover {
    color: #93c5fd;
}

/* Proyectos con dos tiendas (Android + iOS): en móvil dos enlaces, en desktop uno */
.proyecto-card-links-dual {
    display: inline-flex;
    align-items: center;
}
.proyecto-card-links-dual .proyecto-card-links-mobile {
    display: none;
}
.proyecto-card-links-dual .proyecto-card-links-desktop {
    display: inline-flex;
}
@media (max-width: 768px) {
    .proyecto-card-links-dual .proyecto-card-links-mobile {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .proyecto-card-links-dual .proyecto-card-links-desktop {
        display: none;
    }
}
.proyecto-card-link-store {
    margin-right: 0.25rem;
}

/* Trust section */
.trust-section {
    margin-bottom: 4rem;
}

.trust-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f9fafb;
    text-align: center;
    margin: 0 0 2rem;
}

body.light-theme .trust-title {
    color: #0f172a;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.trust-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

.trust-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

body.light-theme .trust-card {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #0f172a 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-theme .trust-card:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.trust-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #38bdf8;
}

.trust-icon svg {
    width: 100%;
    height: 100%;
}

body.light-theme .trust-card .trust-icon {
    color: #fff;
}

body.light-theme .trust-card .trust-icon svg {
    stroke: #fff;
    fill: none;
}

.trust-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 0.5rem;
}

body.light-theme .trust-card h3 {
    color: #fff;
}

.trust-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

body.light-theme .trust-card p {
    color: rgba(255, 255, 255, 0.9);
}

/* CTA banner */
.cta-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

body.light-theme .cta-banner {
    background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 100%);
    border-color: #bae6fd;
}

.cta-banner-inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.cta-banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 0 0 0.75rem;
}

body.light-theme .cta-banner-title {
    color: #0f172a;
}

.cta-banner-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

body.light-theme .cta-banner-desc {
    color: #475569;
}

.btn-cta-banner {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border-radius: 0.5rem;
    background: #38bdf8;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-cta-banner:hover {
    background: #0ea5e9;
    color: #fff;
    transform: translateY(-2px);
}

body.light-theme .btn-cta-banner {
    background: #1e40af;
    color: #fff;
}

body.light-theme .btn-cta-banner:hover {
    background: #1e3a8a;
}

/* Footer proyectos */
.footer-proyectos {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .proyectos-main {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 4.5rem;
    }

    .hero-proyectos-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-start-project {
        align-self: flex-start;
    }

    .proyectos-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner {
        padding: 1.75rem 1.25rem;
    }

    .cta-banner-title {
        font-size: 1.25rem;
    }

    .page-proyectos .navbar-right {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-proyectos .navbar .navbar-link {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .hero-proyectos-filters {
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .proyecto-card {
        padding: 1rem;
    }

    .proyecto-card-title {
        font-size: 1.1rem;
    }

    .metric-value {
        font-size: 1.25rem;
    }
}