﻿:root {
    /* Colors - Deep Blue & Gold Theme */
    --primary: #0F172A;
    /* Deep Navy */
    --primary-light: #1E293B;
    /* Lighter Navy */
    --primary-dark: #020617;
    /* Darker Navy */

    --secondary: #F59E0B;
    /* Gold/Amber */
    --secondary-light: #FCD34D;
    --secondary-dark: #D97706;

    --accent: #38BDF8;
    /* Sky Blue */
    --accent-light: #7DD3FC;
    --accent-dark: #0284C7;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Neutrals */
    --dark: #0F172A;
    --dark-light: #334155;
    --gray: #64748B;
    --gray-light: #CBD5E1;
    --light: #F1F5F9;
    --white: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-secondary: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-accent: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Typography */
    --font-body: 'Outfit', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    /* Modern look */
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom right, #F8FAFC, #E2E8F0);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--accent-dark);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

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

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

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

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
}

.nav-brand h1 {
    color: var(--primary);
    font-size: 1.75rem;
    margin: 0;
    font-weight: 800;
}

/* Logo Styling */
.nav-brand .site-logo {
    height: 45px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-brand a:hover .site-logo {
    opacity: 0.85;
    transform: scale(1.02);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--primary);
    margin: 3px 0;
    border-radius: 3px;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    color: var(--dark-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-links a.btn-primary {
    color: var(--white);
}

.nav-links a.btn-primary:hover {
    color: var(--white);
    background: var(--primary-light);
}

.user-menu {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    min-width: 180px;
    margin-top: 0.75rem;
    list-style: none;
    overflow: hidden;
    padding: 0.5rem;
}

.user-menu:hover .dropdown-menu {
    display: block;
    animation: slideDown 0.2s ease-out;
}

/* Bridge to prevent dropdown from closing */
.user-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--dark-light);
}

.dropdown-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

/* Buttons */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--light);
    border-color: var(--gray);
    color: var(--primary-dark);
}

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

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

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.95);
}

.card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.card-image-wrapper {
    position: relative;
    display: block;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    z-index: 10;
    color: var(--gray);
    font-size: 1.2rem;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

.favorite-btn.active {
    color: red !important;
}

.favorite-btn.active i {
    color: red !important;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

.card-text {
    color: var(--gray);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* Grid */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

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

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

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

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: var(--white);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
}

/* Flash Messages */
.flash-message {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.flash-success {
    background: #DCFCE7;
    color: #14532D;
    border: 1px solid #86EFAC;
}

.flash-error {
    background: #FEE2E2;
    color: #7F1D1D;
    border: 1px solid #FCA5A5;
}

.flash-warning {
    background: #FEF3C7;
    color: #78350F;
    border: 1px solid #FCD34D;
}

.flash-info {
    background: #E0F2FE;
    color: #0C4A6E;
    border: 1px solid #7DD3FC;
}

/* Stars */
.stars {
    display: inline-flex;
    gap: 0.15rem;
    font-size: 1.25rem;
}

.star {
    color: var(--gray-light);
}

.star.filled {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    background: var(--primary);
    color: var(--white);
    padding: 0;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    min-height: 450px;
}

/* Base style for hero background images */
.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 1;
    filter: brightness(0.4) saturate(1.2);
    transition: transform 0.8s ease;
}

/* Panorama Background for Mobile Carousel */
.hero-panorama-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-panorama-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 130%;
    /* Extra width for panning */
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.4) saturate(1.2);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero:hover .hero-background-image {
    transform: scale(1.05);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8));
    z-index: 2;
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Hero Carousel */
.hero-carousel-container {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 450px;
}

.hero-carousel {
    display: none;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 200%;
}

.hero-slide {
    width: 50%;
    flex-shrink: 0;
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide-content {
    position: relative;
    z-index: 10;
    padding: 2rem 1rem;
}

.hero-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: var(--white);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .desktop-hero-content {
        display: none;
    }

    .hero-carousel {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.125rem;
    }
}

/* Section */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--gray);
    font-size: 1.125rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-section a {
    color: var(--gray-light);
}

.footer-section a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Logo responsive */
    .nav-brand .site-logo {
        height: 36px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--light);
        border-radius: var(--radius-sm);
        text-align: center;
    }

    .user-menu {
        width: 100%;
    }

    .user-dropdown-toggle {
        justify-content: center;
        padding: 1rem;
        border-bottom: 1px solid var(--light);
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: var(--light);
        margin-top: 0;
        text-align: center;
        border-radius: var(--radius-md);
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-image {
        object-position: right center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.125rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    /* Logo ancora più piccolo su mobile */
    .nav-brand .site-logo {
        height: 32px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.mb-5 {
    margin-bottom: 4rem;
}

.p-1 {
    padding: var(--spacing-sm);
}

.p-2 {
    padding: var(--spacing-md);
}

.p-3 {
    padding: var(--spacing-lg);
}

/* Flexbox & Grid helpers */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

.w-full {
    width: 100%;
}

.hidden {
    display: none;
}

/* Lightbox System */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 70%;
    max-height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--white);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--white);
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    line-height: 1;
    z-index: 10001;
    transition: transform 0.2s;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--white);
    border: none;
    font-size: 2.5rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: var(--accent);
    color: var(--primary);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
}