:root {
    --oro-mate: #d4af37;
    --verde-bosque: #2D4628;
    --gris-oscuro: #1A1A1A;
    --blanco-crema: #F9F9F9;
    --texto-oscuro: #333333;
    --fuente-editorial: 'Playfair Display', serif;
    --fuente-cuerpo: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-cuerpo);
    background-color: var(--blanco-crema);
    color: var(--texto-oscuro);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    background-color: var(--verde-bosque);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--oro-mate);
}

.nav-backgorund {
    background-color: var(--blanco-crema);
}

.nav-menu-rg {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-login-btn {
    text-decoration: none;
    color: var(--oro-mate);
    border: 1px solid var(--oro-mate);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.1);
}

.nav-login-btn:hover {
    background: var(--oro-mate);
    color: white;
}

.user-logged {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user-link {
    text-decoration: none;
    color: var(--texto-oscuro);
    font-weight: bold;
    font-size: 0.9rem;
}

.logout-btn {
    background: transparent;
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: bold;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #ff4444;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--fuente-editorial);
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--oro-mate);
}

/* --- HERO SECTION (PARALLAX) --- */
.hero-parallax {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), 
                url('https://images.unsplash.com/photo-1504280390367-361c6d9f38f4?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-family: var(--fuente-editorial);
    color: var(--oro-mate);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- BOTONES --- */
.btn-gold {
    background: var(--oro-mate);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid var(--oro-mate);
}

.btn-gold:hover {
    background: transparent;
    color: var(--oro-mate);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--oro-mate);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--oro-mate);
    border-radius: 40px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--oro-mate);
    color: white;
}

/* --- BARRA DE CATEGORÍAS --- */
.category-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
    background: var(--verde-bosque);
    border-bottom: 1px solid var(--oro-mate);
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--oro-mate);
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.cat-item i {
    font-size: 1.8rem;
    color: var(--oro-mate);
}

.cat-item:hover {
    color: white;
    transform: translateY(-3px);
}

/* --- ANUNCIOS LATERALES --- */
.ads-lateral {
    position: fixed;
    top: 30%;
    width: 160px;
    background: var(--verde-bosque);
    border: 1px solid var(--oro-mate);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.5s;
    z-index: 90;
}

.ads-left { left: 10px; }
.ads-right { right: 10px; }

.ads-lateral img,
.ads-lateral video {
    width: 100%;
    display: block;
}

.close-ad {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #aa4a4a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
}

/* --- MAIN LAYOUT --- */
.main-layout {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-intro {
    text-align: center;
    margin: 40px 0;
}

.section-intro h2 {
    font-size: 2.5rem;
    font-family: var(--fuente-editorial);
    color: var(--texto-oscuro);
}

.divider {
    width: 100px;
    height: 3px;
    background: var(--oro-mate);
    margin: 15px auto;
}

/* --- GRID MENÚ --- */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 50px 0;
}

.card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    color: var(--texto-oscuro);
    border: 1px solid #ddd;
    transition: 0.3s;
}

.card i {
    font-size: 2.8rem;
    color: var(--oro-mate);
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 8px;
    color: var(--texto-oscuro);
}

.card:hover {
    transform: scale(1.03);
    border-color: var(--oro-mate);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* --- SLIDER PREMIUM --- */
.banner-premium {
    margin: 10px 0;
    height: 800px;
}

.viewport {
    overflow: hidden;
    border-radius: 20px;
    border: 2px solid var(--oro-mate);
    position: relative;
}

.pro-slider {
    display: flex;
    width: 400%;
    transition: transform 0.3s ease;
}

.slide {
    width: 50%;
    height: 400px;
    object-fit: cover;
}

.progress-container {
    height: 5px;
    background: var(--verde-bosque);
}

.progress-bar {
    height: 5px;
    background: var(--oro-mate);
    width: 0%;
}

/* --- SECCIÓN VR --- */
.virtual-env-preview {
    background: linear-gradient(135deg, var(--verde-bosque), #0e2a13);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--oro-mate);
    color: white;
}

.vr-icon {
    font-size: 4rem;
    color: var(--oro-mate);
    margin-bottom: 20px;
}

.virtual-env-preview h3 {
    font-size: 2rem;
    color: var(--oro-mate);
    margin-bottom: 15px;
    font-family: var(--fuente-editorial);
}

/* --- SECCIÓN CONTACTO --- */
.contact-dark {
    background: var(--verde-bosque);
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid var(--oro-mate);
    border-bottom: 1px solid var(--oro-mate);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 0 20px;
}

.contact-info h2 {
    font-size: 2.2rem;
    color: var(--oro-mate);
    margin-bottom: 20px;
    font-family: var(--fuente-editorial);
}

.contact-form-box {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--oro-mate);
}

.form-row {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.form-row input,
.contact-form-box textarea {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid var(--oro-mate);
    border-radius: 8px;
    color: var(--texto-oscuro);
}

.contact-form-box textarea {
    min-height: 120px;
    margin: 15px 0;
}

.btn-gold-full {
    background: var(--oro-mate);
    color: white;
    border: none;
    padding: 14px;
    font-weight: bold;
    border-radius: 40px;
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
}

.btn-gold-full:hover {
    background: var(--gris-oscuro);
}

/* --- FOOTER --- */
.main-footer {
    background: #051007;
    text-align: center;
    padding: 20px;
    color: #8b8b5f;
}

/* --- POPUP --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s;
}

.popup-overlay.show {
    display: flex;
    opacity: 1;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 30px;
    max-width: 450px;
    width: 90%;
    border: 2px solid var(--oro-mate);
    color: var(--texto-oscuro);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 2rem;
    color: var(--oro-mate);
}

.close-btn {
    cursor: pointer;
    font-size: 2.5rem;
}

.benefit-list {
    list-style: none;
    margin: 20px 0;
}

.benefit-list li {
    margin: 10px 0;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 40px;
    border: 1px solid var(--oro-mate);
    margin: 15px 0;
    background: #f9f9f9;
}

.calc-btn {
    background: var(--oro-mate);
    color: white;
    padding: 12px;
    width: 100%;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* ===== ESTILOS DEL CHATBOT CON AVATAR ===== */
.chat-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.chat-container {
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #ddd;
}

.chat-header {
    background: var(--oro-mate);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* --- AVATAR DEL CAMPISTA --- */
.avatar-container {
    background: var(--verde-bosque);
    padding: 15px;
    border-bottom: 1px solid var(--oro-mate);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.campista-avatar {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.campista-avatar i {
    font-size: 3.5rem;
    color: var(--oro-mate);
    background: var(--gris-oscuro);
    padding: 10px;
    border-radius: 50%;
    border: 2px solid var(--oro-mate);
    transition: all 0.3s ease;
}

.campista-avatar i.speaking {
    animation: speakPulse 0.5s ease-in-out infinite alternate;
    box-shadow: 0 0 15px var(--oro-mate);
}

@keyframes speakPulse {
    from {
        transform: scale(1);
        border-color: var(--oro-mate);
    }
    to {
        transform: scale(1.1);
        border-color: #ffd966;
        box-shadow: 0 0 20px #ffd966;
    }
}

.avatar-message-bubble {
    background: white;
    border: 1px solid var(--oro-mate);
    border-radius: 20px 20px 20px 5px;
    padding: 10px 20px;
    max-width: 300px;
    position: relative;
}

.avatar-message-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent var(--oro-mate) transparent transparent;
}

.avatar-message-bubble span {
    color: var(--texto-oscuro);
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
}

.avatar-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #4CAF50;
}

.avatar-status .dot {
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- CHAT MESSAGES --- */
.chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: var(--blanco-crema);
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-items: flex-end;
}

.bot-message {
    align-items: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    word-wrap: break-word;
    color: var(--texto-oscuro);
}

.user-message .message-content {
    background: #dcf8c6;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* --- SUGERENCIAS --- */
.suggestions {
    padding: 10px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.suggestion-btn {
    background: var(--oro-mate);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    font-weight: 500;
}

.suggestion-btn:hover {
    background: var(--gris-oscuro);
}

/* --- CHAT INPUT --- */
.chat-input {
    display: flex;
    padding: 10px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

.chat-input input::placeholder {
    color: #aaa;
}

.chat-input button {
    background: var(--oro-mate);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
    font-weight: bold;
}

.chat-input button:hover {
    background: var(--gris-oscuro);
}


/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .ads-lateral { display: none; }
    .category-bar { flex-wrap: wrap; gap: 20px; }
    .hero-parallax { background-attachment: scroll; }
    .grid-menu { grid-template-columns: repeat(2, 1fr); }
    .contact-container { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .grid-menu { grid-template-columns: 1fr; }
    .category-bar { flex-direction: column; align-items: center; }
    .avatar-message-bubble { max-width: 200px; }
    .avatar-message-bubble span { font-size: 0.85rem; }
}