/* ==========================================================
   ESTILO: LIGHT SAAS PREMIUM (CLEAN & MINIMALIST WITH PDF)
   ========================================================== */

:root {
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-light-blue: #eff6ff;
    --border-color: #e2e8f0;
    --card-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.04);
    --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --radius-card: 24px;
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    position: relative;
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.07) 0%, rgba(248, 250, 252, 0) 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
    z-index: 0;
}

.app-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Header Superior */
.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.site-logo {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo:hover .site-logo {
    transform: scale(1.04);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.9rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pill:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
}

/* Hero Title & PDF Download */
.hero-title {
    margin-bottom: 2.5rem;
}

.category-badge {
    color: var(--accent-blue);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: var(--accent-light-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.hero-title h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.hero-title p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 680px;
    line-height: 1.6;
}

.hero-actions {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.btn-pdf-download:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}

/* Carousel Section */
.carousel-viewport {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-card);
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    width: 100%;
}

/* Project Card */
.project-card {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

@media (min-width: 850px) {
    .project-card {
        flex-direction: row;
        align-items: stretch;
    }
    .card-media {
        width: 55%;
    }
    .card-body {
        width: 45%;
    }
}

/* Media Area & Browser Frame */
.card-media {
    position: relative;
    background-color: #f1f5f9;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.8rem;
    min-width: 0;
}

.card-number {
    position: absolute;
    top: 1.6rem;
    right: 1.6rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.25rem 0.7rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    z-index: 10;
}

/* Browser Frame */
.browser-frame {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.browser-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.browser-dots {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.browser-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.browser-address-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-content {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #0f172a;
    overflow: hidden;
    cursor: zoom-in;
}

.browser-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

/* Segmented Control Limpio (Estilo iOS / SaaS) */
.segmented-control {
    display: flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 12px;
    gap: 3px;
    width: 100%;
}

.segmented-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.5rem 0.3rem;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.segmented-btn:hover {
    color: var(--accent-blue);
}

.segmented-btn.active {
    background: #ffffff;
    color: var(--accent-blue);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Body Area */
.card-body {
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.tags-container {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.tag {
    background: var(--accent-light-blue);
    color: var(--accent-blue);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
}

.card-body h2 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.card-body .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent-blue);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

/* Controls Footer */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.8rem;
    padding: 0 0.2rem;
    width: 100%;
}

.counter-badge {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}

.counter-badge .slash, .counter-badge .total {
    color: var(--text-muted);
    font-weight: 600;
}

.progress-track {
    flex: 1;
    height: 6px;
    background-color: var(--border-color);
    margin: 0 1.2rem;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 14.28%;
    background-color: var(--accent-blue);
    border-radius: 10px;
    transition: var(--transition);
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-btn:hover {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    transform: scale(1.05);
}

.nav-btn.disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: #ffffff !important;
    color: var(--text-muted) !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
}

/* MODAL / LIGHTBOX */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

.modal-body {
    max-width: 100%;
    max-height: 75vh;
    overflow: auto;
    touch-action: pan-x pan-y pinch-zoom;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    background-color: #0f172a;
    cursor: zoom-in;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: pan-x pan-y pinch-zoom;
}

.modal-body img.zoomed {
    transform: scale(1.8);
    cursor: zoom-out;
}

.modal-caption {
    color: #f8fafc;
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.8rem;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.modal-close:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* MOVILES (AJUSTES PUNTUALES) */
@media (max-width: 600px) {
    body {
        padding: 0.8rem 0.5rem;
    }

    .brand-header {
        margin-bottom: 1.2rem;
    }

    .site-logo {
        height: 38px;
    }

    .status-pill {
        font-size: 0.7rem;
        padding: 0.3rem 0.65rem;
    }

    .hero-title {
        margin-bottom: 1.2rem;
    }

    .hero-title h1 {
        font-size: 1.75rem;
        letter-spacing: -0.6px;
    }

    .hero-title p {
        font-size: 0.88rem;
    }

    .btn-pdf-download {
        width: 100%;
        justify-content: center;
        font-size: 0.82rem;
        padding: 0.6rem 0.8rem;
    }

    .card-media {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .card-number {
        top: 0.8rem;
        right: 0.8rem;
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    .browser-frame {
        border-radius: 10px;
    }

    .browser-header {
        padding: 0.35rem 0.5rem;
    }

    .segmented-btn {
        font-size: 0.72rem;
        padding: 0.4rem 0.2rem;
    }

    .card-body {
        padding: 1.1rem 0.8rem;
    }

    .card-body h2 {
        font-size: 1.4rem;
    }

    .card-body .description {
        font-size: 0.88rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .progress-track {
        margin: 0 0.6rem;
    }

    .nav-btn {
        width: 42px;
        height: 42px;
    }
}
.segmented-control {
    display: flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 12px;
    gap: 3px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.segmented-control::-webkit-scrollbar {
    display: none;
}

.segmented-btn {
    flex: 1;
    min-width: max-content;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.5rem 0.6rem;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}