@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/Montserrat-Light.woff2') format('truetype');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Montserrat-Regular.woff2') format('truetype');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Montserrat-SemiBold.woff2') format('truetype');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/Montserrat-Bold.woff2') format('truetype');
}

/* RESET E VARIABILI */
:root {
    --primary-color: #0a192f;
    --accent-color: #d4af37;
    --text-light: #f4f4f4;
    --text-dark: #333;
    --gray-bg: #f9f9f9;
    --transition: all 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#prenota {
    scroll-margin-top: 60px;
}

#flotta{
    scroll-margin-top: 60px;
}
#servizi{
    scroll-margin-top: 60px;
}
#testimonianze{
    scroll-margin-top: 60px;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.highlight {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links li a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--accent-color);
}

@media (max-width: 1450px) {
    .nav-links {
        display: none;
    }
}

/* LANGUAGE DROPDOWN */
.lang-switch {
    position: relative;
    z-index: 1001;
}

.lang-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
    transition: var(--transition);
}

.lang-selected:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.lang-selected i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    list-style: none;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-width: 180px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown.show ~ .lang-selected i {
    transform: rotate(180deg);
}

.lang-dropdown li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
}

.lang-dropdown li:first-child {
    border-radius: 5px 5px 0 0;
}

.lang-dropdown li:last-child {
    border-radius: 0 0 5px 5px;
}

.lang-dropdown li:hover {
    background-color: var(--gray-bg);
}

body[dir="rtl"] .lang-dropdown {
    right: auto; 
    left: 0; 
}

/* HERO SECTION */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?w=1920&h=1080&fit=crop') no-repeat center center/cover;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 25, 47, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-button {
    padding: 15px 40px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px;
    text-transform: uppercase;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
}

.cta-button:hover {
    background-color: transparent;
    color: var(--accent-color);
}

/* SEZIONI GENERALI */
.section-padding {
    padding: 80px 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* FLOTTA (Grid System) */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

/* CAROUSEL */
.card-img-carousel {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.carousel-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-image.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition);
    border-radius: 3px;
}

.carousel-btn:hover {
    background: rgba(212, 175, 55, 0.9);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active,
.dot:hover {
    background: var(--accent-color);
}

.card-content {
    padding: 20px;
    text-align: center;
}

.price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* SERVIZI */
.dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.text-white { color: white; }

.services-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}

.service-item {
    flex-basis: 300px;
    padding: 20px;
    margin-bottom: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Mobile Carousel */
@media (max-width: 768px) {
    .services-grid {
        flex-wrap: nowrap;
        overflow: hidden;
        position: relative;
        justify-content: flex-start;
        padding: 0;
        min-height: 200px;
    }

    .service-item {
        flex-shrink: 0;
        flex-basis: 100%;
        width: 100%;
        margin-bottom: 0;
        display: none;
    }

    .service-item.active {
        display: block;
    }

    .services-carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
    }

    .services-carousel-dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.3);
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .services-carousel-dots .dot.active {
        background-color: var(--accent-color);
    }
}

@media (min-width: 769px) {
    .services-carousel-dots {
        display: none;
    }
}

/* PRENOTA ORA FORM */
.booking-section {
    background: var(--gray-bg);
}

.booking-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.full-width {
    grid-column: span 2;
}

.form-group input,
.form-group label {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.form-group.relative input {
    padding-right: 45px; 
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    border: none;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group.relative {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.submit-btn {
    grid-column: span 2;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 5px;
    font-size: 1.1rem;
}

.submit-btn:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn:disabled:hover {
    background-color: var(--primary-color);
    color: white;
}

.booking-note {
    grid-column: span 2;
    color: var(--primary-color);
    text-align: center;
    justify-self: center;
    width: 100%;
}

/* RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    .booking-form {
        grid-template-columns: 1fr; 
        padding: 25px 20px;
        gap: 15px;
    }

    .full-width,
    .submit-btn,
    .booking-note {
        grid-column: span 1;
    }

    .form-group input {
        font-size: 16px; 
    }
}

@media (max-width: 480px) {
    .booking-form {
        padding: 20px 15px;
    }

    .submit-btn {
        font-size: 1rem;
    }
}

.smart-input {
    direction: ltr;
    text-align: left;
}

/* Solo quando il sito � in arabo */
body[dir="rtl"] .smart-input:placeholder-shown {
    text-align: right;
}

body[dir="rtl"] .smart-input {
    direction: ltr;
    text-align: left;
}

/* TESTIMONIANZE */
.bg-gray {
    background: var(--gray-bg);
}

.testimonials-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Gradiente dissolvenza ai bordi */
.testimonials-wrapper::before,
.testimonials-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.testimonials-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--gray-bg), transparent);
}

.testimonials-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--gray-bg), transparent);
}

.testimonials-container {
    display: flex;
    gap: 30px;
    overflow-x: hidden;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: auto;
    direction: ltr; /* Forza sempre LTR per il container */
}

.testimonials-container::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 500px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    flex-shrink: 0;
    user-select: none;
    direction: ltr; /* Forza LTR anche nelle card */
}

/* Override per contenuto RTL nelle card quando la pagina è in arabo */
[dir="rtl"] .review-card {
    direction: rtl;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.reviewer-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #c99a2e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.review-date {
    font-size: 0.85rem;
    color: #999;
    margin-top: 3px;
}

.stars {
    color: #f1c40f;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .testimonials-wrapper::before,
    .testimonials-wrapper::after {
        width: 80px;
    }

    .review-card {
        min-width: calc(100vw - 60px);
        padding: 25px 20px;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* FOOTER */
footer {
    background-color: #050e1b;
    color: #aaa;
    padding: 50px 10% 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-col h3 { color: white; margin-bottom: 20px; }
.footer-col p { margin-bottom: 10px; }

.copyright {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.8rem;
}

/* ANIMAZIONI SCROLL (CSS Classi) */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

h1{
    line-height: 1.2;
}

/* RESPONSIVE MEDIA QUERIES */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        left: auto;
    }
    
    .nav-links li { opacity: 0; }
    
    .burger { display: block; }
    
    .nav-active {
        transform: translateX(0%);
    }

    .hero h1 { 
        font-size: 2.5rem; 
    }
    
    .booking-form { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
    .submit-btn { grid-column: span 1; }
    
    .logo-img {
        height: 40px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .carousel-btn {
        padding: 8px 12px;
        font-size: 1rem;
    }
}

@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

.nav-active li {
    animation: navLinkFade 0.5s ease forwards 0.3s;
}

/* === COOKIE BANNER === */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top: 2px solid #ffcc00;
    padding: 16px 24px;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

#cookie-banner-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

#cookie-text {
    flex: 1;
    color: #cccccc;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

#cookie-text a {
    color: #ffcc00;
    text-decoration: underline;
}

#cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#cookie-accept,
#cookie-reject {
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

#cookie-accept {
    background: #ffcc00;
    color: #1a1a1a;
}

#cookie-reject {
    background: transparent;
    color: #cccccc;
    border: 1px solid #555;
}

#cookie-accept:hover,
#cookie-reject:hover {
    opacity: 0.85;
}

/* RTL support */
[dir="rtl"] #cookie-banner-inner {
    flex-direction: row-reverse;
}

/* === PRIVACY CHECKBOX === */
.privacy-check {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: #cccccc;
    font-size: 0.85rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: #ffcc00;
    cursor: pointer;
}

.checkbox-label a {
    color: #ffcc00;
    text-decoration: underline;
}