/*
Theme Name: Cartaya Theme
Description: WebApp UI, Dark Premium & OLED Black (100% RESPONSIVE)
Author: Cartaya.cl
Version: 9.0 (Solución Definitiva)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
    --oled-black: #050505;
    --deep-charcoal: #121212;
    --naranja-cartaya: #FF8A00;
    --text-white: #EDEDED;
    --text-muted: #888888;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--oled-black);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 0; overflow-x: hidden;
}

/* =========================================
   PORTADA: HEADER Y TARJETAS
   ========================================= */
.rg-header { text-align: center; padding: 80px 20px 40px; width: 100%; }
.rg-logo { font-family: 'Playfair Display', serif; font-size: 48px; font-weight: 700; color: #FFF; margin: 0; letter-spacing: 2px; }
.rg-logo-sub { font-size: 14px; letter-spacing: 4px; color: var(--naranja-cartaya); margin: 5px 0 40px 0; font-weight: 600; }

.glass-search { width: 100%; max-width: 600px; margin: 0 auto; position: relative; }
.glass-search input { width: 100%; background: var(--glass-bg); backdrop-filter: blur(16px); border: 1px solid var(--naranja-cartaya); border-radius: 30px; padding: 16px 25px; color: white; font-family: 'Inter', sans-serif; font-size: 16px; outline: none; box-shadow: 0 4px 30px rgba(0,0,0,0.5); }

.rg-directory { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 30px; }
.rg-card { position: relative; height: 280px; border-radius: 16px; overflow: hidden; background: var(--deep-charcoal); border: 1px solid var(--glass-border); }
.rg-card-link { display: block; width: 100%; height: 100%; text-decoration: none; position: relative; }
.rg-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.rg-card-link:hover .rg-card-img { transform: scale(1.05); }

.rg-card-gradient { position: absolute; bottom: 0; left: 0; right: 0; height: 75%; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 50%, transparent 100%); display: flex; justify-content: space-between; align-items: flex-end; padding: 20px; z-index: 2; pointer-events: none;}
.rg-card-title { font-family: 'Playfair Display', serif; font-size: 22px; color: #FFF; margin: 0 0 5px 0; }
.rg-card-type { font-size: 11px; color: var(--text-muted); margin: 0 0 5px 0; text-transform: uppercase; }
.rg-card-loc { font-size: 12px; color: var(--naranja-cartaya); margin: 0; }
.rg-card-score { text-align: right; }
.score-num { font-size: 18px; font-weight: 600; color: var(--naranja-cartaya); }
.score-rev { font-size: 10px; color: var(--text-muted); display: block; }

/* =========================================
   SINGLE PAGE: DISEÑO INMERSIVO WEBAPP
   ========================================= */

/* Esta clase aisla la página para que no haya scroll horizontal raro */
.is-webapp-view {
    overflow-x: hidden;
    background-color: var(--oled-black);
}

.vip-top-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
}
.vip-nav-logo { text-decoration: none; color: #FFF; font-family: 'Playfair Display', serif; font-size: 22px; font-weight: bold; }
.vip-nav-sub { color: var(--naranja-cartaya); font-size: 10px; font-family: 'Inter', sans-serif; letter-spacing: 2px; vertical-align: middle; margin-left: 5px;}
.vip-nav-search form { margin: 0; }
.vip-nav-search input[type="text"] {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,138,0,0.5);
    border-radius: 20px; padding: 10px 20px; color: white; outline: none;
    backdrop-filter: blur(10px); font-family: 'Inter', sans-serif; min-width: 250px;
}

.single-vip-wrapper { position: relative; min-height: 100vh; width: 100%; overflow-x: hidden; }
.single-vip-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-size: cover; background-position: center; z-index: -2; }
.single-vip-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.95) 100%); z-index: -1; }

.single-vip-content { position: relative; z-index: 10; width: 100%; max-width: 600px; margin: 0 auto; padding: 50vh 20px 60px 20px; }
.single-vip-glass { background: rgba(10, 10, 10, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 30px; padding: 40px 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); width: 100%; }

.vip-comuna { color: var(--naranja-cartaya); font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 5px 0; }
.vip-title { font-family: 'Playfair Display', serif; font-size: 40px; color: #FFF; margin: 0 0 20px 0; line-height: 1.1; word-break: break-word; }
.vip-review-text { font-size: 16px; color: #CCC; line-height: 1.6; margin-bottom: 25px; }
.vip-contact-info p { color: #AAA; font-size: 14px; margin: 5px 0; }

.vip-btn-orange { display: block; width: 100%; background-color: var(--naranja-cartaya); color: #000; text-align: center; padding: 18px 20px; border-radius: 15px; font-family: 'Inter', sans-serif; font-weight: 800; text-transform: uppercase; text-decoration: none; font-size: 16px; margin: 25px 0 0 0; transition: transform 0.2s; }
.vip-btn-orange:hover { transform: scale(1.02); }

.vip-b2b-trap { margin-top: 40px; padding: 25px; border: 1px dashed var(--naranja-cartaya); border-radius: 20px; text-align: center; background: rgba(255, 138, 0, 0.05); width: 100%; }
.trap-title { color: #FFF; font-weight: 600; margin: 0 0 5px 0; font-size: 15px;}
.trap-desc { color: #888; font-size: 13px; margin: 0 0 15px 0; line-height: 1.4;}
.trap-btn { display: inline-block; color: var(--naranja-cartaya); border: 1px solid var(--naranja-cartaya); padding: 12px 25px; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 600; margin-top: 5px;}

/* =========================================
   MEDIA QUERIES (MAGIA MOBILE / APP UI)
   ========================================= */
@media (max-width: 768px) {
    .vip-top-nav { flex-direction: column; gap: 10px; padding: 15px; background: rgba(5,5,5,0.9); }
    .vip-nav-search { width: 100%; }
    .vip-nav-search input[type="text"] { width: 100%; min-width: 100%; font-size: 14px; padding: 12px 20px;}

    .single-vip-content {
        padding: 25vh 0 0 0; 
        max-width: 100%; 
    }

    .single-vip-glass {
        padding: 35px 20px 100px 20px;
        border-radius: 35px 35px 0 0; 
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        min-height: 75vh;
        background: rgba(8, 8, 8, 0.95); 
        backdrop-filter: blur(25px);
    }

    .vip-title { font-size: 34px; margin-bottom: 15px; }
    .vip-review-text { font-size: 17px; color: #E0E0E0; }

    .vip-btn-orange {
        position: sticky;
        bottom: 20px;
        z-index: 50;
        padding: 20px;
        font-size: 16px;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(255, 138, 0, 0.4);
    }
}