* {
    box-sizing: border-box;
}

:root {
    --text: #171717;
    --muted: #717171;
    --border: #e6e6e6;
    --surface: #f7f7f5;
    --accent: #e85d3f;
    --accent-dark: #d84c30;
    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #fff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.nav {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-main {
    font-size: 23px;
    font-weight: 850;
    letter-spacing: -.7px;
}

.brand-sub {
    color: var(--muted);
    font-size: 14px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    font-weight: 600;
}

.button-primary,
.button-outline,
.button-dark {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
}

.button-primary {
    background: var(--accent);
    color: white;
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-outline {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}

.button-dark {
    background: #171717;
    color: white;
    padding: 15px 24px;
}

.logout-form {
    margin: 0;
}

.hero {
    padding: 90px 0 80px;
    background:
        radial-gradient(circle at 85% 20%, #ffe7df 0, transparent 30%),
        linear-gradient(180deg, #fff 0%, #faf9f7 100%);
}

.hero-content {
    text-align: center;
}

.eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.hero h1 {
    margin: 14px 0 18px;
    font-size: clamp(45px, 7vw, 82px);
    line-height: .98;
    letter-spacing: -4px;
}

.hero-text {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
    margin: 0 auto 42px;
    max-width: 600px;
}

.search-box {
    max-width: 1080px;
    margin: auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    box-shadow: 0 18px 55px rgba(0,0,0,.08);
    text-align: left;
}

.search-field {
    padding: 10px 18px;
    border-right: 1px solid var(--border);
}

.search-field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.search-field input,
.search-field select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #555;
}

.search-button {
    border: 0;
    background: var(--accent);
    color: white;
    border-radius: 17px;
    padding: 0 27px;
    cursor: pointer;
    font-weight: 800;
}

.destinations {
    padding-top: 85px;
    padding-bottom: 100px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 32px;
}

.section-heading h2,
.host-panel h2 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -2px;
    margin: 8px 0 0;
}

.section-heading > a {
    font-weight: 700;
}

.destination-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.destination-card {
    display: block;
}

.destination-image {
    height: 290px;
    border-radius: var(--radius);
    margin-bottom: 17px;
    background-size: cover;
    background-position: center;
}

.destination-madrid {
    background: linear-gradient(135deg, #d9d4cc, #a99d8c);
}

.destination-valencia {
    background: linear-gradient(135deg, #b9d8d6, #699b9c);
}

.destination-malaga {
    background: linear-gradient(135deg, #e9d2a8, #bf9361);
}

.destination-card h3 {
    margin: 0 0 5px;
    font-size: 20px;
}

.destination-card p {
    color: var(--muted);
    margin: 0;
}

.host-section {
    padding: 0 0 100px;
}

.host-panel {
    background: #181818;
    color: white;
    border-radius: 30px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.host-panel p {
    color: #bdbdbd;
    line-height: 1.7;
    max-width: 540px;
    margin: 20px 0 28px;
}

.host-panel .button-dark {
    background: white;
    color: #171717;
}

.commission-box {
    min-width: 250px;
    padding: 35px;
    border: 1px solid #444;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
}

.commission-box span,
.commission-box small {
    color: #aaa;
}

.commission-box strong {
    font-size: 62px;
    letter-spacing: -4px;
    margin: 10px 0;
}

.auth-section {
    min-height: 70vh;
    background: var(--surface);
    padding: 70px 20px;
}

.auth-card {
    width: min(520px, 100%);
    margin: auto;
    padding: 42px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: 0 20px 60px rgba(0,0,0,.05);
}

.auth-card h1 {
    margin: 10px 0;
    font-size: 38px;
    letter-spacing: -1.5px;
}

.auth-intro,
.auth-bottom {
    color: var(--muted);
}

.auth-form {
    margin-top: 30px;
}

.auth-form label {
    display: block;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 750;
}

.auth-form input {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
}

.auth-form input:focus {
    border-color: #999;
}

.button-full {
    width: 100%;
    padding: 15px;
}

.form-errors,
.flash {
    border-radius: 12px;
    padding: 13px 16px;
    margin: 20px 0;
}

.form-errors,
.flash-error {
    background: #fff1ef;
    color: #9e3020;
}

.flash-success {
    background: #edf8ef;
    color: #246b32;
}

.form-errors p {
    margin: 4px 0;
}

.auth-bottom {
    margin: 24px 0 0;
    text-align: center;
    font-size: 14px;
}

.auth-bottom a {
    color: var(--text);
    font-weight: 800;
}

.site-footer {
    padding: 55px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-grid p {
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 25px;
}

.copyright {
    border-top: 1px solid var(--border);
    padding-top: 25px;
    margin-top: 35px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 850px) {

    .host-link {
        display: none;
    }

    .hero {
        padding: 65px 0;
    }

    .hero h1 {
        letter-spacing: -2.5px;
    }

    .search-box {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .destination {
        grid-column: 1 / -1;
    }

    .search-field {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .search-button {
        grid-column: 1 / -1;
        height: 52px;
        margin-top: 8px;
    }

    .destination-grid {
        grid-template-columns: 1fr;
    }

    .destination-image {
        height: 330px;
    }

    .host-panel {
        padding: 40px 30px;
        flex-direction: column;
        align-items: stretch;
    }

    .commission-box {
        min-width: 0;
    }
}

@media (max-width: 600px) {

    .container {
        width: min(100% - 28px, 1180px);
    }

    .nav {
        height: 68px;
    }

    .brand-sub,
    .nav-actions > a:not(.button-primary):not(.account-link) {
        display: none;
    }

    .nav-actions {
        gap: 10px;
    }

    .hero h1 {
        font-size: 47px;
    }

    .hero-text {
        font-size: 16px;
    }

    .search-box {
        display: block;
        border-radius: 18px;
    }

    .search-field {
        padding: 14px;
    }

    .search-button {
        width: 100%;
        margin-top: 10px;
    }

    .section-heading {
        align-items: start;
    }

    .section-heading > a {
        display: none;
    }

    .destination-image {
        height: 260px;
    }

    .auth-card {
        padding: 30px 22px;
    }

    .footer-grid,
    .footer-links {
        flex-direction: column;
    }
}

/* ================================
   PUBLICAR ALOJAMIENTO
================================ */

.publish-section {
    background: #f7f7f5;
    padding: 55px 0 90px;
}

.publish-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 55px;
    align-items: start;
}

.publish-sidebar {
    position: sticky;
    top: 115px;
}

.publish-sidebar h1 {
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: -1.7px;
    margin: 12px 0 18px;
}

.publish-sidebar > p {
    color: var(--muted);
    line-height: 1.65;
}

.publish-steps {
    margin-top: 38px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.publish-step {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #999;
}

.publish-step strong {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 12px;
}

.publish-step.active {
    color: #171717;
    font-weight: 700;
}

.publish-step.active strong {
    background: #171717;
    color: white;
    border-color: #171717;
}

.publish-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 15px 45px 45px;
}

.form-block {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.form-block-title {
    display: flex;
    gap: 17px;
    align-items: flex-start;
    margin-bottom: 28px;
}

.form-block-title > span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
    padding-top: 5px;
}

.form-block-title h2 {
    margin: 0 0 5px;
    font-size: 25px;
    letter-spacing: -.7px;
}

.form-block-title p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.form-label {
    display: block;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 750;
}

.form-label input,
.form-label textarea,
.form-label select {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 14px 15px;
    background: white;
    border: 1px solid #dedede;
    border-radius: 12px;
    color: var(--text);
    outline: none;
}

.form-label textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.form-label input:focus,
.form-label textarea:focus,
.form-label select:focus {
    border-color: #888;
    box-shadow: 0 0 0 3px rgba(0,0,0,.035);
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid.four {
    grid-template-columns: repeat(4, 1fr);
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.amenity-option {
    position: relative;
}

.amenity-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amenity-option span {
    min-height: 54px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #dedede;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    transition: .15s ease;
}

.amenity-option input:checked + span {
    border-color: #171717;
    background: #171717;
    color: white;
}

.publish-submit {
    padding-top: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.publish-submit strong {
    display: block;
    font-size: 14px;
}

.publish-submit p {
    color: var(--muted);
    margin: 5px 0 0;
    font-size: 13px;
}

.publish-button {
    min-width: 220px;
    min-height: 52px;
}

@media (max-width: 950px) {

    .publish-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .publish-sidebar {
        position: static;
    }

    .publish-steps {
        flex-direction: row;
    }

    .form-grid.four {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {

    .publish-section {
        padding-top: 30px;
    }

    .publish-card {
        padding: 5px 20px 30px;
        border-radius: 20px;
    }

    .publish-steps {
        justify-content: space-between;
        gap: 8px;
    }

    .publish-step {
        gap: 7px;
        font-size: 12px;
    }

    .form-grid.two,
    .form-grid.four,
    .amenities-grid {
        grid-template-columns: 1fr;
    }

    .publish-submit {
        align-items: stretch;
        flex-direction: column;
    }

    .publish-button {
        width: 100%;
    }
}
