/* --- RESET GENERAL DE MÁRGENES (CORREGIDO) --- */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden; /* Evita que la página baile hacia los lados */
}

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

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjtxT...=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

/* --- ESTILOS DE NAVEGACIÓN Y LOGOTIPO WAYLAN (GLOBAL) --- */
:root {
    --waylan-dark-coffee: #2F190E;
    --waylan-gold: #B89A5E;
    --waylan-gold-hover: #A3844C;
    --waylan-cherry-red: #3A120D;
    --waylan-cherry-hover: #2B0D0A;
    --waylan-white: #F7F2ED;
    --waylan-pure-white: #FFFFFF;
    --waylan-shadow: rgba(0, 0, 0, 0.15);
    /* Altura del header */
    --header-height: 80px;
}

.main-content {
    padding-top: var(--header-height) !important;
    margin-top: 0 !important;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.35s ease-in-out;
    margin: 0 !important;
    padding: 0 !important;
}

.header-waylan--oculto {
    transform: translateY(-100%);
}

.navbar-waylan {
    width: 100%;
    background-color: rgba(58, 18, 13, 0.88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(250, 250, 249, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
    padding: 14px 0 !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.nav-logo-img {
    height: 52px !important;
    width: auto !important;
    display: block !important;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #F7F2ED !important;
    text-decoration: none;
    margin: 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #B89A5E !important;
}

.dropdown-waylan-container {
    position: relative;
    display: inline-block;
    margin: 0 12px;
}

.dropdown-waylan-btn {
    background: none;
    border: none;
    color: #F7F2ED !important;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.dropdown-waylan-btn:hover,
.dropdown-waylan-btn.active {
    color: #B89A5E !important;
}

.arrow-icon {
    transition: transform 0.2s ease;
}

.arrow-icon.rotate {
    transform: rotate(180deg);
}

.dropdown-waylan-menu {
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FFFFFF !important;
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    z-index: 1100;
    animation: fadeInDropdown 0.2s ease-out;
}

.dropdown-waylan-menu a {
    color: var(--waylan-dark-coffee) !important;
    padding: 10px 20px;
    margin: 0 !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-waylan-menu a:hover {
    background-color: #FAF6F0;
    color: var(--waylan-gold) !important;
}

.nav-auth-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: #F7F2ED !important;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: color 0.2s ease;
}

.nav-icon-btn:hover {
    color: var(--waylan-gold) !important;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #B89A5E;
    color: var(--waylan-dark-coffee);
    font-size: 0.7rem;
    font-weight: 750;
    border-radius: 50%;
    padding: 2px 6px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cart-badge-bump {
    animation: cartBump 0.3s ease-out;
}

@keyframes cartBump {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.nav-links a.nav-active {
    color: #B89A5E !important;
    border-bottom: 2px solid #B89A5E;
    padding-bottom: 4px;
}

.user-menu-container {
    position: relative;
}

.login-form-dropdown {
    position: absolute;
    top: 42px;
    right: 0;
    background-color: var(--waylan-pure-white);
    border-radius: 8px;
    width: 290px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translate(var(--tw-translate-x, -50%), -8px);
    }
    to {
        opacity: 1;
        transform: translate(var(--tw-translate-x, -50%), 0);
    }
}

.dropdown-form-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--waylan-dark-coffee);
    margin-bottom: 4px;
    text-align: center;
}

.form-group-waylan {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group-waylan label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #55504A;
}

.form-group-waylan input {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
    border: 1px solid #D2CFC9;
    border-radius: 4px;
    background-color: #FAF6F0;
    color: var(--waylan-dark-coffee);
    outline: none;
    transition: border-color 0.2s;
}

.form-group-waylan input:focus {
    border-color: var(--waylan-gold);
}

.btn-submit-login {
    background-color: var(--waylan-cherry-red);
    color: #FFFFFF !important;
    border: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 6px;
}

.btn-submit-login:hover {
    background-color: var(--waylan-cherry-hover);
}

.dropdown-divider {
    height: 1px;
    background-color: #E6E4E0;
    margin: 6px 0;
}

.dropdown-text {
    font-size: 0.75rem;
    color: #706B64;
    text-align: center;
}

.dropdown-link-register {
    color: var(--waylan-gold) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    transition: color 0.2;
}

.dropdown-link-register:hover {
    color: var(--waylan-gold-hover) !important;
    text-decoration: underline;
}

.btn-nav-accent {
    background-color: var(--waylan-cherry-red) !important;
    color: #FFFFFF !important;
    text-decoration: none;
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    display: inline-block;
    border: none !important;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-nav-accent:hover {
    background-color: var(--waylan-cherry-hover) !important;
}

/* --- ESTILO DE LÍNEAS TOPOGRÁFICAS DECORATIVAS EN FONDOS OSCUROS --- */
.dark-topo-bg {
    background-image: url('../fondos/topography.svg') !important;
    background-repeat: repeat !important;
    background-size: 800px 800px !important;
    background-position: center center !important;
}

/* --- REGLAS GENERALES DE TIPOGRAFÍA Y ESPACIADO RESPONSIVO --- */
p, .section-text, .hero-description, .proceso-description, .ex-desc-white {
    font-size: clamp(1rem, 1.2vw, 1.15rem) !important;
    line-height: 1.75 !important;
}

h1, .hero-main-title, .proceso-main-title, .ex-title-white {
    font-size: clamp(2.5rem, 5vw, 4.2rem) !important;
    line-height: 1.15 !important;
}

h2, .section-title, .proceso-subtitle-center, .historias-heading, .impact-heading, .destinos-heading {
    font-size: clamp(2rem, 3.8vw, 3.2rem) !important;
    line-height: 1.2 !important;
}

h3, .timeline-text-side h3, .valor-text-content h6 {
    font-size: clamp(1.15rem, 2vw, 1.4rem) !important;
}

/* Reducción de vacíos y márgenes excesivos */
section {
    padding: clamp(40px, 6vw, 75px) 0;
}