/* Base Styles */
:root {
    --primary-color: #f3a60d;
    --secondary-color: #2c3e50;
    --accent-color: #d4af37;
    --light-color: #f8f9fa;
    --dark-color: #ffffff;
    --text-color: #333;
    --text-light: #6c757d;
    --font-heading: 'Poppins', serif;
    --font-body: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Previene lo scorrimento orizzontale su mobile */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Assicura che tutti gli elementi rispettino il contenitore */
.container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Corregge eventuali problemi con elementi che escono dal viewport */
img, video, iframe, object, embed, table {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.section-padding {
    padding: 40px 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.scrolled {
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
    transition: var(--transition);
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
    z-index: 1001;
}

/* Mobile Menu Styles */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        padding: 15px 0;
        font-size: 1.2rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero/nuova cagliari.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: var(--header-height) 0 40px;
}

.hero-content {
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Booking Form */
.booking-form {
    background-color: white;
    padding: 60px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
    margin-top: -50px;
}

.booking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input[type="date"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(243, 166, 13, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    align-self: flex-end;
}

.btn-primary:hover {
    background-color: #e09a0c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Rooms Section */
.rooms {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.rooms h2 {
    text-align: center;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: clamp(0.9rem, 2vw, 1.125rem);
    padding: 0 15px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    padding: 0 15px;
}

.room-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.room-image {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.room-details {
    padding: 20px;
}

.room-details h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.room-price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 8px 0 12px;
    display: block;
}

.room-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 20px;
}

.feature {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.feature i {
    margin-right: 5px;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rooms {
        padding: 60px 0;
    }
    
    .rooms-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .room-card {
        max-width: 100%;
    }
}

.room-details p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Location Section */
.location {
    padding: 80px 0;
    background-color: #fff;
}

.location h2 {
    text-align: center;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

.location-info {
    padding: 0 15px;
}

.location-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.location-info p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.7;
}

.contact-info {
    margin-top: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.contact-item i {
    width: 36px;
    height: 36px;
    background-color: rgba(243, 166, 13, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.map-container {
    height: 350px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 15px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .location-content {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        margin-top: 50px;
    }
    
    .location-info {
        padding: 0;
    }
    
    .map-container {
        margin: 0;
        height: 400px;
    }
}

/* Footer */
.footer {
    background-color: #f3a60d;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 15px;
}

.footer-column {
    margin-bottom: 30px;
}

.footer h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-family: var(--font-heading);
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer p {
    margin-bottom: 15px;
    color: #ffffff;
    line-height: 1.7;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
    font-size: 0.9rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ffffff;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.contact-info-footer {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-info-footer i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 18px;
    display: inline-block;
    text-align: center;
    margin-top: 3px;
}

.contact-info-footer span {
    flex: 1;
}

.footer-bottom {
    text-align: center;
    padding: 20px 15px 0;
    border-top: 1px #f3a60d;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 40px;
        margin-bottom: 50px;
        padding: 0;
    }
    
    .footer-column {
        margin-bottom: 0;
    }
    
    .footer h3 {
        font-size: 1.25rem;
        margin-bottom: 25px;
    }
}

/* Regole aggiuntive per il contenuto delle pagine */
.room-details-container,
.booking-form,
.room-features,
.gallery-container {
    width: 100%;
    overflow: hidden;
}

/* Stile per tabelle responsive */
.table-responsive {
    /*display: block;*/
    width: auto;
    max-width:100%;
    margin: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    padding: 0px;
    box-sizing: border-box;
}

/* Stile per le tabelle all'interno di .table-responsive */
.table-responsive table {
    width: 70%;
    min-width: 70%;
    margin: auto;
    border-collapse: collapse;
}

/* Stile per le celle della tabella */
.table-responsive th,
.table-responsive td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #ddd;
    white-space: nowrap;
}

/* Stile per l'header della tabella */
.table-responsive th {
    background-color: #f7a205;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* Stile per le righe dispari */
.table-responsive tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

/* Stile per l'hover sulle righe */
.table-responsive tbody tr:hover {
    background-color: #f1f1f1;
}

/* Responsive Design */
/* Base styles for all screen sizes */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
        width: auto;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero {
        padding-top: var(--header-height);
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .nav-links {
        display: flex !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .rooms-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero {
        min-height: 500px;
        padding: calc(var(--header-height) + 20px) 0 40px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-bottom {
        font-size: 0.8rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .mobile-menu-btn {
        display: none !important;
    }
    
    body {
        padding: 0;
        font-size: 12pt;
        line-height: 1.3;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        padding: 20px 0;
        background: none !important;
        color: #000 !important;
    }
    
    .hero-content h1,
    .rooms h2,
    .location h2 {
        color: #000 !important;
    }
    
    .btn {
        display: none;
    }
    
    a[href^='http']::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        font-weight: normal;
    }
}
/* Miglioramento tabella su dispositivi mobili */
@media (max-width: 768px) {
    .table-responsive {
        width: 100%;
        max-width: 100%;
        padding: 0 4px; /* piccolo bordino laterale */
    }

    .table-responsive table {
        width: 100%;
        min-width: 100%;
        margin: 0 auto;
    }

    .table-responsive th,
    .table-responsive td {
        font-size: 0.9rem;
        padding: 10px 8px;
        white-space: normal; /* consente di andare a capo se necessario */
    }
}
/* Migliore leggibilità del testo dei periodi su mobile */
@media (max-width: 768px) {
    .season {
        font-size: 1rem; /* ingrandisce il testo */
        font-weight: 600; /* rende il testo più marcato */
        color: #333; /* migliora il contrasto */
        display: inline-block;
        margin-top: 4px;
    }
}
/* Ingrandisce la checkbox su smartphone */
@media (max-width: 768px) {
    .privacy-checkbox input[type="checkbox"] {
        width: 28px;
        height: 28px;
        transform: scale(1.4);   /* ingrandisce in modo uniforme */
        margin-right: 12px;
    }

    .privacy-checkbox label {
        font-size: 1.05rem;
        line-height: 1.3;
    }
}