/* RIVERRED CABAÑAS - Sistema tipo Airbnb */

:root {
    --color-primary: #059669;
    --color-primary-dark: #047857;
    --color-accent: #dc2626;
    --color-bg: #fafafa;
    --color-bg-dark: #0f0f0f;
    --color-bg-card: #ffffff;
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Loader */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background: var(--color-bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.6s ease;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.loader-logo .highlight {
    color: var(--color-primary);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.header.scrolled .nav__logo,
.header.scrolled .nav__link {
    color: var(--color-text);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.nav__logo .highlight {
    color: var(--color-primary);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.nav__link:hover {
    color: var(--color-primary);
}

.nav__cta {
    background: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav__toggle span {
    width: 25px;
    height: 2px;
    background: white;
}

.header.scrolled .nav__toggle span {
    background: var(--color-text);
}

.nav__close {
    display: none;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.hero__bg {
    position: absolute;
    inset: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 1.5rem;
}

.hero__badge {
    display: inline-flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: white;
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: white;
    margin-bottom: 1rem;
}

.hero__title .highlight {
    color: var(--color-primary);
}

.hero__description {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.hero__search {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.search-field {
    flex: 1;
    padding: 1rem 1.5rem;
}

.search-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-field__input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    width: 100%;
}

.search-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
    align-self: center;
}

.search-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
}

.search-btn:hover {
    background: var(--color-primary-dark);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__subtitle {
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: block;
}

.section__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section__description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Cabin Cards */
.cabins__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.cabin-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.cabin-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.cabin-card__gallery {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.cabin-card__gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.cabin-card:hover img {
    transform: scale(1.08);
}

.cabin-card__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.cabin-card__favorite {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cabin-card__content {
    padding: 1.25rem;
}

.cabin-card__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cabin-card__location {
    font-weight: 600;
}

.cabin-card__rating {
    display: flex;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.cabin-card__title {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.cabin-card__price strong {
    font-weight: 700;
}

/* Features */
.features {
    background: var(--color-bg);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.feature-card__icon {
    width: 70px;
    height: 70px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-card__title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.feature-card__description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: white;
    margin-bottom: 1rem;
}

.cta__description {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn--primary {
    background: var(--color-primary);
    color: white;
}

.btn--primary:hover {
    background: var(--color-primary-dark);
}

.btn--white {
    background: white;
    color: var(--color-primary);
}

.btn--outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--outline-white:hover {
    background: white;
    color: var(--color-primary);
}

/* Footer */
.footer {
    background: var(--color-bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer__logo .highlight {
    color: var(--color-primary);
}

.footer__description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.footer__title {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer__link:hover {
    color: var(--color-primary);
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer__socials {
    display: flex;
    gap: 1rem;
}

.footer__social {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.footer__social:hover {
    background: var(--color-primary);
    color: white;
}

/* WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* Contact Section */
.contact__container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.form__input {
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: var(--transition);
        z-index: 1001; /* Ensure it's above everything */
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .nav__link {
        color: var(--color-text);
        font-size: 1.1rem;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
        font-size: 2rem;
        cursor: pointer;
    }

    /* Adjust logo dropdown for mobile */
    .nav__logo-dropdown {
        position: static;
    }

    .nav__dropdown-menu--logo {
        position: fixed;
        left: 1rem !important;
        right: 1rem;
        top: 5rem !important;
        transform: none !important;
        min-width: auto;
        max-width: none;
        white-space: normal;
        background: white;
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }
}

/* ===== HEADER COMPONENTS (River Red Style) ===== */
.nav__logo-dropdown {
    position: relative;
    padding-bottom: 0.5rem; /* Increase hover area */
    margin-bottom: -0.5rem;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-river { color: var(--color-text); font-weight: 800; }
.logo-red { color: var(--color-accent); font-weight: 800; }
.header.scrolled .logo-river { color: var(--color-text); }

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-left: 1rem;
    white-space: nowrap;
    display: none; /* Hidden on small screens */
}

@media (min-width: 1024px) {
    .logo-tagline { display: inline-block; }
}

.logo-arrow {
    font-size: 0.6rem;
    margin-left: 0.5rem;
    transition: transform var(--transition);
    color: var(--color-text-muted);
}

.nav__logo-dropdown:hover .logo-arrow {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.nav__dropdown-menu--logo {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(10px);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.nav__logo-dropdown:hover .nav__dropdown-menu--logo {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown-menu--logo li {
    list-style: none;
}

.nav__dropdown-menu--logo a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}

.nav__dropdown-menu--logo a:hover {
    background: rgba(220, 38, 38, 0.05);
    color: var(--color-accent);
    padding-left: 1.5rem;
}

.dropdown-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
}

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 0.5rem 0;
}

.brand-riverred { border-left: 3px solid var(--color-accent) !important; }
.brand-quesos { border-left: 3px solid #d4a853 !important; }

/* Adjust nav list for spacing */
.nav__list {
    align-items: center;
}