/* =========================================
           VARIABLES DE COLOR
           ========================================= */
        :root {
            --bg-base: #050914;
            --bg-gradient: #0a192f;
            --neon-cyan: #00e5ff;
            --neon-blue: #0077ff;
            --glass-bg: rgba(15, 20, 35, 0.6);
            --border-dark: #1d2a45;
            --text-main: #ffffff;
            --text-muted: #888888;
        }

        html[data-theme="light"] {
            --bg-base: #edf3f8;
            --bg-gradient: #f8fbff;
            --glass-bg: #ffffff;
            --border-dark: #d7e1eb;
            --text-main: #142033;
            --text-muted: #617086;
        }

        @property --rotate {
            syntax: "<angle>";
            initial-value: 132deg;
            inherits: false;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background:
                radial-gradient(circle at top right, rgba(0, 229, 255, 0.13), transparent 34%),
                linear-gradient(145deg, var(--bg-gradient), var(--bg-base) 56%);
            color: var(--text-main);
            min-height: 100vh;
        }

        html[data-theme="light"] body {
            background: linear-gradient(145deg, #f8fbff, #edf3f8 56%);
        }

        /* =========================================
           HEADER (Cinta Superior)
           ========================================= */
        .top-header {
            background: rgba(3, 6, 13, 0.86);
            backdrop-filter: blur(14px);
            padding: 15px 2px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-dark);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
        }

        html[data-theme="light"] .top-header {
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 10px 24px rgba(25, 53, 86, 0.1);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .theme-toggle {
            display: inline-grid;
            width: 40px;
            height: 40px;
            padding: 0;
            place-items: center;
            border: 1px solid rgba(0, 229, 255, 0.35);
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            color: var(--neon-cyan);
            cursor: pointer;
            font-size: 16px;
        }

        .mobile-nav {
            display: block;
            position: relative;
        }

        .mobile-nav-toggle {
            display: grid;
            width: 40px;
            height: 40px;
            padding: 0;
            place-items: center;
            border: 1px solid rgba(0, 229, 255, 0.35);
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            color: var(--text-main);
            cursor: pointer;
            font-size: 16px;
        }

        .mobile-nav-menu {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            z-index: 80;
            display: none;
            width: 184px;
            padding: 6px;
            border: 1px solid rgba(0, 229, 255, 0.24);
            border-radius: 10px;
            background: rgba(7, 15, 29, 0.96);
            box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
        }

        .mobile-nav.open .mobile-nav-menu {
            display: block;
        }

        .mobile-nav-menu a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 12px;
            border-radius: 7px;
            color: var(--text-main);
            font-size: 14px;
            text-decoration: none;
        }

        .mobile-nav-menu a:hover {
            background: rgba(0, 229, 255, 0.1);
        }

        .mobile-nav-menu i {
            width: 16px;
            color: var(--neon-cyan);
            text-align: center;
        }
        html[data-theme="light"] .theme-toggle {
            border-color: rgba(0, 119, 255, 0.28);
            background: #fff;
            color: #1677ff;
        }

        html[data-theme="light"] .mobile-nav-toggle {
            border-color: rgba(22, 119, 255, 0.28);
            background: #fff;
            color: #1d4f91;
        }

        html[data-theme="light"] .mobile-nav-menu {
            border-color: #d7e4f1;
            background: #fff;
            box-shadow: 0 16px 30px rgba(25, 79, 145, 0.16);
        }

        html[data-theme="light"] .mobile-nav-menu a:hover {
            background: #eff7ff;
        }

        .logo-area {
            display: inline-flex;
            align-items: center;
            font-size: 24px;
            font-weight: 900;
            color: var(--text-main);
            letter-spacing: 0.5px;
            padding-left: 6px;
        }
        .logo-area img {
            display: block;
            width: auto;
            max-width: 150px;
            max-height: 42px;
            object-fit: contain;
        }
        .logo-area .logo-light {
            display: none;
        }
        html[data-theme="light"] .logo-area .logo-dark.has-light-logo {
            display: none;
        }
        html[data-theme="light"] .logo-area .logo-light {
            display: block;
        }
        .logo-area span {
            font-weight: 600;
            font-size: 14px;
            color: var(--neon-cyan);
            letter-spacing: 2px;
            display: block;
            margin-top: -5px;
        }

        .btn-publicar {
            background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
            color: white;
            border: 1px solid rgba(0, 229, 255, 0.45);
            padding: 11px 18px;
            border-radius: 10px;
            font-weight: bold;
            font-size: 14px;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(0, 119, 255, 0.28);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .btn-publicar:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 30px rgba(0, 229, 255, 0.32);
        }

        /* =========================================
           SUB-NAV (PestaÃ±a Kinesiologas)
           ========================================= */
        .sub-nav {
            background: rgba(10, 25, 47, 0.72);
            backdrop-filter: blur(12px);
            padding: 10px 2px;
            border-bottom: 1px solid var(--border-dark);
        }
        .sub-nav-btn {
            background-color: transparent;
            color: var(--text-main);
            border: 1px solid rgba(0, 229, 255, 0.24);
            padding: 9px 16px;
            border-radius: 999px;
            font-size: 14px;
            cursor: pointer;
            background: rgba(255,255,255,0.05);
        }

        /* =========================================
           CONTENEDOR PRINCIPAL
           ========================================= */
        .main-container {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 2px 16px;
        }

        /* =========================================
           ZONA DE BÃšSQUEDA Y TEXTOS (Igual a la foto)
           ========================================= */
        .search-section {
            margin-bottom: 2px;
            padding: 18px 0 20px;
        }

        .mobile-search-toggle {
            display: none;
            width: 42px;
            height: 42px;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(0, 229, 255, 0.32);
            border-radius: 50%;
            padding: 0;
            background: rgba(15, 20, 35, 0.78);
            color: #fff;
            font-size: 15px;
            font-weight: 800;
            box-shadow: 0 8px 24px rgba(0, 119, 255, 0.16);
            cursor: pointer;
        }

        .quick-links {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }
        .quick-links a {
            background: rgba(0, 229, 255, 0.1);
            color: var(--neon-cyan);
            border: 1px solid rgba(0, 229, 255, 0.22);
            padding: 7px 14px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
        }

        .card-profile-link {
            position: absolute;
            inset: 0;
            z-index: 25;
        }

        .search-bar-row {
            display: flex;
            gap: 10px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }
        .search-input-group {
            flex: 1;
            min-width: 200px;
        }
        .search-input-group input {
            width: 100%;
            padding: 13px 15px;
            border-radius: 12px;
            border: 1px solid rgba(0, 229, 255, 0.18);
            background: rgba(15, 20, 35, 0.72);
            color: var(--text-main);
            font-size: 15px;
            outline: none;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }
        .search-input-group input::placeholder {
            color: var(--text-muted);
        }
        .search-input-group input:focus {
            border-color: var(--neon-cyan);
            background: rgba(15, 20, 35, 0.92);
            box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
        }

        .search-place-group { position: relative; }
        .place-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80; overflow: hidden; border: 1px solid rgba(0, 229, 255, .3); border-radius: 10px; background: #0d1729; box-shadow: 0 18px 38px rgba(0, 0, 0, .42); }
        .place-suggestion { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 9px 12px; border: 0; border-bottom: 1px solid rgba(148, 163, 184, .14); background: transparent; color: var(--text-main); text-align: left; cursor: pointer; }
        .place-suggestion:last-child { border-bottom: 0; }
        .place-suggestion:hover, .place-suggestion:focus { background: rgba(0, 229, 255, .1); outline: none; }
        .place-suggestion-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(0, 229, 255, .34); border-radius: 50%; color: var(--neon-cyan); background: rgba(0, 229, 255, .08); }
        .place-suggestion-copy { display: grid; min-width: 0; gap: 2px; }
        .place-suggestion-copy strong { font-size: 13px; font-weight: 600; }
        .place-suggestion-copy small { color: var(--text-muted); font-size: 11px; }
        
        .btn-buscar {
            background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
            color: white;
            border: 1px solid rgba(0, 229, 255, 0.34);
            padding: 0 30px;
            border-radius: 12px;
            font-weight: bold;
            font-size: 15px;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(0, 119, 255, 0.24);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .btn-buscar:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 30px rgba(0, 229, 255, 0.28);
        }
        .btn-filtros {
            background: rgba(15, 20, 35, 0.76);
            color: white;
            border: 1px solid rgba(0, 229, 255, 0.2);
            padding: 0 20px;
            border-radius: 12px;
            font-weight: bold;
            font-size: 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: border-color 0.2s ease, background 0.2s ease;
        }
        .btn-filtros:hover {
            border-color: var(--neon-cyan);
            background: rgba(15, 20, 35, 0.95);
        }

        .page-titles h1 {
            font-size: 22px;
            margin-bottom: 5px;
        }
        .page-titles p {
            color: var(--text-muted);
            font-size: 14px;
            margin-bottom: 10px;
        }
        .breadcrumb {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* =========================================
           GRILLAS Y TARJETAS (Fotos 100% Verticales)
           ========================================= */
        
        /* Grilla Premium */
        .premium-ads-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, 272px);
            max-width: none;
            gap: 12px 19px;
            margin-bottom: 2px;
            justify-content: start;
        }

        /* Grilla Casual (Mejorada para PC) */
        .casual-ads-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, 220px);
            max-width: none;
            gap: 12px 19px;
            margin-top: 32px;
            justify-content: start;
        }

        .ad-card {
            background-color: var(--glass-bg);
            border: 1px solid var(--plan-card-color, var(--border-dark));
            border-radius: 12px;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            transition: transform 0.2s ease, border-color 0.2s;
        }
        html[data-theme="light"] .ad-card {
            box-shadow: 0 4px 15px rgba(29, 52, 79, 0.14);
        }
        .ad-card:hover {
            transform: translateY(-4px);
            border-color: var(--plan-accent-color, var(--neon-cyan));
        }

        .ad-card.featured-plan-card {
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plan-accent-color, var(--neon-cyan)) 24%, transparent), 0 8px 22px rgba(0, 0, 0, 0.52);
        }

        .ad-card.premium-card {
            border-color: transparent;
            isolation: isolate;
            overflow: hidden;
        }

        .ad-card.premium-card::before {
            content: "";
            position: absolute;
            inset: 0;
            padding: 2px;
            border-radius: 12px;
            background-image: linear-gradient(var(--rotate), #5ddcff, var(--plan-accent-color, #3c67e3) 43%, #4e00c2);
            -webkit-mask:
                linear-gradient(#fff 0 0) content-box,
                linear-gradient(#fff 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            z-index: 3;
            pointer-events: none;
            animation: spin 2.5s linear infinite;
        }

        .ad-card.premium-card::after {
            display: none;
        }

        .ad-card.premium-card:hover::before,
        .ad-card.premium-card:hover::after {
            animation: none;
            opacity: 0;
        }

        .signature-available-dot {
            position: absolute;
            left: 4px;
            top: 4px;
            z-index: 22;
            width: 84px;
            height: 84px;
            display: block;
            pointer-events: none;
        }

        .signature-available-dot svg {
            display: block;
            width: 100% !important;
            height: 100% !important;
        }

        .casual-ads-grid .signature-available-dot {
            left: 1px;
            top: 1px;
            width: 76px;
            height: 76px;
        }

        @keyframes bell-ring {
            0%, 45%, 100% {
                transform: rotate(0deg);
            }
            5%, 15%, 25% {
                transform: rotate(13deg);
            }
            10%, 20%, 30% {
                transform: rotate(-13deg);
            }
            35% {
                transform: rotate(6deg);
            }
            40% {
                transform: rotate(-4deg);
            }
        }

        @keyframes phone-ring {
            0%, 45%, 100% {
                transform: rotate(0deg);
            }
            5%, 15%, 25% {
                transform: rotate(14deg);
            }
            10%, 20%, 30% {
                transform: rotate(-14deg);
            }
            35% {
                transform: rotate(6deg);
            }
            40% {
                transform: rotate(-4deg);
            }
        }

        @keyframes spin {
            0% {
                --rotate: 0deg;
            }
            100% {
                --rotate: 360deg;
            }
        }

        .ad-card.ribbon-demo-card {
            overflow: visible;
            color: white;
        }

        .ad-card.ribbon-demo-card .image-container {
            overflow: hidden;
            border-radius: 12px 12px 0 0;
        }

        .ad-card.ribbon-demo-card .card-content,
        .ad-card.ribbon-demo-card .card-content-overlay {
            overflow: hidden;
        }

        /* Diamantes */
        .card-ribbon {
            position: absolute;
            top: 0;
            right: 15px;
            background: linear-gradient(135deg, var(--neon-blue), #00d4ff);
            color: white;
            padding: 10px 10px 15px;
            border-radius: 0 0 4px 4px;
            z-index: 10;
            clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
        }
        .intense-ribbon {
            background: rgba(15, 20, 35, 0.8);
            border: 1px solid var(--neon-blue);
            border-top: none;
        }

        .signature-ribbon {
            top: -8px;
            right: -8px;
            width: 120px;
            height: 120px;
            overflow: hidden;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            clip-path: none;
        }

        .signature-ribbon::before,
        .signature-ribbon::after {
            position: absolute;
            z-index: -1;
            content: "";
            display: block;
            border: 5px solid #8f6d12;
        }

        .signature-ribbon::before {
            top: 0;
            left: 0;
            border-top-color: transparent;
            border-right-color: transparent;
        }

        .signature-ribbon::after {
            right: 0;
            bottom: 0;
            border-top-color: transparent;
            border-right-color: transparent;
        }

        .signature-ribbon span {
            position: absolute;
            left: -34px;
            top: 18px;
            display: block;
            width: 225px;
            padding: 13px 0;
            transform: rotate(45deg);
            background: linear-gradient(90deg, #c52025, #ff3f45);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
            color: #fff;
            font-size: 13px;
            font-weight: 900;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
            text-transform: uppercase;
            text-align: center;
            letter-spacing: 0.7px;
        }

        .ribbon1 {
            position: absolute;
            top: -6.1px;
            right: 10px;
            z-index: 30;
            color: white;
            display: block;
            width: 106px;
        }
        .ribbon1:after {
            display: none;
        }
        .ribbon1 span {
            position: relative;
            display: block;
            text-align: center;
            background: #F8463F;
            font-size: 14px;
            line-height: 1;
            padding: 12px 8px 10px;
            border-top-right-radius: 8px;
            width: 90px;
        }
        .ribbon1 span:before, .ribbon1 span:after {
            position: absolute;
            content: "";
        }
        .ribbon1 span:before {
            height: 0;
            width: 0;
            right: -1px;
            top: 0;
            border-bottom: 6px solid #C02031;
            border-right: 6px solid transparent;
        }
        .ribbon1 span:after {
            width: 100%;
            height: 10px;
            left: 0;
            top: 100%;
            background: #F8463F;
            clip-path: polygon(0 0, 100% 0, 50% 100%);
        }

        .ribbon4 {
            position: absolute;
            top: 54px;
            padding: 8px 10px;
            background: #00B3ED;
            box-shadow: -1px 2px 3px rgba(0,0,0,.3);
            z-index: 30;
            color: white;
        }
        .ribbon4:before, .ribbon4:after {
            content: "";
            position: absolute;
        }
        .ribbon4:before {
            width: 7px;
            height: 100%;
            top: 0;
            left: -6.5px;
            padding: 0 0 7px;
            background: inherit;
            border-radius: 5px 0 0 5px;
        }
        .ribbon4:after {
            width: 5px;
            height: 5px;
            bottom: -5px;
            left: -4.5px;
            background: lightblue;
            border-radius: 5px 0 0 5px;
        }

        .wrap {
            width: 100%;
            height: 188px;
            position: absolute;
            top: -8px;
            left: 8px;
            overflow: hidden;
            z-index: 30;
            pointer-events: none;
        }
        .wrap:before, .wrap:after {
            content: "";
            position: absolute;
        }
        .wrap:before {
            width: 40px;
            height: 8px;
            right: 100px;
            background: #4D6530;
            border-radius: 8px 8px 0px 0px;
        }
        .wrap:after {
            width: 8px;
            height: 40px;
            right: 0px;
            top: 100px;
            background: #4D6530;
            border-radius: 0px 8px 8px 0px;
        }
        .ribbon6 {
            width: 200px;
            height: 40px;
            line-height: 40px;
            position: absolute;
            top: 30px;
            right: -50px;
            z-index: 2;
            overflow: hidden;
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
            border: 1px dashed;
            box-shadow:0 0 0 3px #57DD43,  0px 21px 5px -18px rgba(0,0,0,0.6);
            background: #57DD43;
            text-align: center;
            color: white;
        }

        /* Ribbon igual al usado en los paquetes del panel. */
        .panel-ribbon {
            position: absolute;
            top: -8px;
            right: -8px;
            z-index: 30;
            width: 92px;
            height: 92px;
            overflow: hidden;
            pointer-events: none;
        }
        .panel-ribbon::before,
        .panel-ribbon::after {
            position: absolute;
            z-index: -1;
            display: block;
            border: 4px solid color-mix(in srgb, var(--ribbon-color) 72%, #000);
            border-top-color: transparent;
            border-right-color: transparent;
            content: "";
        }
        .panel-ribbon::before {
            top: 0;
            left: 0;
        }
        .panel-ribbon::after {
            right: 0;
            bottom: 0;
        }
        .panel-ribbon span {
            position: absolute;
            top: 18px;
            left: -19px;
            display: block;
            width: 140px;
            padding: 8px 0;
            background-color: var(--ribbon-color);
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.16);
            color: #fff;
            font-size: 11px;
            font-weight: 800;
            line-height: 1;
            text-align: center;
            text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
            text-transform: uppercase;
            transform: rotate(45deg);
        }
        .panel-ribbon span::before {
            position: absolute;
            inset: 4px;
            border: 2px dashed rgba(255, 255, 255, 0.78);
            content: "";
        }
        .panel-ribbon-purple { --ribbon-color: #7c3aed; }
        .panel-ribbon-cyan { --ribbon-color: #00b3ed; }
        .panel-ribbon-fuchsia { --ribbon-color: #f10ee9; }

        /* Los tres ribbons conservan su forma original y toman el color del contrato. */
        .ribbon1.ribbon-purple span {
            background: #7c3aed;
        }
        .ribbon1.ribbon-purple span:before {
            border-bottom-color: #5b21b6;
        }
        .ribbon1.ribbon-purple span:after {
            background: #7c3aed;
        }
        .ribbon4.ribbon-cyan {
            background: #00b3ed;
        }
        .ribbon4.ribbon-cyan:after {
            background: #7dd3fc;
        }
        .wrap.ribbon-fuchsia:before,
        .wrap.ribbon-fuchsia:after {
            background: #b20cae;
        }
        .wrap.ribbon-fuchsia {
            height: 94px;
            top: -4px;
            left: 4px;
        }
        .wrap.ribbon-fuchsia:before {
            width: 24px;
            height: 5px;
            right: 47px;
        }
        .wrap.ribbon-fuchsia:after {
            width: 5px;
            height: 24px;
            top: 47px;
        }
        .wrap.ribbon-fuchsia .ribbon6 {
            width: 118px;
            height: 24px;
            top: 17px;
            right: -30px;
            line-height: 24px;
            border-color: rgba(255, 255, 255, 0.9);
            background: #f10ee9;
            box-shadow: 0 0 0 3px #f10ee9, 0 14px 4px -13px rgba(0, 0, 0, 0.6);
            text-shadow: none;
        }
        .wrap.ribbon-fuchsia .ribbon6::before,
        .wrap.ribbon-fuchsia .ribbon6::after {
            position: absolute;
            width: 13px;
            height: 8px;
            border-color: rgba(255, 255, 255, 0.86);
            border-style: solid;
            content: "";
            opacity: 0.9;
        }
        .wrap.ribbon-fuchsia .ribbon6::before {
            top: 3px;
            left: 5px;
            border-width: 1px 0 0 1px;
        }
        .wrap.ribbon-fuchsia .ribbon6::after {
            right: 5px;
            bottom: 3px;
            border-width: 0 1px 1px 0;
        }

        /* En la grilla normal el ribbon diagonal acompana la tarjeta compacta. */
        .casual-ads-grid .wrap.ribbon-fuchsia {
            height: 82px;
            top: -4px;
            left: 4px;
        }
        .casual-ads-grid .wrap.ribbon-fuchsia:before {
            width: 21px;
            height: 4px;
            right: 41px;
        }
        .casual-ads-grid .wrap.ribbon-fuchsia:after {
            width: 4px;
            height: 21px;
            right: 0;
            top: 41px;
        }
        .casual-ads-grid .wrap.ribbon-fuchsia .ribbon6 {
            width: 104px;
            height: 22px;
            top: 15px;
            right: -26px;
            line-height: 22px;
            box-shadow: 0 0 0 2px #f10ee9, 0 12px 3px -11px rgba(0, 0, 0, 0.6);
        }
        .casual-ads-grid .wrap.ribbon-fuchsia .ribbon6::before,
        .casual-ads-grid .wrap.ribbon-fuchsia .ribbon6::after {
            width: 11px;
            height: 7px;
        }
        .casual-ads-grid .wrap.ribbon-fuchsia .ribbon6::before {
            top: 2px;
            left: 4px;
        }
        .casual-ads-grid .wrap.ribbon-fuchsia .ribbon6::after {
            right: 4px;
            bottom: 2px;
        }

        .casual-ads-grid .image-container {
            aspect-ratio: 25 / 42;
        }

        .premium-ads-grid .image-container {
            aspect-ratio: 5 / 8;
        }

        /* --- CONTENEDORES DE IMAGEN (LA CLAVE DE LO VERTICAL) --- */
        .image-container {
            width: 100%;
            /* ESTO FUERZA LA PROPORCIÃ“N VERTICAL (3 de ancho x 4 de alto) */
            aspect-ratio: 3 / 4; 
            position: relative;
            display: flex;
        }
        .img-box {
            flex: 1;
            height: 100%;
            position: relative;
        }
        .img-box:nth-child(2) {
            border-left: 2px solid var(--bg-base);
        }
        
        /* La imagen en sÃ­, llenando el contenedor sin deformarse */
        .image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* Contenido de Tarjetas Grandes */
        .card-content {
            padding: 15px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        .ad-title {
            font-size: 16px;
            color: white;
            margin-bottom: 10px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 7px;
            flex-wrap: wrap;
        }
        .verified-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 7px;
            border-radius: 999px;
            background: #1677ff;
            border: 1px solid rgba(185, 218, 255, 0.85);
            color: #fff;
            font-size: 10px;
            font-weight: 800;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.2px;
        }

        .verified-badge i {
            width: 13px;
            height: 13px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            background: #fff;
            color: #1677ff;
            font-size: 8px;
        }
        .tags-container {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 15px;
        }

        .card-contact-icons {
            display: flex;
            align-items: center;
            gap: 7px;
            margin: 2px 0 10px;
        }

        .card-contact-icon {
            display: inline-grid;
            width: 26px;
            height: 26px;
            place-items: center;
            border: 1px solid rgba(255, 255, 255, 0.22);
            border-radius: 50%;
            color: #fff;
            font-size: 15px;
            line-height: 1;
        }

        .card-contact-icon.whatsapp {
            background: #25d366;
        }

        .card-contact-icon.telegram {
            background: #229ed9;
        }
        .tag {
            color: #ddd;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 11px;
            background: rgba(255,255,255,0.1);
        }
        .ad-subtitle {
            margin: -5px 0 12px;
            color: rgba(255, 255, 255, 0.88);
            font-size: 13px;
            line-height: 1.35;
            font-weight: 400;
        }
        .ad-footer {
            margin-top: auto;
            font-size: 12px;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid var(--border-dark);
            padding-top: 10px;
        }

        /* --- TARJETAS CASUALES (Texto Flotante encima de la imagen 100%) --- */
        .ad-card.casual {
            /* Ya no necesita alto fijo, depende del aspect-ratio de la imagen */
            border: 1px solid var(--plan-card-color, var(--border-dark));
        }

        .ad-card.intense,
        .ad-card.passion {
            box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--plan-accent-color, var(--neon-cyan)) 20%, transparent), 0 4px 15px rgba(0, 0, 0, 0.5);
        }

        .mobile-normal-demo {
            display: none;
        }
        
        .ad-card.casual .image-container {
            aspect-ratio: 3 / 4; /* Vertical estricto */
        }

        .card-content-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            z-index: 2;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.86) 64%, rgba(0, 0, 0, 0.56) 100%);
            padding: 20px 12px 10px 12px; /* MÃ¡s padding para que se lea bien */
            display: flex;
            flex-direction: column;
        }

        .premium-ads-grid .card-content {
            position: absolute;
            bottom: 0;
            left: 0;
            z-index: 2;
            width: 100%;
            padding: 24px 12px 12px;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.86) 64%, rgba(0, 0, 0, 0.56) 100%);
        }

        .premium-ads-grid .card-content .ad-footer {
            border-top: 0;
            padding-top: 5px;
            color: #ccc;
        }
        .card-content-overlay .ad-title {
            font-size: 15px;
            margin-bottom: 5px;
        }

        .casual-ads-grid .card-content-overlay .ad-title {
            margin-bottom: 4px;
            font-size: 13px;
        }
        .card-content-overlay .ad-subtitle {
            margin: -1px 0 6px;
            font-size: 11px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .card-content-overlay .ad-footer {
            border-top: none;
            padding-top: 5px;
            font-size: 11px;
            color: #ccc;
        }

        .popular-searches {
            margin-top: 24px;
            padding: 18px;
            border: 1px solid rgba(0, 229, 255, 0.16);
            border-radius: 16px;
            background: rgba(15, 20, 35, 0.58);
        }
        html[data-theme="light"] .popular-searches {
            background: rgba(255, 255, 255, 0.82);
            border-color: rgba(0, 119, 255, 0.16);
        }

        .popular-searches h2 {
            margin-bottom: 12px;
            font-size: 18px;
            color: var(--text-main);
        }

        .popular-search-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 16px;
        }

        .popular-search-group:last-child {
            margin-bottom: 0;
        }

        .popular-search-group a {
            border: 1px solid rgba(0, 229, 255, 0.18);
            border-radius: 999px;
            padding: 8px 12px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 13px;
            background: rgba(255, 255, 255, 0.035);
        }

        .popular-search-group a:hover {
            color: var(--neon-cyan);
            border-color: rgba(0, 229, 255, 0.42);
        }

        /* =========================================
           RESPONSIVO (MÃ“VILES)
           ========================================= */
        @media (max-width: 767px) {
            .main-container {
                padding: 2px 8px;
            }

            .logo-area img {
                max-width: 110px;
                max-height: 36px;
            }

            .mobile-search-toggle {
                display: flex;
            }

            .btn-publicar {
                display: grid;
                width: 40px;
                height: 40px;
                padding: 0;
                place-items: center;
                border-radius: 50%;
                font-size: 0;
            }

            .btn-publicar::before {
                content: "+";
                font-size: 25px;
                font-weight: 500;
                line-height: 1;
            }

            .search-bar-row {
                display: none;
                padding: 12px;
                margin-bottom: 18px;
                border: 1px solid rgba(0, 229, 255, 0.16);
                border-radius: 16px;
                background: rgba(15, 20, 35, 0.48);
            }

            .search-section.search-open .search-bar-row {
                display: flex;
            }

            .search-input-group {
                flex: 1 1 100%;
                min-width: 100%;
            }

            .btn-buscar, .btn-filtros {
                padding: 15px;
                justify-content: center;
            }

            .btn-buscar {
                flex: 1 1 auto;
            }

            .btn-filtros {
                flex: 0 0 52px;
                width: 52px;
                padding: 0;
                aspect-ratio: 1;
                border-radius: 14px;
            }

            .btn-filtros span {
                display: none;
            }
            .quick-links {
                justify-content: center;
                gap: 5px;
                flex-wrap: nowrap;
            }
            .quick-links a {
                padding: 6px 8px;
                font-size: 11px;
                white-space: nowrap;
            }
            .page-titles h1, .page-titles p {
                text-align: center;
            }
            .casual-ads-grid {
                /* En celular entran de a 2 */
                grid-template-columns: repeat(2, 1fr);
                max-width: none;
                gap: 24px 12px;
                margin-top: 28px;
            }
            .premium-ads-grid {
                grid-template-columns: minmax(0, 400px);
                max-width: none;
                gap: 24px 12px;
                justify-content: center;
            }

            .premium-ads-grid .image-container {
                aspect-ratio: 5 / 8;
            }

            .premium-ads-grid .card-content {
                padding: 10px 12px;
            }

            .premium-ads-grid .ad-title {
                font-size: 15px;
                margin-bottom: 7px;
            }

            .premium-ads-grid .tags-container {
                margin-bottom: 8px;
            }

            .mobile-normal-demo {
                display: flex;
            }

            .casual-ads-grid .ad-card {
                grid-column: span 1;
            }

            .casual-ads-grid .card-content-overlay .ad-subtitle {
                display: block;
                overflow: visible;
                font-size: 12px;
                line-height: 1.3;
            }
        }

        @media (min-width: 768px) and (max-width: 1100px) {
            .casual-ads-grid {
                grid-template-columns: repeat(auto-fill, 220px);
            }
        }

        html[data-theme="light"] .mobile-search-toggle,
        html[data-theme="light"] .btn-filtros {
            border-color: rgba(22, 119, 255, 0.22);
            background: #fff;
            color: #1d4f91;
            box-shadow: 0 8px 20px rgba(25, 79, 145, 0.1);
        }

        html[data-theme="light"] .quick-links a {
            border-color: rgba(22, 119, 255, 0.2);
            background: #eaf5ff;
            color: #1666b2;
        }

        html[data-theme="light"] .search-input-group input {
            border-color: #cbd9e7;
            background: #fff;
            color: #142033;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(25, 79, 145, 0.06);
        }

        html[data-theme="light"] .search-input-group input::placeholder {
            color: #718197;
        }

        html[data-theme="light"] .search-input-group input:focus {
            border-color: #1677ff;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
        }

        html[data-theme="light"] .btn-filtros:hover {
            border-color: #1677ff;
            background: #f3f8ff;
        }

        html[data-theme="light"] .popular-search-group a {
            border-color: #d5e4f2;
            background: #f8fbff;
            color: #50637a;
        }

        html[data-theme="light"] .popular-search-group a:hover {
            color: #1666b2;
            border-color: #8fc5f7;
        }

        @media (max-width: 767px) {
            html[data-theme="light"] .search-bar-row {
                border-color: rgba(22, 119, 255, 0.16);
                background: rgba(255, 255, 255, 0.9);
                box-shadow: 0 10px 24px rgba(25, 79, 145, 0.08);
            }
        }
