/* =========================================================
   POGGIOLI HOUSE — STYLE.CSS
   Palette: avorio, beige, verde salvia e antracite
   ========================================================= */

/* ---------- RESET E VARIABILI ---------- */
:root {
    --color-bg: #f5f1eb;
    --color-bg-soft: #ebe5da;
    --color-card: #fffdf9;
    --color-text: #282722;
    --color-muted: #77766c;
    --color-green: #737d62;
    --color-green-dark: #4f5943;
    --color-line: #d9d2c7;
    --color-white: #ffffff;
    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
    --shadow-soft: 0 18px 50px rgba(40, 39, 34, 0.09);
    --transition: 0.3s ease;
    --nav-height: 82px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

::selection {
    background: var(--color-green);
    color: var(--color-white);
}

/* ---------- ELEMENTI GENERALI ---------- */
section {
    position: relative;
}

.eyebrow {
    margin-bottom: 17px;
    color: var(--color-green-dark);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    line-height: 1.5;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    letter-spacing: -0.045em;
}

p {
    overflow-wrap: break-word;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-green-dark);
    outline-offset: 4px;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    min-height: var(--nav-height);
    padding: 16px clamp(24px, 6vw, 100px);
    background: rgba(245, 241, 235, 0.94);
    border-bottom: 1px solid rgba(217, 210, 199, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.navbar nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2.5vw, 38px);
}

.navbar nav a {
    position: relative;
    padding: 6px 0;
    color: #45443d;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: color var(--transition);
}

.navbar nav a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--color-green-dark);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
}

.navbar nav a:hover {
    color: var(--color-green-dark);
}

.navbar nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 23px;
    flex-shrink: 0;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.lang-btn {
    padding: 4px 0;
    background: transparent;
    border: 0;
    color: #89877e;
    font-size: 10px;
    letter-spacing: 0.08em;
    transition: color var(--transition);
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-text);
    font-weight: 700;
}

.lang-divider {
    color: #c5bfb4;
    font-size: 10px;
}

.booking-button,
.hero-button,
.location-button,
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 47px;
    padding: 13px 24px;
    background: var(--color-green-dark);
    border: 1px solid var(--color-green-dark);
    color: var(--color-white);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.booking-button:hover,
.hero-button:hover,
.location-button:hover,
.submit-btn:hover {
    background: transparent;
    color: var(--color-green-dark);
}

.booking-button:active,
.hero-button:active,
.location-button:active,
.submit-btn:active {
    transform: translateY(1px);
}

/* ---------- HERO ---------- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(760px, calc(100svh - var(--nav-height)));
    padding: 100px 24px 110px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(245, 241, 235, 0.98), rgba(235, 229, 218, 0.82)),
        var(--color-bg-soft);
    text-align: center;
}

.hero::before,
.hero::after {
    position: absolute;
    width: 370px;
    height: 370px;
    border: 1px solid rgba(115, 125, 98, 0.16);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.hero::before {
    top: -205px;
    left: -130px;
}

.hero::after {
    right: -190px;
    bottom: -245px;
    width: 510px;
    height: 510px;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(100%, 790px);
    margin: auto;
    animation: hero-appear 0.9s ease both;
}

.hero-logo-img {
    width: clamp(145px, 19vw, 235px);
    max-height: 180px;
    margin: 0 auto 28px;
    object-fit: contain;
}

.hero .eyebrow {
    margin-bottom: 25px;
}

.hero-text {
    max-width: 620px;
    margin: 0 auto 34px;
    color: #646259;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 400;
    line-height: 1.8;
}

.hero-button {
    min-width: 220px;
    min-height: 54px;
}

/* ---------- TITOLI SEZIONE ---------- */
.gallery-title,
.reviews-title {
    width: min(100% - 48px, 760px);
    margin: 0 auto 46px;
    text-align: center;
}

.gallery-title h2,
.reviews-title h2 {
    margin-bottom: 17px;
}

.gallery-title > p:last-child,
.reviews-title > p:last-child {
    max-width: 620px;
    margin-right: auto;
    margin-left: auto;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.9;
}

/* ---------- CAMERE ---------- */
.gallery {
    padding: clamp(85px, 10vw, 145px) 0 clamp(90px, 10vw, 140px);
}

.room-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto 35px;
    padding: 0 24px;
}

.room-button {
    min-width: 125px;
    padding: 11px 22px;
    background: transparent;
    border: 1px solid var(--color-line);
    color: #65645b;
    font-size: 11px;
    letter-spacing: 0.08em;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.room-button:hover {
    border-color: var(--color-green-dark);
    color: var(--color-green-dark);
}

.room-button.active {
    background: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    width: min(100% - 64px, 1500px);
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    height: clamp(220px, 26vw, 410px);
    background: var(--color-bg-soft);
    object-fit: cover;
    transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), filter var(--transition);
}

.gallery-grid img:hover {
    filter: brightness(0.96);
}

.room-gallery {
    display: none;
    animation: gallery-appear 0.45s ease both;
}

.room-gallery.active {
    display: grid;
}

/* ---------- SPAZI COMUNI ---------- */
.common-spaces {
    padding: clamp(85px, 9vw, 125px) 0;
    background: var(--color-bg-soft);
}

.common-spaces .gallery-grid img {
    height: clamp(230px, 28vw, 430px);
}

/* ---------- RECENSIONI ---------- */
.reviews {
    padding: clamp(90px, 10vw, 145px) 24px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: min(100%, 1500px);
    margin: 0 auto;
}

.review {
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 27px 25px 29px;
    background: var(--color-card);
    border: 1px solid rgba(217, 210, 199, 0.85);
    transition: transform var(--transition), box-shadow var(--transition);
}

.review:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.review-top h3 {
    font-size: 1.5rem;
}

.review-top span {
    color: #9b8657;
    font-size: 12px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.review-date {
    margin-bottom: 18px;
    color: #929087;
    font-size: 10px;
    letter-spacing: 0.07em;
}

.review > p:last-child {
    color: #626158;
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1.85;
}

.airbnb-reviews-link {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 38px;
}

.airbnb-btn,
.google-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 13px 24px;
    background: var(--color-card);
    border: 1px solid var(--color-line);
    color: var(--color-text);
    font-size: 11px;
    letter-spacing: 0.035em;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.airbnb-btn:hover,
.google-review-btn:hover {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-white);
}

/* ---------- POSIZIONE ---------- */
.location {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: 560px;
    background: #e8e2d7;
}

.location-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(45px, 7vw, 105px);
}

.location-content h2 {
    margin-bottom: 22px;
}

.location-content > p:not(.eyebrow) {
    max-width: 480px;
    margin-bottom: 27px;
    color: #65645b;
    font-size: 14px;
    line-height: 1.95;
}

.location-address {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 28px;
    color: #69685e;
    font-size: 13px;
}

.location-address strong {
    margin-bottom: 5px;
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
}

.location-button {
    min-height: 48px;
}

.location-map {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    background: #d8d5ca;
}

.location-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.45) saturate(0.72);
}

/* ---------- MODALE PRENOTAZIONE ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overflow-y: auto;
    background: rgba(28, 28, 24, 0.64);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: min(100%, 570px);
    max-height: calc(100svh - 44px);
    padding: clamp(28px, 5vw, 48px);
    overflow-y: auto;
    background: var(--color-bg);
    box-shadow: 0 25px 90px rgba(0, 0, 0, 0.22);
    animation: modal-appear 0.3s ease both;
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 0;
    color: #5e5d54;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    transition: color var(--transition), transform var(--transition);
}

.close-btn:hover {
    color: var(--color-text);
    transform: rotate(90deg);
}

.modal-content h2 {
    padding-right: 20px;
    margin-bottom: 12px;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
}

.modal-content > p {
    margin-bottom: 27px;
    color: var(--color-muted);
    font-size: 13px;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    color: #45443d;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.035em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    background: #fffdf9;
    border: 1px solid var(--color-line);
    border-radius: 0;
    color: var(--color-text);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input {
    min-height: 46px;
}

.form-group textarea {
    min-height: 115px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa69b;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(115, 125, 98, 0.12);
}

.submit-btn {
    width: 100%;
    min-height: 51px;
    margin-top: 3px;
}

/* ---------- ANIMAZIONI ---------- */
@keyframes hero-appear {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gallery-appear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- TABLET ---------- */
@media (max-width: 1050px) {
    :root {
        --nav-height: 76px;
    }

    .navbar {
        gap: 18px;
        padding-right: 28px;
        padding-left: 28px;
    }

    .navbar nav {
        gap: 17px;
    }

    .navbar nav a {
        font-size: 10px;
        letter-spacing: 0.04em;
    }

    .navbar-right {
        gap: 15px;
    }

    .booking-button {
        min-height: 42px;
        padding: 10px 16px;
    }

    .gallery-grid {
        width: calc(100% - 48px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .gallery-grid img,
    .common-spaces .gallery-grid img {
        height: clamp(250px, 38vw, 430px);
    }

    .reviews-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 850px;
    }

    .review {
        min-height: 235px;
    }

    .location-content {
        padding: 55px 38px;
    }
}

/* ---------- SMARTPHONE ---------- */
@media (max-width: 700px) {
    :root {
        --nav-height: auto;
    }

    html {
        scroll-padding-top: 125px;
    }

    .navbar {
        position: sticky;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 16px 14px;
    }

    .navbar nav {
        justify-content: flex-start;
        gap: 22px;
        padding: 0 1px 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .navbar nav::-webkit-scrollbar {
        display: none;
    }

    .navbar nav a {
        flex: 0 0 auto;
        font-size: 10px;
    }

    .navbar-right {
        justify-content: space-between;
        gap: 14px;
    }

    .lang-switch {
        gap: 9px;
    }

    .booking-button {
        min-height: 39px;
        padding: 9px 17px;
        font-size: 9px;
    }

    .hero {
        min-height: 610px;
        min-height: min(700px, calc(100svh - 120px));
        padding: 75px 24px 85px;
    }

    .hero-logo-img {
        width: clamp(135px, 42vw, 190px);
        margin-bottom: 24px;
    }

    .hero .eyebrow {
        margin-bottom: 20px;
    }

    .hero-text {
        font-size: 1.12rem;
        line-height: 1.75;
    }

    .hero-button {
        width: 100%;
        max-width: 290px;
    }

    .gallery,
    .common-spaces {
        padding-top: 78px;
        padding-bottom: 82px;
    }

    .gallery-title,
    .reviews-title {
        width: calc(100% - 36px);
        margin-bottom: 32px;
    }

    .gallery-title h2,
    .reviews-title h2 {
        font-size: clamp(2.1rem, 9vw, 2.8rem);
    }

    .gallery-title > p:last-child,
    .reviews-title > p:last-child {
        font-size: 13px;
    }

    .room-buttons {
        gap: 8px;
        margin-bottom: 24px;
        padding: 0 18px;
    }

    .room-button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 10px 12px;
        font-size: 10px;
    }

    .gallery-grid {
        width: calc(100% - 32px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gallery-grid img,
    .common-spaces .gallery-grid img {
        height: clamp(175px, 53vw, 270px);
    }

    .reviews {
        padding: 80px 16px;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .review {
        min-height: 0;
        padding: 23px 22px 25px;
    }

    .review-top h3 {
        font-size: 1.4rem;
    }

    .review-date {
        margin-bottom: 12px;
    }

    .review > p:last-child {
        font-size: 14px;
    }

    .airbnb-reviews-link {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 27px;
    }

    .airbnb-reviews-link a {
        width: 100%;
        text-align: center;
    }

    .location {
        grid-template-columns: 1fr;
    }

    .location-content {
        padding: 68px 26px;
    }

    .location-map {
        min-height: 340px;
    }

    .modal {
        align-items: flex-start;
        padding: 12px;
    }

    .modal-content {
        max-height: calc(100svh - 24px);
        margin: auto 0;
        padding: 30px 22px;
    }

    .modal-content h2 {
        font-size: 2rem;
    }

    .booking-form {
        gap: 15px;
    }
}

/* ---------- SCHERMI MOLTO PICCOLI ---------- */
@media (max-width: 380px) {
    .navbar {
        padding-right: 12px;
        padding-left: 12px;
    }

    .navbar nav {
        gap: 17px;
    }

    .navbar nav a {
        font-size: 9px;
    }

    .navbar-right {
        gap: 8px;
    }

    .lang-switch {
        gap: 6px;
    }

    .booking-button {
        padding-right: 12px;
        padding-left: 12px;
    }

    .gallery-grid img,
    .common-spaces .gallery-grid img {
        height: 165px;
    }

    .review {
        padding: 20px 18px;
    }
}

/* ---------- ACCESSIBILITÀ ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
