/* =========================================================================
   DIMORE DEI MARINAI - LUXURY & MODERN RESTYLING
   ========================================================================= */

:root {
    --lux-bg-light: #f8f9fa;
    --lux-bg-white: #ffffff;
    --lux-text-main: var(--theme-body-color, #4a4a4a);
    --lux-text-dark: var(--theme-heading-color, #1a1a1a);
    --lux-primary: var(--theme-primary, #007bce);
    --lux-secondary: #d4af37; /* Elegance Gold */
    
    --lux-radius-sm: 8px;
    --lux-radius-md: 16px;
    --lux-radius-lg: 24px;
    
    --lux-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --lux-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.12);
    --lux-shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    --lux-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Restyling */
body {
    background-color: var(--lux-bg-light) !important;
    color: var(--lux-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Sovrascrivo i font hard-coded di main.css per usare quelli scelti dall'admin */
h1, h2, h3, h4, h5, h6, 
#header h1, 
#header nav > ul > li > a, 
.dropotron > li > a,
.lux-card-title,
.lux-hero-title {
    font-family: var(--font-heading, inherit) !important;
}

body, p, span, a, div, li, .lux-description {
    font-family: var(--font-body, inherit);
}

/* Glassmorphism Utilities */
.lux-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--lux-shadow-glass);
    border-radius: var(--lux-radius-md);
}

.lux-glass-dark {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}

/* Buttons */
.lux-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--lux-transition);
    border: none;
    text-decoration: none;
}

.lux-btn-primary {
    background: var(--lux-primary);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 123, 206, 0.3);
}

.lux-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 206, 0.4);
    background: var(--lux-primary);
    filter: brightness(0.9);
}

.lux-btn-outline {
    background-color: transparent !important;
    color: var(--lux-primary) !important;
    border: 2px solid var(--lux-primary) !important;
}

.lux-btn-outline:hover {
    background-color: var(--lux-primary) !important;
    color: #ffffff !important;
}

/* =========================================================================
   HEADER, NAVIGATION & FOOTER (THEME SYNC)
   ========================================================================= */

/* Header e Menu (Desktop) */
#header:not(.alt), .dropotron {
    background-color: var(--lux-primary) !important;
}

#header:not(.alt) nav > ul > li > a, 
#header:not(.alt) nav > ul > li > a:visited,
#header:not(.alt) nav > ul > li > a:link,
.dropotron > li > a,
.dropotron > li > a:visited,
.dropotron > li > a:link {
    color: #ffffff !important;
}

.dropotron > li > a:hover {
    background-color: rgba(255,255,255,0.1) !important;
    color: #ffffff !important;
}

/* Footer Sync */
#footer {
    background-color: var(--lux-primary) !important;
}

#footer h2, #footer h3, #footer strong {
    color: #ffffff !important;
}

#footer p, #footer a, #footer .copyright,
#footer a:visited, #footer a:link {
    color: #ffffff !important;
}

#footer ul.menu li {
    border: none !important;
    padding: 0 !important;
}

#footer ul.menu li a,
#footer ul.menu li a:visited,
#footer ul.menu li a:link {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--lux-transition);
}

#footer ul.menu li a:hover {
    color: var(--lux-bg-white) !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
    #footer ul.menu {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* =========================================================================
   ROOM DETAIL PAGE (DIMORA.PHP)
   ========================================================================= */

/* Hero Banner */
.lux-room-hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: flex-end;
    padding-bottom: 50px;
}

.lux-room-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
}

.lux-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.lux-hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.lux-hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Two Column Layout */
.lux-room-container {
    max-width: 1200px;
    margin: -40px auto 60px auto;
    position: relative;
    z-index: 10;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.lux-room-main {
    flex: 1 1 600px;
}

.lux-room-sidebar {
    flex: 0 0 350px;
    position: sticky;
    top: 100px;
}

/* Content Blocks */
.lux-card {
    background: var(--lux-bg-white);
    border-radius: var(--lux-radius-md);
    padding: 40px;
    box-shadow: var(--lux-shadow-soft);
    margin-bottom: 30px;
}

.lux-card-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--lux-text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lux-card-title i {
    color: var(--lux-primary);
}

.lux-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--lux-text-main);
}

/* Amenities Grid */
.lux-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.lux-amenity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--lux-bg-light);
    border-radius: var(--lux-radius-sm);
    transition: var(--lux-transition);
}

.lux-amenity-item:hover {
    background: var(--lux-bg-white);
    box-shadow: var(--lux-shadow-soft);
    transform: translateY(-2px);
}

.lux-amenity-item i {
    font-size: 1.5rem;
    color: var(--lux-primary);
}

/* Masonry Gallery */
.lux-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-gap: 15px;
    grid-auto-flow: dense;
}

.lux-gallery-item {
    border-radius: var(--lux-radius-sm);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    height: 200px;
}

.lux-gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
    height: 415px;
}

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

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

/* Booking Widget */
.lux-booking-widget {
    padding: 30px;
}

.lux-price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--lux-text-dark);
    margin-bottom: 5px;
}

.lux-price-tag span {
    font-size: 1rem;
    font-weight: 400;
    color: #888;
}

.lux-booking-info {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.lux-booking-info div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--lux-text-main);
}

/* =========================================================================
   MOBILE FIXES (LOGO, NAV PANEL, RESPONSIVE)
   ========================================================================= */

/* Menu laterale mobile: usa il colore accento del tema */
#navPanel {
    background-color: var(--lux-primary) !important;
}

#navPanel .link {
    color: #ffffff !important;
    border-top-color: rgba(255,255,255,0.1) !important;
}

#navPanel .close:before {
    color: #ffffff !important;
}

@media screen and (max-width: 980px) {
    #header h1 {
        position: absolute !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        margin: 0 !important;
        padding-left: 15px !important;
        padding-top: 8px !important;
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        line-height: normal !important;
    }

    #header h1 a {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        line-height: normal !important;
    }

    #header h1 img {
        margin: 0 !important;
        max-height: 40px !important;
        width: auto !important;
        max-width: 70vw !important;
        display: block !important;
    }

    /* Header mobile piu alto per ospitare il logo */
    #header {
        height: 4em !important;
        line-height: 4em !important;
    }

    #header .navPanelToggle {
        height: 4em !important;
        color: #ffffff !important;
    }
}

@media (max-width: 991px) {
    .lux-room-sidebar {
        flex: 1 1 100%;
        position: static;
    }
    .lux-hero-title { font-size: 2.5rem; }
}

/* =========================================================================
   FORCE WHITE ON ALL NAV ELEMENTS (fix <b> tag for current page)
   ========================================================================= */
.dropotron a,
.dropotron a b,
.dropotron a strong,
.dropotron li a,
.dropotron li a b,
.dropotron li a strong,
#header nav a b,
#header nav a strong,
#navPanel a b,
#navPanel a strong {
    color: #ffffff !important;
}
