/*
Theme Name: Casa Graziella
Theme URI: https://www.casa-graziella.it
Author: Max
Author URI: https://www.casa-graziella.it
Description: Custom WordPress theme for Casa Graziella Holiday Apartments in Monferrato, Piedmont. Supports Polylang multilingual (IT/EN+). Classic theme with WhatsApp chat integration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casa-graziella
Tags: holiday, apartments, vacation-rental, multilingual, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
    /* Dark Luxury Palette */
    --cg-black:   #0a0908;
    --cg-black-70: rgba(10, 9, 8, 0.7);
    --cg-dark:    #1a1714;
    --cg-gold:    #c9a96e;
    --cg-gold-lt: #e8d5b0;
    --cg-cream:   #f5f0e8;
    --cg-muted:   #8a7f72;
    --cg-white:   #ffffff;

    /* Aliases — keep old variable names so unchanged CSS rules still work */
    --cg-primary:       #c9a96e;
    --cg-primary-light: #e8d5b0;
    --cg-primary-dark:  #0a0908;
    --cg-accent:        #c9a96e;
    --cg-accent-light:  #e8d5b0;
    --cg-off-white:     #0a0908;
    --cg-light-bg:      #1a1714;
    --cg-text:          #f5f0e8;
    --cg-text-light:    #8a7f72;
    --cg-text-muted:    #6a6058;
    --cg-border:        rgba(201, 169, 110, 0.2);
    --cg-overlay:       rgba(0, 0, 0, 0.55);
    --cg-whatsapp:      #25D366;

    /* Typography */
    --cg-font-heading: 'Cormorant Garamond', Georgia, serif;
    --cg-font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --cg-space-xs:  0.5rem;
    --cg-space-sm:  1rem;
    --cg-space-md:  2rem;
    --cg-space-lg:  4rem;
    --cg-space-xl:  6rem;
    --cg-space-xxl: 8rem;

    /* Layout */
    --cg-max-width:        1200px;
    --cg-max-width-narrow: 800px;
    --cg-header-height:    70px;

    /* Transitions */
    --cg-transition:      0.3s ease;
    --cg-transition-slow: 0.6s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--cg-font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cg-text);
    background-color: var(--cg-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--cg-gold);
    text-decoration: none;
    transition: color var(--cg-transition);
}

a:hover {
    color: var(--cg-gold-lt);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--cg-font-heading);
    font-weight: 700;
    font-style: italic;
    line-height: 1.25;
    color: var(--cg-cream);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.container {
    width: 100%;
    max-width: var(--cg-max-width);
    margin: 0 auto;
    padding: 0 var(--cg-space-md);
}

.container--narrow {
    max-width: var(--cg-max-width-narrow);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.35s ease, border-bottom 0.35s ease;
}

.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

/* Compensate admin bar margin so hero stays flush under fixed header */
body.admin-bar .hero,
body.admin-bar .site-hero {
    margin-top: -32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .hero,
    body.admin-bar .site-hero {
        margin-top: -46px;
    }
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--cg-gold);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: var(--cg-max-width);
    margin: 0 auto;
    padding: 0 var(--cg-space-md);
    gap: 1.5rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    height: 58px;
    width: auto;
}

/* Logo readability on any hero background */
.site-header:not(.scrolled) .site-logo img {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.75));
}

.site-logo .logo-text {
    font-family: var(--cg-font-heading);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--cg-cream);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.site-logo .logo-subtitle {
    display: block;
    font-family: var(--cg-font-body);
    font-style: normal;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--cg-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 0.8rem;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cg-cream);
    transition: color var(--cg-transition);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0.8rem;
    right: 0.8rem;
    height: 1px;
    background: var(--cg-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-navigation a:hover { color: var(--cg-gold-lt); }
.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current-menu-ancestor > a::after {
    transform: scaleX(1);
}

/* Dropdown */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--cg-dark);
    border: 1px solid var(--cg-border);
    padding: 0.5rem 0;
    z-index: 100;
}

.main-navigation li:hover > .sub-menu { display: block; }

.main-navigation .sub-menu a {
    padding: 0.6rem 1.25rem;
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0.04em;
}

.main-navigation .sub-menu a:hover {
    background: rgba(201, 169, 110, 0.08);
}

/* Header Actions (right side) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.header-lang-inline {
    display: flex;
    align-items: center;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.lang-btn {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-family: var(--cg-font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cg-muted);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--cg-transition);
    text-decoration: none;
}

.lang-btn:hover { color: var(--cg-cream); }
.lang-btn--active {
    color: var(--cg-gold);
    border-color: var(--cg-gold);
    cursor: default;
}

/* Booking button */
.header-book-btn {
    display: inline-block;
    padding: 0.5rem 1.4rem;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cg-black);
    background: var(--cg-gold);
    text-decoration: none;
    transition: background var(--cg-transition), color var(--cg-transition);
}

.header-book-btn:hover {
    background: var(--cg-gold-lt);
    color: var(--cg-black);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--cg-cream);
    position: relative;
    transition: background var(--cg-transition);
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--cg-cream);
    transition: transform var(--cg-transition);
}

.menu-toggle .hamburger::before { top: -7px; }
.menu-toggle .hamburger::after { top: 7px; }

.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* CTA in nav (nav-cta class on menu item) */
.nav-cta a {
    color: var(--cg-gold) !important;
}
.nav-cta a:hover { color: var(--cg-gold-lt) !important; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.4)  50%,
        rgba(0,0,0,0.65) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: var(--cg-white);
    max-width: 760px;
    padding: var(--cg-space-md);
    padding-top: 70px;
}

.hero-eyebrow {
    display: block;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--cg-gold);
    margin-bottom: 1.25rem;
}

.hero-content h1 {
    color: var(--cg-white);
    font-family: var(--cg-font-heading);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    font-style: italic;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content .hero-subtitle {
    font-family: var(--cg-font-body);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--cg-gold);
    opacity: 0.8;
    animation: bounce 2.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(10px); }
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */
.stats-bar {
    background: var(--cg-gold);
    padding: 2.5rem var(--cg-space-md);
}

.stats-bar__inner {
    max-width: var(--cg-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item__value {
    font-family: var(--cg-font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    font-style: italic;
    color: var(--cg-black);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-item__suffix {
    font-style: normal;
}

.stat-item__label {
    font-family: var(--cg-font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--cg-black-70);
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
.section {
    padding: var(--cg-space-xl) 0;
}

.section--alt {
    background-color: var(--cg-dark);
}

.section--dark {
    background-color: var(--cg-primary-dark);
    color: var(--cg-white);
}

.section--dark h2,
.section--dark h3 {
    color: var(--cg-white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--cg-space-lg);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--cg-gold);
    margin: 1.25rem auto 0;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--cg-text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   About / Welcome Section
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cg-space-lg);
    align-items: center;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--cg-cream);
    opacity: 0.85;
}

.about-text p:first-of-type::first-letter {
    font-family: var(--cg-font-heading);
    font-size: 3.5rem;
    float: left;
    line-height: 1;
    margin-right: 0.5rem;
    color: var(--cg-accent);
}

.about-image {
    position: relative;
    min-width: 0;
}

.about-image img {
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* About section carousel */
.about-carousel {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 380px;
}

.about-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.about-carousel__slide.active {
    opacity: 1;
}

.about-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    display: block;
}

.about-carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-carousel__btn:hover { background: rgba(0, 0, 0, 0.65); }
.about-carousel__btn--prev { left: 0.6rem; }
.about-carousel__btn--next { right: 0.6rem; }

.about-image::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 1px solid var(--cg-gold);
    z-index: -1;
}

/* ==========================================================================
   Photo Gallery (Masonry-style)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gallery-grid .gallery-item {
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    aspect-ratio: 4 / 3;
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--cg-transition-slow);
}

.gallery-grid .gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-grid .gallery-item--wide {
    grid-column: span 2;
}

.gallery-grid .gallery-item--tall {
    grid-row: span 2;
}

/* ============================================================================
   Apartment detail page gallery — works with any photo count (5, 7, 10, 12...)
   Uses uniform grid (no "wide" items) for predictable layout.
   ============================================================================ */
.apartment-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: var(--cg-space-lg);
}

.apartment-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apartment-gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.apartment-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.apartment-gallery-item:hover img {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .apartment-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .apartment-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Apartments Cards
   ========================================================================== */

/* 3+2 grid using 6-column base: first 3 span 2 each; last 2 centered */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.apartments-grid .apartment-card:nth-child(1),
.apartments-grid .apartment-card:nth-child(2),
.apartments-grid .apartment-card:nth-child(3) {
    grid-column: span 2;
}

.apartments-grid .apartment-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.apartments-grid .apartment-card:nth-child(5) {
    grid-column: 4 / span 2;
}

/* Fallback for ≠5 cards: reset to auto layout */
.apartments-grid--auto {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.apartments-grid--auto .apartment-card {
    grid-column: auto !important;
}

/* Card */
.apartment-card {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color 0.25s ease;
    background: var(--cg-dark);
    cursor: pointer;
}

.apartment-card:hover {
    border-color: var(--cg-gold);
}

.apartment-card__wrap {
    display: block;
    text-decoration: none;
}

/* Image container */
.apartment-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.apartment-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.apartment-card:hover .apartment-card__image img {
    transform: scale(1.06);
}

.apartment-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--cg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Name bar (gradient overlay, always visible) */
.apartment-card__name-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    padding: 3rem 1.25rem 1.1rem;
    font-family: var(--cg-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    color: #ffffff;
    transition: opacity 0.25s ease;
}

.apartment-card:hover .apartment-card__name-bar {
    opacity: 0;
}

/* Hover overlay */
.apartment-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,9,8,0.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    text-align: center;
}

.apartment-card:hover .apartment-card__overlay {
    opacity: 1;
}

.apartment-card__overlay-title {
    font-family: var(--cg-font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.apartment-card__overlay-specs {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--cg-cream);
    font-family: var(--cg-font-body);
    font-size: 0.82rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.apartment-card__overlay-specs span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.apartment-card__overlay-cta {
    display: inline-block;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--cg-gold);
    border-bottom: 1px solid var(--cg-gold);
    padding-bottom: 2px;
    text-decoration: none;
}

/* Placeholder card styling */
.apartment-card--placeholder .apartment-card__image {
    background: rgba(201,169,110,0.06);
}

/* ==========================================================================
   Pull Quote
   ========================================================================== */
.pull-quote {
    background: var(--cg-dark);
    padding: var(--cg-space-xl) var(--cg-space-md);
    text-align: center;
    border-top: 1px solid var(--cg-border);
    border-bottom: 1px solid var(--cg-border);
}

.pull-quote__inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
}

.pull-quote__mark {
    display: block;
    font-family: var(--cg-font-heading);
    font-size: 8rem;
    line-height: 0.5;
    color: var(--cg-gold);
    opacity: 0.35;
    margin-bottom: 1rem;
    pointer-events: none;
    user-select: none;
}

.pull-quote__text {
    font-family: var(--cg-font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    font-style: italic;
    color: var(--cg-gold);
    line-height: 1.4;
    margin: 0 0 1.5rem;
    border: none;
    padding: 0;
}

.pull-quote__attr {
    display: block;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cg-muted);
}

/* ==========================================================================
   Services / Features
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--cg-space-md);
}

.service-item {
    text-align: center;
    padding: var(--cg-space-md);
}

.service-item__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--cg-space-sm);
    color: var(--cg-accent);
}

.service-item__icon svg {
    width: 100%;
    height: 100%;
}

.service-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.service-item p {
    font-size: 0.95rem;
    color: var(--cg-text-light);
}

/* Eco Section */
.eco-section {
    background: var(--cg-primary-dark);
    color: var(--cg-white);
    border-radius: 8px;
    padding: var(--cg-space-lg);
    margin-top: var(--cg-space-lg);
}

.eco-section h3 {
    color: var(--cg-accent-light);
    margin-bottom: var(--cg-space-sm);
}

.eco-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.eco-list li {
    padding-left: 1.75rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.eco-list li::before {
    content: '🌿';
    position: absolute;
    left: 0;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    background: var(--cg-black);
    padding: var(--cg-space-xl) 0;
    border-top: 1px solid var(--cg-border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--cg-space-xl);
    align-items: start;
}

.contact-info .section-label { color: var(--cg-gold); }
.contact-info h2 { color: var(--cg-cream); margin-bottom: 0.5rem; }
.contact-subtitle { color: var(--cg-muted); font-size: 0.95rem; margin-bottom: var(--cg-space-md); }

.contact-info p { margin-bottom: 0.5rem; color: var(--cg-cream); opacity: 0.85; font-weight: 300; }
.contact-info a { color: var(--cg-gold); }
.contact-info a:hover { color: var(--cg-gold-lt); }

/* Contact Form */
.contact-form .form-group { margin-bottom: 1.25rem; }

.contact-form label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
    color: var(--cg-muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--cg-font-body);
    font-size: 0.95rem;
    font-weight: 300;
    border: 1px solid var(--cg-border);
    background: rgba(255,255,255,0.04);
    color: var(--cg-cream);
    transition: border-color var(--cg-transition);
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
}

.contact-form select option { background: var(--cg-dark); color: var(--cg-cream); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--cg-muted); }

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus { border-color: var(--cg-gold); }

.contact-form textarea { height: 120px; resize: vertical; }

.contact-form .btn-submit {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--cg-gold);
    color: var(--cg-black);
    border: none;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: background var(--cg-transition);
}

.contact-form .btn-submit:hover { background: var(--cg-gold-lt); }

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
    background: var(--cg-dark);
    color: var(--cg-muted);
    padding: var(--cg-space-xl) 0 var(--cg-space-md);
    border-top: 1px solid var(--cg-gold);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--cg-space-lg);
    padding-bottom: var(--cg-space-lg);
    border-bottom: 1px solid var(--cg-border);
    margin-bottom: var(--cg-space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo img { height: 60px; width: auto; }

.footer-logo__name {
    font-family: var(--cg-font-heading);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--cg-cream);
}

.footer-tagline {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--cg-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.footer-social a {
    color: var(--cg-muted);
    transition: color var(--cg-transition);
    display: flex;
}

.footer-social a:hover { color: var(--cg-gold); }

.footer-col__title {
    font-family: var(--cg-font-body);
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--cg-gold);
    margin-bottom: 1.25rem;
}

.footer-col--nav .footer-nav { list-style: none; }
.footer-col--nav .footer-nav li { margin-bottom: 0.6rem; }
.footer-col--nav .footer-nav a {
    color: var(--cg-muted);
    font-size: 0.85rem;
    font-weight: 300;
    text-decoration: none;
    transition: color var(--cg-transition);
}
.footer-col--nav .footer-nav a:hover { color: var(--cg-cream); }

.footer-col--contact p {
    color: var(--cg-muted);
    font-size: 0.85rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}
.footer-col--contact a { color: var(--cg-muted); }
.footer-col--contact a:hover { color: var(--cg-gold); }

.footer-bottom {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--cg-muted);
    opacity: 0.7;
}

.footer-bottom a { color: var(--cg-muted); }
.footer-bottom a:hover { color: var(--cg-cream); }

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 60px;
    height: 60px;
    background: var(--cg-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: transform var(--cg-transition), box-shadow var(--cg-transition);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--cg-white);
}

.whatsapp-float .whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--cg-transition);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
}

@keyframes whatsapp-pulse {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--cg-font-body);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--cg-transition), color var(--cg-transition), border-color var(--cg-transition);
    text-decoration: none;
    display: inline-block;
}

/* Primary: gold fill, black text */
.btn--primary {
    background: var(--cg-gold);
    color: var(--cg-black);
    border-color: var(--cg-gold);
}
.btn--primary:hover {
    background: var(--cg-gold-lt);
    border-color: var(--cg-gold-lt);
    color: var(--cg-black);
}

/* Outline: gold border, gold text → fill on hover */
.btn--outline {
    background: transparent;
    color: var(--cg-gold);
    border-color: var(--cg-gold);
}
.btn--outline:hover {
    background: var(--cg-gold);
    color: var(--cg-black);
}

/* Light: ghost white, used on hero */
.btn--light {
    background: transparent;
    color: var(--cg-cream);
    border-color: rgba(255,255,255,0.55);
}
.btn--light:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.85);
    color: var(--cg-white);
}

/* Force button colors against generic .contact-info a / .contact-section a / footer a overrides */
.contact-info a.btn,
.contact-section a.btn,
.footer-col a.btn,
section a.btn,
.cg-reveal a.btn {
    color: var(--cg-black);
    text-decoration: none;
}

.contact-info a.btn--primary,
.contact-section a.btn--primary,
.footer-col a.btn--primary,
section a.btn--primary,
.cg-reveal a.btn--primary {
    background: var(--cg-gold);
    color: var(--cg-black);
    border-color: var(--cg-gold);
}

.contact-info a.btn--primary:hover,
.contact-section a.btn--primary:hover,
.footer-col a.btn--primary:hover,
section a.btn--primary:hover,
.cg-reveal a.btn--primary:hover {
    background: var(--cg-gold-lt);
    border-color: var(--cg-gold-lt);
    color: var(--cg-black);
}

/* Same defensive override for outline variant */
.contact-info a.btn--outline,
.contact-section a.btn--outline,
.footer-col a.btn--outline,
section a.btn--outline,
.cg-reveal a.btn--outline {
    color: var(--cg-gold);
    background: transparent;
}
.contact-info a.btn--outline:hover,
.contact-section a.btn--outline:hover,
.footer-col a.btn--outline:hover,
section a.btn--outline:hover,
.cg-reveal a.btn--outline:hover {
    background: var(--cg-gold);
    color: var(--cg-black);
}

/* ==========================================================================
   Page Templates
   ========================================================================== */

/* Single Apartment Page */
.apartment-hero {
    height: 60vh;
    min-height: 400px;
    position: relative;
    margin-top: var(--cg-header-height);
}

.apartment-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apartment-details {
    padding: var(--cg-space-lg) 0;
}

.apartment-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: var(--cg-space-md);
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--cg-light-bg);
    border-radius: 4px;
    font-size: 0.95rem;
}

.amenity-item svg {
    width: 20px;
    height: 20px;
    color: var(--cg-accent);
    flex-shrink: 0;
}

/* Map Section */
.map-section {
    height: 400px;
    background: var(--cg-light-bg);
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   WordPress Classes (required)
   ========================================================================== */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--cg-text-muted); padding: 0.5rem 0; }
.alignleft { float: left; margin: 0 1.5rem 1.5rem 0; }
.alignright { float: right; margin: 0 0 1.5rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }
.gallery-caption { display: block; }
.bypostauthor { display: block; }
.sticky { display: block; }
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet: 768px–1200px */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col--brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--cg-space-md);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--cg-space-lg);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Apartments: 2-col on tablet */
    .apartments-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .apartments-grid .apartment-card:nth-child(1),
    .apartments-grid .apartment-card:nth-child(2) {
        grid-column: span 2;
    }
    .apartments-grid .apartment-card:nth-child(3),
    .apartments-grid .apartment-card:nth-child(4) {
        grid-column: span 2;
    }
    .apartments-grid .apartment-card:nth-child(5) {
        grid-column: 2 / span 2;
    }
}

/* Mobile: <768px */
@media (max-width: 768px) {
    :root {
        --cg-header-height: 60px;
    }

    /* Header */
    .header-inner {
        height: 60px;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .site-logo .logo-subtitle { display: none; }
    .site-logo .logo-text { font-size: 1.1rem; }
    .site-logo img { height: 46px; }

    .header-book-btn { display: none; }

    .menu-toggle {
        display: block;
        flex-shrink: 0;
    }

    /* Full-screen mobile nav overlay */
    .main-navigation {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: var(--cg-black);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation.active {
        opacity: 1;
        pointer-events: auto;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }

    .main-navigation a {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
        letter-spacing: 0.08em;
    }

    .main-navigation .sub-menu {
        position: static;
        background: transparent;
        border: none;
        display: none;
        text-align: center;
        padding: 0;
        min-width: 0;
    }

    .main-navigation li.menu-item-has-children.active > .sub-menu { display: block; }

    .header-lang-inline { flex-shrink: 0; }

    /* Hero */
    .hero { height: 100svh; }
    .hero-content h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
    .hero-content { padding-top: 60px; }

    /* Stats bar */
    .stats-bar__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* About: single column */
    .about-content { grid-template-columns: 1fr; }

    /* Apartments: single column */
    .apartments-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .apartments-grid .apartment-card { grid-column: auto !important; }

    /* Pull quote */
    .pull-quote__text { font-size: clamp(1.2rem, 4vw, 1.75rem); }
    .pull-quote__mark { font-size: 5rem; }

    /* Sections */
    .section { padding: var(--cg-space-lg) 0; }

    /* Gallery */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid .gallery-item--wide { grid-column: span 1; }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--cg-space-md);
    }
    .footer-col--brand { grid-column: auto; }

    /* Host intro */
    .host-intro { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.25rem; }
    .stats-bar__inner { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-item__value { font-size: 1.75rem; }

    .whatsapp-float { width: 50px; height: 50px; bottom: 1.5rem; right: 1.5rem; }
    .whatsapp-float svg { width: 26px; height: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cg-reveal, .cg-reveal--left, .cg-reveal--right, .cg-reveal--scale, .cg-reveal--fade {
        opacity: 1; transform: none; transition: none;
    }
    .hero-slide img { transform: none !important; }
    .hero-content { animation: none; }
    .bounce { animation: none; }
    .stats-bar { opacity: 1; transform: none; }
}

/* ============================================================================
   v1.3.3 — Dove Siamo page layout fix (revised)
   Use display:flow-root instead of overflow:hidden to contain margins
   without clipping the "How to get here" section.
   ============================================================================ */

/* Establish block formatting context — contains child margins, doesn't clip */
#dove-siamo-content {
    display: flow-root;
    padding-bottom: 0 !important;
}

#dove-siamo-content .map-section {
    display: block;
    position: relative;
    margin-bottom: 1.5rem;
    height: auto;
    background: transparent;
}

/* Leaflet map — keep stacking context low so it doesn't overlay other content */
#cg-map.leaflet-map {
    position: relative;
    z-index: 1;
    height: 450px;
}

/* Force the directions list to render below the map with proper spacing */
#dove-siamo-content .map-directions {
    display: block;
    margin-top: var(--cg-space-xl);
    clear: both;
}

#dove-siamo-content .directions-list {
    display: grid;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: var(--cg-space-md) 0;
}

#dove-siamo-content .directions-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: transparent;
    border: 1px solid var(--cg-border);
    padding: 1.25rem;
}

#dove-siamo-content .directions-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Fix 2 (v1.3.2): Increase text contrast in Contattaci section
   The "Prenota direttamente per il miglior prezzo", phone, and email
   were rendered with too-low opacity making them nearly invisible. */
.contact-section .contact-subtitle,
.contact-info .contact-subtitle {
    color: var(--cg-cream);
    opacity: 0.95;
}

.contact-section a[href^="tel:"],
.contact-section a[href^="mailto:"],
.contact-info a[href^="tel:"],
.contact-info a[href^="mailto:"] {
    color: var(--cg-gold);
    opacity: 1;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.contact-section a[href^="tel:"]:hover,
.contact-section a[href^="mailto:"]:hover,
.contact-info a[href^="tel:"]:hover,
.contact-info a[href^="mailto:"]:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Form labels — ensure they're readable on dark background */
.contact-form label,
.cg-contact-form label {
    color: var(--cg-cream);
    opacity: 0.9;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Form fields themselves */
.contact-form input,
.contact-form textarea,
.contact-form select,
.cg-contact-form input,
.cg-contact-form textarea,
.cg-contact-form select {
    color: var(--cg-cream);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cg-border);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder,
.cg-contact-form input::placeholder,
.cg-contact-form textarea::placeholder {
    color: var(--cg-cream);
    opacity: 0.4;
}

/* Section spacing — give footer breathing room */
.contact-section {
    padding-top: var(--cg-space-xl);
    padding-bottom: var(--cg-space-xl);
}

/* ============================================================================
   v1.3.5 — Directions list flex fix
   Previous layout had .directions-list li as flex-row with icon + nested div.
   Long text would wrap and "hhhhhh" appeared next to icon instead of below
   the strong heading. New layout: icon stays fixed, content stacks vertically
   inside its own column.
   ============================================================================ */

#dove-siamo-content .directions-list li,
.map-directions .directions-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: transparent;
    border: 1px solid var(--cg-border);
    padding: 1.25rem;
}

.directions-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 0; /* prevents flex children from overflowing parent */
}

.directions-content strong {
    color: var(--cg-cream);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.directions-content span {
    color: var(--cg-cream);
    opacity: 0.85;
    font-weight: 300;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.map-directions h3 {
    color: var(--cg-cream);
    font-family: var(--cg-font-heading);
    font-style: italic;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

/* ============================================================================
   v1.4.0 — Dedicated Contattaci page
   ============================================================================ */

/* Honeypot — hide visually but keep accessible to bots */
.cg-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.contattaci-page {
    padding: var(--cg-space-xl) 0;
}

.contattaci-intro {
    max-width: 700px;
    margin: 0 auto var(--cg-space-xl);
    text-align: center;
    color: var(--cg-cream);
    opacity: 0.85;
    font-weight: 300;
    line-height: 1.7;
}

.contattaci-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--cg-space-xl);
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.contattaci-info {
    padding: var(--cg-space-md) 0;
}

.contattaci-info .section-label {
    color: var(--cg-gold);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-bottom: var(--cg-space-md);
}

.contattaci-info__item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--cg-border);
    color: var(--cg-cream);
}

.contattaci-info__item:last-of-type {
    border-bottom: none;
}

.contattaci-info__item svg {
    color: var(--cg-gold);
    flex-shrink: 0;
    margin-top: 2px;
}

.contattaci-info__item a {
    color: var(--cg-cream);
    text-decoration: none;
    font-weight: 300;
    transition: color 0.2s ease;
}

.contattaci-info__item a:hover {
    color: var(--cg-gold);
}

.contattaci-info__item--address {
    align-items: flex-start;
}

.contattaci-info__item--address span {
    font-weight: 300;
    line-height: 1.6;
    color: var(--cg-cream);
    opacity: 0.85;
}

.contattaci-info__whatsapp {
    margin-top: var(--cg-space-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contattaci-info__whatsapp svg {
    flex-shrink: 0;
}

.contattaci-form-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--cg-border);
    padding: var(--cg-space-lg);
}

.contattaci-form-heading {
    font-family: var(--cg-font-heading);
    font-style: italic;
    color: var(--cg-cream);
    font-size: 1.6rem;
    margin: 0 0 var(--cg-space-md);
}

.form-required-note {
    font-size: 0.75rem;
    color: var(--cg-muted);
    opacity: 0.7;
    margin: 0.5rem 0 1rem;
}

@media (max-width: 768px) {
    .contattaci-grid {
        grid-template-columns: 1fr;
        gap: var(--cg-space-lg);
    }
    .contattaci-form-wrapper {
        padding: var(--cg-space-md);
    }
}

/* ============================================================================
   v1.4.1 — Apartment hero vignette
   The apartment-specific hero uses a soft radial vignette behind the
   title instead of a full dark overlay. Image stays bright at the edges,
   only a subtle halo behind the title provides reading contrast.
   Generic .hero-overlay (homepage) is unchanged.
   ============================================================================ */

.apartment-hero .hero-overlay {
    background: radial-gradient(
        ellipse 60% 45% at center,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.35) 35%,
        rgba(0, 0, 0, 0.15) 65%,
        rgba(0, 0, 0, 0) 100%
    );
}

.apartment-hero .hero-content h1 {
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.85),
        0 1px 4px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.01em;
}

.apartment-hero .hero-content .hero-subtitle {
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.85),
        0 1px 3px rgba(0, 0, 0, 0.7);
    opacity: 0.95;
}

@media (max-width: 768px) {
    .apartment-hero .hero-overlay {
        background: radial-gradient(
            ellipse 90% 50% at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0.15) 70%,
            rgba(0, 0, 0, 0) 100%
        );
    }
}

/* ============================================================================
   v1.4.5 — "Chi sono" host intro: wider columns + better typography
   Was: 3 columns at ~280px each (narrow container, default gap)
   Now: 3 columns at ~360-400px each, more gap, line-height tweak.
   Ragged-right kept (better than justify in narrow columns — fewer rivers
   of whitespace between words).
   ============================================================================ */

#chi-sono .host-intro {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    gap: var(--cg-space-lg);
}

#chi-sono .host-intro__block {
    padding: var(--cg-space-md) var(--cg-space-md) var(--cg-space-lg);
}

#chi-sono .host-intro__block h4 {
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
}

#chi-sono .host-intro__block p,
#chi-sono .host-intro__block {
    line-height: 1.75;
    text-align: left; /* explicit ragged-right — readable in 350-400px columns */
    hyphens: none; /* disable browser auto-hyphenation, looks cleaner here */
}

/* Tablet: 2 columns at ~450px each */
@media (max-width: 1024px) {
    #chi-sono .host-intro {
        grid-template-columns: 1fr 1fr;
        max-width: 920px;
    }
}

/* Mobile: 1 column full width */
@media (max-width: 700px) {
    #chi-sono .host-intro {
        grid-template-columns: 1fr;
        max-width: 600px;
        gap: var(--cg-space-md);
    }
}

/* ============================================================================
   v1.4.6 — Mobile responsiveness audit fixes
   ============================================================================ */

/* 1. Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 2. Touch-friendly tap targets (Apple HIG 44px min) */
@media (max-width: 768px) {
    .btn,
    .header-book-btn,
    .lang-btn,
    .menu-toggle,
    .main-navigation a,
    .footer-col a,
    .contact-info a,
    .nav-cta a,
    a.btn,
    button.btn-submit,
    .apartment-card__link,
    .whatsapp-float {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Lang switcher: ensure ≥44px wide tap target (IT/EN text is narrow) */
    .lang-btn {
        min-width: 44px;
        justify-content: center;
    }

    /* font-size 16px prevents iOS Safari auto-zoom on input focus */
    .contact-form input,
    .contact-form textarea,
    .contact-form select,
    .cg-contact-form input,
    .cg-contact-form textarea,
    .cg-contact-form select,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px !important;
        padding: 0.75rem 1rem;
    }

    textarea {
        min-height: 100px;
    }
}

/* 3. Hero — better mobile sizing */
@media (max-width: 768px) {
    .hero {
        height: 100svh;
        min-height: 500px;
    }

    .hero-content {
        padding: var(--cg-space-md);
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 9vw, 3rem);
        line-height: 1.15;
    }

    .hero-eyebrow {
        font-size: 0.65rem;
        margin-bottom: 1rem;
    }

    .hero-content .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-scroll {
        bottom: 1.5rem;
    }
}

/* 4. Map — reduce height on mobile */
@media (max-width: 768px) {
    #cg-map.leaflet-map,
    .leaflet-map {
        height: 320px;
    }

    .map-section {
        margin-bottom: var(--cg-space-md);
    }

    .map-addresses {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* 5. Apartment detail page — mobile padding */
@media (max-width: 768px) {
    .apartment-hero {
        height: 60svh;
        min-height: 400px;
    }

    .apartment-meta-bar {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .apartment-meta-bar .meta-item {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* 6. Contattaci page — single column on mobile */
@media (max-width: 768px) {
    .contattaci-grid {
        grid-template-columns: 1fr;
        gap: var(--cg-space-md);
    }

    .contattaci-info,
    .contattaci-form-wrapper {
        padding: 1rem;
    }
}

/* 7. WhatsApp floater — shift up above sticky CTA bar */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

/* 8. Footer mobile — better spacing */
@media (max-width: 768px) {
    .footer-grid {
        gap: var(--cg-space-lg);
    }

    .footer-col {
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
        font-size: 0.75rem;
    }
}

/* 9. Sections — tighter padding on mobile */
@media (max-width: 768px) {
    .section {
        padding: var(--cg-space-lg) 0;
    }

    .section-header {
        margin-bottom: var(--cg-space-md);
    }
}

/* 10. Tables — horizontally scrollable on mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* 11. Image safety — never overflow viewport */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* 12. Smooth scroll for anchor links */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* 13. Disable hover-only effects on touch devices */
@media (hover: none) {
    .apartment-card:hover {
        transform: none;
    }

    .service-item:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }
}

/* v1.x — fix: distances-grid overlap with footer on Dove Siamo page */
.distances-grid {
    margin-bottom: var(--cg-space-lg);
}

/* fix v1.x — Dove Siamo: map/distances overlap with footer */
.map-section {
    overflow: visible;
}
.site-footer {
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   v1.6.0 Virtual Tour 360°
   ========================================================================== */

.virtual-tour-section {
    width: 100%;
}

.virtual-tour-heading {
    font-family: var(--cg-font-heading);
    font-size: 1.75rem;
    color: var(--cg-gold);
    margin-bottom: var(--cg-space-sm);
    letter-spacing: 0.05em;
}

/* Viewer wrapper — Pannellum fills this absolutely */
.virtual-tour-viewer {
    position: relative;
    width: 100% !important;
    height: 520px !important;
    min-height: 520px !important;
    border-radius: 8px;
    overflow: hidden;
    background: var(--cg-dark);
}

/* Loading placeholder shown before fetch completes */
.virtual-tour-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cg-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.virtual-tour-error {
    padding: var(--cg-space-md);
    color: var(--cg-muted);
    font-size: 0.9rem;
    text-align: center;
}

/* --- Pannellum UI overrides — match dark luxury theme --- */

/* Container background */
.virtual-tour-viewer .pnlm-container {
    background: var(--cg-dark);
    font-family: var(--cg-font-body);
}

/* Control buttons */
.virtual-tour-viewer .pnlm-controls button,
.virtual-tour-viewer .pnlm-controls-container .pnlm-zoom-controls button {
    background: rgba(26, 23, 20, 0.85);
    border: 1px solid var(--cg-gold);
    color: var(--cg-gold);
    border-radius: 4px;
}

.virtual-tour-viewer .pnlm-controls button:hover {
    background: var(--cg-gold);
    color: var(--cg-dark);
}

/* Fullscreen button */
.virtual-tour-viewer .pnlm-fullscreen-toggle-button {
    background: rgba(26, 23, 20, 0.85);
    border: 1px solid var(--cg-gold);
}

/* Loading overlay */
.virtual-tour-viewer .pnlm-load-box {
    background: rgba(10, 9, 8, 0.9);
    color: var(--cg-gold-lt);
    border: 1px solid rgba(201, 169, 110, 0.3);
    border-radius: 4px;
}

.virtual-tour-viewer .pnlm-lbar {
    background: rgba(201, 169, 110, 0.2);
    border: 1px solid rgba(201, 169, 110, 0.3);
}

.virtual-tour-viewer .pnlm-lbar-fill {
    background: var(--cg-gold);
}

/* Hotspot tooltip */
.virtual-tour-viewer .pnlm-tooltip span {
    background: rgba(26, 23, 20, 0.95);
    color: var(--cg-cream);
    border: 1px solid rgba(201, 169, 110, 0.4);
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.virtual-tour-viewer .pnlm-tooltip span:after {
    border-top-color: rgba(26, 23, 20, 0.95);
}

/* Scene hotspot colour */
.virtual-tour-viewer .pnlm-scene-hotspot svg {
    fill: var(--cg-gold);
}

/* Info hotspot colour */
.virtual-tour-viewer .pnlm-info-hotspot svg {
    fill: var(--cg-gold-lt);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .virtual-tour-viewer {
	height: 320px !important;
	min-height: 320px !important;
        border-radius: 0;
    }

    .virtual-tour-heading {
        font-size: 1.4rem;
    }
}
/* ==========================================================================
   v1.6.0 — Virtual Tour: Pannellum hotspot styling
   ========================================================================== */

/* Tooltip — labelka po najechaniu */
.pnlm-hotspot-base span {
    background-color: rgba(249, 246, 241, 0.95) !important;
    color: var(--cg-text, #2a2420) !important;
    border: 1px solid var(--cg-gold, #a07840) !important;
    border-radius: 4px !important;
    padding: 4px 12px !important;
    font-family: var(--cg-font-body) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    white-space: nowrap !important;
}

/* Strzałka hotspotu — obramowanie złote */
.pnlm-scene .pnlm-hotspot-base {
    border-color: var(--cg-gold, #a07840) !important;
    opacity: 0.9;
}

.pnlm-scene .pnlm-hotspot-base:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ==========================================================================
   v1.7.1 — Map overrides
   ========================================================================== */

#cg-map.leaflet-map { height: 350px; }

/* ==========================================================================
   v1.7.0 — Feature Cards
   ========================================================================== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--cg-space-md);
    margin-top: var(--cg-space-lg);
}

.feature-card {
    border: 1px solid var(--cg-border);
    border-radius: 8px;
    padding: var(--cg-space-md);
    text-align: center;
    background: var(--cg-white, #fff);
    transition: box-shadow var(--cg-transition);
}

.feature-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.feature-card__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card__title {
    font-family: var(--cg-font-heading);
    font-size: 1.1rem;
    color: var(--cg-text);
    margin-bottom: 0.5rem;
}

.feature-card__text {
    font-size: 0.9rem;
    color: var(--cg-text-light, var(--cg-muted));
    line-height: 1.6;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   v1.8.0 — Virtual Tour Page (cg_tour CPT)
   ============================================================================= */

/* --- Tour Grid --- */
.cg-tour-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cg-space-md);
}

@media (max-width: 900px) {
    .cg-tour-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .cg-tour-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Tour Card --- */
.cg-tour-card {
    font: inherit;
    padding: 0;
    cursor: pointer;
    text-align: left;
    background: transparent;
    border: 1px solid var(--cg-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cg-tour-card:hover,
.cg-tour-card:focus-visible {
    border-color: var(--cg-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    outline: none;
}

/* --- Card Media --- */
.cg-tour-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--cg-dark);
    overflow: hidden;
}

.cg-tour-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 360° badge --- */
.cg-tour-card__badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: transparent;
    border: 1px solid var(--cg-gold);
    color: var(--cg-gold);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
}

/* --- Card Body --- */
.cg-tour-card__body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1 1 auto;
}

.cg-tour-card__title {
    font-family: var(--cg-font-heading);
    font-size: 1.1rem;
    color: var(--cg-text);
    margin: 0 0 0.4rem;
}

.cg-tour-card__desc {
    font-size: 0.85rem;
    color: var(--cg-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- Modal (native <dialog>) --- */
.cg-tour-modal {
    width: min(1100px, 92vw);
    border: 1px solid rgba(201, 169, 110, 0.4);
    border-radius: 10px;
    padding: 0;
    background: var(--cg-dark);
    overflow: hidden;
}

.cg-tour-modal::backdrop {
    background: rgba(8, 7, 6, 0.85);
}

/* --- Viewer — explicit height for Safari --- */
.cg-tour-viewer {
    width: 100%;
    height: 80vh;
    min-height: 80vh;
    background: var(--cg-dark);
    display: block;
}

/* --- Modal title --- */
.cg-tour-modal__title {
    font-family: var(--cg-font-heading);
    font-size: 1.1rem;
    color: var(--cg-text);
    margin: 0;
    padding: 0.75rem 3.5rem 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(201, 169, 110, 0.2);
}

/* --- Close button ≥44×44px touch target --- */
.cg-tour-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    color: var(--cg-text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0;
    transition: color 0.15s;
    z-index: 1;
}

.cg-tour-modal__close:hover {
    color: var(--cg-gold);
}

/* --- Error message inside viewer --- */
.cg-tour-error {
    color: var(--cg-muted);
    text-align: center;
    padding: 2rem;
}

/* --- Mobile — fullscreen modal, body fill via dvh, no white bar under address bar --- */
@media (max-width: 600px) {
    .cg-tour-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .cg-tour-modal__title {
        flex: 0 0 auto;
    }

    /* flex:1 bypasses the 100vh Safari bug — viewer fills remaining space */
    .cg-tour-viewer {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }
}
