/* =========================================
           VARIABLES Y RESET GLOBAL
           ========================================= */
        :root {
            --bg-header: #0f172a;
            --card-bg-white: #111b2f;
            --card-bg-dark: #111b2f;
            --accent-lime: #90ea2a;
            --text-dark: #f8fafc;
            --text-muted: #94a3b8;
            --text-white: #ffffff;
            --text-dim: #94a3b8;
            --border-light: rgba(255, 255, 255, 0.1);
            --border-dark: rgba(255, 255, 255, 0.1);
            --radius-lg: 20px;
            --radius-md: 14px;
        }

        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Manrope', -apple-system, sans-serif;
            background:
                radial-gradient(circle at 84% 8%, rgba(144, 234, 42, 0.09), transparent 24rem),
                linear-gradient(155deg, #080e1a 0%, #0f172a 100%);
            color: var(--text-dark);
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
        }

        body.modal-open { overflow: hidden; }

        /* =========================================
           BLOG CONTAINER & MASONRY GRID
           ========================================= */
        .blog-container {
            max-width: 1400px;
            margin: 60px auto;
            padding: 0 30px;
        }

        .section-title {
            color: var(--text-dark);
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 40px;
            letter-spacing: -0.5px;
        }

        .masonry-grid {
            column-count: 4;
            column-gap: 24px;
        }

        /* =========================================
           TARJETAS BLANCAS
           ========================================= */
        .card-white {
            background: var(--card-bg-white);
            border-radius: var(--radius-lg);
            padding: 14px;
            margin-bottom: 24px;
            break-inside: avoid;
            border: 1px solid var(--border-light);
            box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
            display: flex;
            flex-direction: column;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
        }

        .card-white:hover {
            transform: translateY(-4px);
            border-color: rgba(144, 234, 42, 0.28);
            box-shadow: 0 18px 42px rgba(0,0,0,0.42);
        }

        .card-white img {
            width: 100%;
            border-radius: var(--radius-md);
            margin-bottom: 16px;
            object-fit: cover;
        }

        /* Estilos para etiquetas dentro de las tarjetas blancas */
        .card-tag {
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 12px;
            margin-top: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .card-tag span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-lime);
        }

        .card-white h3 {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 8px;
            line-height: 1.3;
        }

        .card-white p {
            font-size: 14.5px;
            color: var(--text-muted);
            line-height: 1.5;
            margin-bottom: 18px;
        }

        .card-actions {
            display: flex;
            gap: 8px;
            margin-top: auto;
            flex-wrap: wrap;
        }

        .action-pill {
            border: 1px solid var(--border-light);
            border-radius: 20px;
            padding: 6px 10px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            display: flex;
            align-items: center;
            gap: 4px;
            background: transparent;
            transition: background 0.2s ease;
        }
        
        .action-pill:hover {
            background: rgba(144, 234, 42, 0.08);
        }

        /* =========================================
           TARJETA QUOTE CONSERVADA (Dark Theme)
           ========================================= */
        .card-legacy {
            background: #17233a;
            border: 1px solid var(--border-dark);
            border-radius: var(--radius-lg);
            padding: 24px;
            margin-bottom: 24px;
            break-inside: avoid;
            box-shadow: 0 10px 25px rgba(0,0,0,0.15);
            cursor: pointer;
            transition: transform 0.2s ease;
            color: var(--text-white);
        }

        .card-legacy:hover {
            transform: translateY(-4px);
            border-color: rgba(144, 234, 42, 0.35);
        }

        .card-legacy h3 {
            font-size: 20px;
            font-weight: 600;
            line-height: 1.5;
            margin-bottom: 16px;
            font-style: italic;
        }

        .card-legacy .source {
            font-size: 12px;
            color: var(--accent-lime);
            font-weight: 600;
        }

        /* =========================================
           MODAL PREMIUM (POPUP)
           ========================================= */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(3, 7, 18, 0.78);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 2000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
            padding: 20px;
        }

        .modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-content {
            background: var(--card-bg-white);
            width: 100%;
            max-width: 650px;
            border-radius: 24px;
            border: 1px solid var(--border-light);
            box-shadow: 0 25px 60px rgba(0,0,0,0.55);
            position: relative;
            transform: translateY(30px) scale(0.95);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            overflow: hidden;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
        }

        .modal-overlay.active .modal-content {
            transform: translateY(0) scale(1);
        }

        .modal-close {
            position: absolute;
            top: 20px; right: 20px;
            width: 36px; height: 36px;
            background: rgba(0,0,0,0.4);
            color: white;
            border: none; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; z-index: 10;
            transition: background 0.2s;
            backdrop-filter: blur(4px);
        }

        .modal-close:hover {
            background: rgba(0,0,0,0.7);
        }

        .modal-body {
            padding: 0;
            overflow-y: auto;
        }

        .modal-header-img {
            width: 100%;
            height: 320px;
            object-fit: cover;
            display: block;
        }

        .modal-header-color {
            width: 100%;
            height: 120px;
            background: linear-gradient(135deg, #17233a, #080e1a);
            display: block;
        }

        .modal-text-content {
            padding: 40px;
        }

        .modal-title {
            font-size: 26px;
            font-weight: 800;
            color: var(--text-dark);
            margin-bottom: 16px;
            line-height: 1.25;
        }

        .modal-desc {
            font-size: 16px;
            color: var(--text-muted);
            line-height: 1.6;
        }

        .modal-dummy-content {
            margin-top: 30px;
            padding-top: 30px;
            border-top: 1px solid var(--border-light);
            font-size: 15px;
            color: var(--text-dark);
            line-height: 1.7;
        }

        /* Scrollbar interno del modal */
        .modal-body::-webkit-scrollbar { width: 6px; }
        .modal-body::-webkit-scrollbar-track { background: transparent; }
        .modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

        @media (max-width: 1200px) { .masonry-grid { column-count: 3; } }
        @media (max-width: 900px) { .masonry-grid { column-count: 2; } }
        @media (max-width: 600px) {
            .blog-container { margin: 38px auto 24px; padding: 0; }
            .section-title { margin: 0 18px 22px; font-size: 26px; }
            .masonry-grid { column-count: 1; column-gap: 0; }
            .card-white, .card-legacy {
                margin-bottom: 12px;
                border-inline: 0;
                border-radius: 0;
                box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
            }
            .card-white { padding: 12px 14px 16px; }
            .card-white img { max-height: 520px; margin-bottom: 14px; border-radius: 14px; }
            .card-white h3 { font-size: 18px; }
            .card-white p { font-size: 14px; }
            .card-legacy { padding: 24px 18px; }
            .action-pill { padding: 6px 9px; font-size: 11px; }
            .modal-overlay { padding: 10px 0 0; align-items: flex-end; }
            .modal-content { max-height: 92vh; border-radius: 22px 22px 0 0; }
            .modal-header-img { height: 230px; }
            .modal-text-content { padding: 28px 22px; }
            .modal-title { font-size: 23px; }
        }
