/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8a2be2;
    --secondary: #4169e1;
    --accent: #ff6b6b;
    --dark-bg: #0a0a0f;
    --dark-surface: #11111f;
    --dark-card: #1a1a2e;
    --dark-border: #2a2a4a;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d8;
    --text-muted: #6c6c8c;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --hover-glow: 0 0 25px rgba(138, 43, 226, 0.5);
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-dark: linear-gradient(135deg, #1a1a2e, #16213e);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(65, 105, 225, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.08) 0%, transparent 40%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Header & Navigation */
.navbar {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(42, 42, 74, 0.3);
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
}

.tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(138, 43, 226, 0.1);
}

.nav-links a.active {
    color: var(--text-primary);
    background: rgba(138, 43, 226, 0.2);
    border-left: 3px solid var(--primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, rgba(10, 10, 15, 0.9), rgba(10, 10, 15, 0.95));
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 36px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--hover-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 14px 28px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(138, 43, 226, 0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Filters Section */
.filters-section {
    background: var(--dark-surface);
    padding: 5rem 0;
    border-top: 1px solid var(--dark-border);
    border-bottom: 1px solid var(--dark-border);
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filters-section h3 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.filter-group h4 {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    user-select: none;
}

.tag:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tag.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
    transform: translateY(-2px);
}

/* Locations Section */
.locations-section {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.location-count {
    background: rgba(138, 43, 226, 0.1);
    padding: 14px 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(138, 43, 226, 0.3);
    font-weight: 600;
    font-size: 1.1rem;
}

#location-count {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
}

/* Location Cards - Aspect Ratio Fixed */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.location-card {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--dark-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.location-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        var(--hover-glow);
    border-color: rgba(138, 43, 226, 0.5);
}

.location-card:hover::before {
    opacity: 1;
}

/* Image Container with Fixed Aspect Ratio */
.location-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    background: var(--gradient-dark);
    border-bottom: 1px solid var(--dark-border);
}

.location-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.location-card:hover .location-image img {
    transform: scale(1.1);
}

.location-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.location-content h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.location-region {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.location-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.location-tag {
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.location-tag:hover {
    background: rgba(138, 43, 226, 0.3);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Suggest Section */
.suggest-section {
    background: var(--dark-surface);
    padding: 6rem 0;
    border-top: 1px solid var(--dark-border);
}

.suggestion-form {
    background: var(--dark-card);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--dark-border);
    max-width: 900px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(138, 43, 226, 0.1);
    background: rgba(255, 255, 255, 0.07);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group small {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    margin-top: 3rem;
}

/* Image Upload */
.image-upload-section {
    margin: 2rem 0;
}

.image-dropzone {
    border: 3px dashed var(--dark-border);
    border-radius: var(--radius);
    padding: 4rem;
    text-align: center;
    margin: 2rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.image-dropzone:hover,
.image-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(138, 43, 226, 0.1);
    transform: translateY(-2px);
}

.image-dropzone i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.image-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.image-item {
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: var(--dark-card);
}

.image-item.cover {
    border-color: var(--primary);
    border-width: 3px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
}

.image-preview {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-actions {
    opacity: 1;
}

.image-actions button {
    background: rgba(10, 10, 15, 0.9);
    color: white;
    border: 1px solid var(--dark-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-actions button:hover {
    background: var(--primary);
    transform: scale(1.1);
    border-color: var(--primary);
}

.image-info {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.image-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: var(--dark-bg);
    border-top: 1px solid var(--dark-border);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.step {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--dark-card);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.step:hover::before {
    opacity: 0.05;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-glow);
    border-color: rgba(138, 43, 226, 0.5);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 2rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
}

.step h4 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.step p {
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

/* Footer */
footer {
    background: #08080c;
    color: white;
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--dark-border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--dark-card);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    position: relative;
    border: 1px solid var(--dark-border);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.7),
        var(--hover-glow);
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--dark-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    color: var(--text-primary);
    background: rgba(138, 43, 226, 0.3);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 4rem 3rem;
    text-align: center;
}

.modal-icon {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.modal-body h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Location Detail Modal */
.location-modal .modal-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.location-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.main-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 16:9 Aspect Ratio */
    /* grid-column: 1 / -1; */
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--gradient-dark);
    margin-left: 0.5em;
}

.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-header
{
 margin-left: 1em;   
}
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Square */
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: var(--gradient-dark);
}

.thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--text-secondary);
}

.thumbnail.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6);
}

.location-details {
    margin: 3rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.detail-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
}

.detail-section h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.98);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(20px);
}


/* Stile specifico per il dropdown delle regioni */
#region {
    background-color: var(--dark-card);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238a2be2' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 45px;
}

#region:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
}

#region:hover {
    border-color: rgba(138, 43, 226, 0.5);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Rimuove lo stile predefinito su iOS */
#region::-ms-expand {
    display: none;
}

/* Stile per le opzioni */
#region option {
    background-color: var(--dark-card);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#region option:first-child {
    color: var(--text-muted);
    font-style: italic;
}

#region option:checked,
#region option:hover {
    background-color: rgba(138, 43, 226, 0.3);
    color: var(--text-primary);
}

#region option:disabled {
    color: var(--text-muted);
}

/* Container per il select con icona */
.select-container {
    position: relative;
    width: 100%;
}

.select-container::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    z-index: 2;
}

/* Stile per lo stato di validazione */
#region:valid {
    border-color: rgba(0, 184, 148, 0.5);
}

#region:invalid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(255, 107, 107, 0.5);
}

#region:invalid:not(:focus):not(:placeholder-shown) + .select-error {
    display: block;
}

.select-error {
    display: none;
    color: var(--accent);
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Animazione per il cambio di selezione */
#region {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Stile per quando è disabilitato */
#region:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Stile per stato attivo (cliccato) */
#region:active:not(:disabled) {
    transform: translateY(1px);
}

/* Versione compatta per schermi piccoli */
@media (max-width: 768px) {
    #region {
        padding: 12px 14px;
        font-size: 0.95rem;
        background-position: right 14px center;
        padding-right: 40px;
    }
}

/* Versione extra compatta */
@media (max-width: 480px) {
    #region {
        padding: 10px 12px;
        font-size: 0.9rem;
        background-position: right 12px center;
        padding-right: 35px;
    }
}

/* Stile per tema chiaro (se applicato) */
body.light-mode #region {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #ddd;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234169e1' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

body.light-mode #region option {
    background-color: #ffffff;
    color: #333333;
}

body.light-mode #region:focus {
    border-color: #4169e1;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.2);
}

/* Effetto glow per selezione importante */
#region.important {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(138, 43, 226, 0.3), 0 0 15px rgba(138, 43, 226, 0.1);
}

/* Animazione di ingresso */
@keyframes selectSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#region {
    animation: selectSlideIn 0.3s ease-out;
}

/* Stile per gruppo di form con questo select */
.form-group:has(#region) {
    position: relative;
}

.form-group:has(#region) label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-group:has(#region) .required-indicator {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: normal;
}

/* Stile per i dropdown regione e città */
#region, #city {
    background-color: var(--dark-card);
    color: var(--text-primary);
    border: 1px solid var(--dark-border);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238a2be2' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 45px;
}

#city:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

#region:focus, #city:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
}

#region:hover:not(:disabled), #city:hover:not(:disabled) {
    border-color: rgba(138, 43, 226, 0.5);
    background-color: rgba(255, 255, 255, 0.03);
}

#region option, #city option {
    background-color: var(--dark-card);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.95rem;
}

#region option:first-child, #city option:first-child {
    color: var(--text-muted);
    font-style: italic;
}

#region option:hover, #city option:hover {
    background-color: rgba(138, 43, 226, 0.3);
}

/* Container per città non in lista */
.other-city-container input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--dark-border);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    width: 100%;
    transition: all 0.3s ease;
}

.other-city-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.other-city-container small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Rimuove lo stile predefinito su iOS */
#region::-ms-expand, #city::-ms-expand {
    display: none;
}

/* Stile per stato attivo (cliccato) */
#region:active:not(:disabled), #city:active:not(:disabled) {
    transform: translateY(1px);
}

/* Stile per validazione */
#region:valid, #city:valid {
    border-color: rgba(0, 184, 148, 0.5);
}

#region:invalid:not(:focus):not(:placeholder-shown), 
#city:invalid:not(:focus):not(:placeholder-shown) {
    border-color: rgba(255, 107, 107, 0.5);
}

/* Versione responsive */
@media (max-width: 768px) {
    #region, #city {
        padding: 12px 14px;
        font-size: 0.95rem;
        background-position: right 14px center;
        padding-right: 40px;
    }
}

@media (max-width: 480px) {
    #region, #city {
        padding: 10px 12px;
        font-size: 0.9rem;
        background-position: right 12px center;
        padding-right: 35px;
    }
}
/* Tooltip per opzioni selezionate */
#region[title] {
    cursor: help;
}

/* Supporto per browser che non supportano :has() */
.form-group-with-region {
    position: relative;
}

.form-group-with-region label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-group-with-region .required-indicator {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: normal;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-right: 4px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-bottom: 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* No Results & Error States */
.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 4rem;
    background: var(--dark-card);
    border-radius: var(--radius);
    border: 1px solid var(--dark-border);
    margin: 2rem 0;
}

.no-results {
    color: var(--text-muted);
}

.error-message {
    color: var(--accent);
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px;
    border: 3px solid var(--dark-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* Selection */
::selection {
    background: rgba(138, 43, 226, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .locations-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .hero h2 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .nav-links a {
        padding: 8px 16px;
        font-size: 0.95rem;
    }
    
    .hero {
        padding: 6rem 1rem 4rem;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .suggestion-form {
        padding: 2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .location-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    .modal-body {
        padding: 3rem 1.5rem;
    }
    
    .image-dropzone {
        padding: 3rem 1.5rem;
    }
    
    .image-previews {
        grid-template-columns: 1fr;
    }
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Print Styles */
@media print {
    .navbar,
    .filters-section,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .location-card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}