/* ============================================
   ORSENIGO LUXURY ESTATES - CSS STYLESHEET
   Design: Minimalist Elegance with Serif Typography
   ============================================ */

/* ============================================
   1. RESET & VARIABLES
   ============================================ */

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

:root {
    --color-cream: #F5F1EB;
    --color-charcoal: #2C2C2C;
    --color-gold: #D4AF37;
    --color-white: #FFFFFF;
    --color-gray: #8B8B8B;
    --color-light-gray: #E8E8E8;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    line-height: 1.6;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }
p { font-size: 1rem; font-weight: 300; }

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

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

/* ============================================
   3. UTILITY CLASSES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--color-charcoal);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 1rem auto 0;
}

/* ============================================
   4. BUTTONS
   ============================================ */

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background-color: var(--color-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-charcoal);
}

/* ============================================
   5. HEADER/NAVIGATION
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-charcoal);
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-charcoal);
    position: relative;
    cursor: pointer;
    font-family: var(--font-sans);
    text-transform: none;
}

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

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Language Dropdown Styles */
.lang-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 10px; /* Bridge the gap to prevent closing */
    margin-bottom: -10px;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-white);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 15px;
    z-index: 1001;
    margin-top: 5px;
    border: 1px solid var(--color-light-gray);
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.lang-dropdown:hover .lang-dropdown-content {
    display: grid;
}

.lang-dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--color-white);
}

.lang-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 
                inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.lang-flag:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 
                inset 0 1px 2px rgba(255, 255, 255, 1);
    border-color: var(--color-gold);
}

.lang-flag.active {
    border: 2px solid var(--color-gold);
}

/* ============================================
   6. HERO SECTION
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--color-white);
    max-width: 800px;
    padding: 2rem;
}

.badge {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-charcoal);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-price {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 300;
    color: #ede8e8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   7. DETAILS SECTION
   ============================================ */

.details {
    padding: 6rem 0;
    background-color: var(--color-cream);
}

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

.feature-card {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
}

.feature-description {
    color: var(--color-gray);
    font-size: 0.95rem;
}

.about-property {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.about-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-charcoal);
}

.about-text {
    margin-bottom: 1rem;
    color: var(--color-charcoal);
    line-height: 1.8;
}

/* ============================================
   8. GALLERY SECTION
   ============================================ */

.gallery {
    padding: 6rem 0;
    background-color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-text {
    background-color: var(--color-gold);
    color: var(--color-white);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-label {
    background-color: var(--color-gold);
    color: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Animazione pulsante per il pulsante */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

/* Pulsante circolare ⊕ nell'angolo in basso a destra - PIÙ PICCOLO */
.gallery-item::after {
    content: '⊕';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 35px;
    height:  35px;
    background-color: var(--color-gold);
    color: var(--color-white);
    font-size: 28px;
    font-weight: 300;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

.gallery-item:hover::after {
    animation-play-state: paused;
    transform: scale(1.15) rotate(90deg);
}







/* ============================================
   9. LIGHTBOX
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--color-gold);
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #2c3e50;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--color-gold);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ============================================
   10. LOCATION SECTION
   ============================================ */

.location {
    padding: 6rem 0;
    background-color: var(--color-cream);
}

.location-info {
    text-align: center;
    margin-bottom: 3rem;
}

.location-address {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.location-city {
    color: var(--color-gray);
    font-size: 1rem;
}

.map-container {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.poi-card {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.poi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.poi-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.poi-title { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--color-charcoal); }
.poi-description { color: var(--color-gray); font-size: 0.9rem; }

.why-location {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.why-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

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

.why-card { padding: 1.5rem; }
.why-heading { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--color-charcoal); }
.why-text { color: var(--color-gray); font-size: 0.95rem; line-height: 1.6; }

/* ============================================
   11. CONTACT SECTION
   ============================================ */

.contact {
    padding: 6rem 0;
    background-color: var(--color-white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info { padding: 2rem; }
.contact-heading { font-size: 1.5rem; margin-bottom: 2rem; color: var(--color-charcoal); }
.contact-item { margin-bottom: 2rem; }
.contact-label { font-size: 0.9rem; font-weight: 600; color: var(--color-charcoal); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.contact-value { color: var(--color-gray); font-size: 1rem; }
.contact-description { color: var(--color-gray); line-height: 1.8; margin-top: 2rem; }

.contact-form {
    padding: 2rem;
    background-color: var(--color-cream);
    border-radius: 8px;
}

.form-group { margin-bottom: 1.5rem; }

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-textarea { resize: vertical; }

/* ============================================
   12. FOOTER
   ============================================ */

.footer {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    padding: 3rem 0 1rem;
}

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

.footer-section { padding: 1rem; }
.footer-title { font-family: var(--font-serif); font-size: 1.2rem; margin-bottom: 1rem; color: var(--color-gold); }
.footer-text { color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; margin-bottom: 0.5rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255, 255, 255, 0.9); transition: var(--transition); }
.footer-links a:hover { color: var(--color-gold); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ============================================
   13. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-content {
        padding: 0.5rem 0;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--color-white);
        padding: 0;
        gap: 0;
        box-shadow: var(--shadow-md);
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 1.2rem 0;
        border-bottom: 1px solid var(--color-light-gray);
        width: 100%;
        text-align: center;
        font-size: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    /* Mobile Language Dropdown */
    .lang-dropdown {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--color-light-gray);
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .lang-dropdown .nav-link {
        border-bottom: none;
    }

    .lang-dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        display: none;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin: 0 auto;
        padding: 0 20px 20px;
        background-color: transparent;
    }

    .lang-dropdown.active .lang-dropdown-content {
        display: grid;
    }

    .lang-dropdown-content::before {
        display: none;
    }
    
    /* Hero image intera su mobile */
    .hero-background {
        background-size: contain;
        background-position: top center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
    
    .hero-title { font-size: 2rem; }
    .hero-description { font-size: 1rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .hero { margin-top: 50px; }
    
    /* Hero image intera su mobile piccolo */
    .hero-background {
        background-size: contain;
        background-position: top center;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }
    
    .hero-title { font-size: 1.5rem; }
    .section-title { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .poi-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .lang-dropdown-content { grid-template-columns: repeat(3, 1fr); }
}

/* Gallery Counter */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 1001;
}

.gallery-count {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Contact Links Hover Effect */
.contact-value a:hover,
.footer-text a:hover {
    color: var(--color-gold) !important;
    text-decoration: underline !important;
}
