body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: black;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    font-family: 'Cinzel', serif;
}

.logo {
    font-size: 1.5rem;
}

.lang-select select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"%3e%3cpath d="M7 10l5 5 5-5z"/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.lang-select select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.lang-select select:focus {
    outline: none;
    border-color: #ff6b6b;
}

#lang-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#lang-nav button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 0.5rem;
    margin: 0 0.2rem;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}

#lang-nav button.active {
    background: #ff6b6b;
    color: white;
}

#lang-nav button:hover {
    background: rgba(255, 255, 255, 1);
}

#hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Slightly taller for parallax effect */
    background-image: url('pictures/sfondo-welcome-1920-1.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(3px); /* Reduced blur for better visibility */
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: fadeInUp 1.5s ease-out;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.5em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    animation: fadeInUp 2s ease-out;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 12px 24px;
    text-decoration: none;
    font-size: 1.2em;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
    animation: fadeInUp 2.5s ease-out;
}

.hero-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.btn {
    background-color: #ff6b6b;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #ff5252;
}

#houses {
    padding: 4rem 2rem;
    text-align: center;
}

#houses h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.house {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.house:hover {
    transform: translateY(-10px);
}

.house img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.house h3 {
    margin: 1rem;
    font-size: 1.5rem;
}

.house p {
    margin: 0 1rem 1rem;
    color: #666;
}

.house .btn {
    margin: 1rem;
    display: inline-block;
}

.main-house {
    max-width: 1000px;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

.house-left {
    flex: 1;
    padding: 0.5rem;
}

.house-left img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
}

.carousel {
    position: relative;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.arrow:hover {
    background: rgba(0,0,0,0.7);
}

.arrow.left {
    left: 10px;
}

.arrow.right {
    right: 10px;
}

.separator {
    width: 1px;
    background: black;
    height: 100%;
    min-height: 350px;
}

.house-right {
    flex: 1;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.house-right h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.4rem;
}

.house-right p {
    margin: 0 0 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.house-right .btn {
    margin-top: auto;
    align-self: center;
}

.house-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.house-thumb {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    border: 2px solid transparent;
    text-align: center;
}

.house-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.house-thumb.active {
    opacity: 1;
    border-color: #ff6b6b;
}

.house-thumb img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.house-thumb span {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #333;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin-left: 10px;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

#about {
    padding: 4rem 2rem;
    background: #f9f9f9;
    text-align: center;
}

#about .container {
    max-width: 800px;
    margin: 0 auto;
}

#about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

#about p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1.5rem;
}

html {
    scroll-behavior: smooth;
}
#contact {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
}

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

#contact h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    color: #333;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    max-width: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.contact-icon {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.contact-icon svg {
    color: #555;
}

.contact-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #555;
}

.contact-card p, .contact-card ul {
    margin: 10px 0;
    color: #666;
}

.contact-card a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-card ul {
    list-style: none;
    padding: 0;
}

.contact-card li {
    margin: 5px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    bottom: 20px;
    right: 20px;
    width: auto;
    max-width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 20px;
}

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

.modal-content h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #666;
    font-size: 0.9em;
}

#accept-cookies {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

#accept-cookies:hover {
    background-color: #0056b3;
}