/* ==========================================================================
   AGENCY CSS VARIABLES & DESIGN SYSTEM (Tono Chiaro e Professionale)
   ========================================================================== */
   :root {
    /* Colors */
    --color-primary: #1A365D;     /* Blu Navale scuro (Fiducia, Professionalità) */
    --color-primary-light: #2B6CB0;
    --color-accent: #D4AF37;      /* Accento dorato per mantenere un tocco premium */
    --color-bg-body: #F7FAFC;     /* Grigio chiarissimo per lo sfondo della pagina */
    --color-bg-white: #FFFFFF;    /* Bianco puro per le card e sezioni */
    --color-text-main: #2D3748;   /* Grigio scuro per il testo leggibile */
    --color-text-muted: #718096;  /* Grigio medio per i testi secondari */
    --color-border: #E2E8F0;      /* Grigio chiaro per i bordi */
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1280px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.bg-white { background-color: var(--color-bg-white); }
.section { padding: 80px 0; }
.section-title { font-size: 2.2rem; margin-bottom: 10px; color: var(--color-primary); }
.section-subtitle { font-size: 1.1rem; color: var(--color-text-muted); margin-bottom: 40px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-light);
}

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

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

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

/* ==========================================================================
   TOP BAR (Language & Currency)
   ========================================================================== */
.top-bar {
    background-color: var(--color-primary);
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}
.top-bar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}
.top-select {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.85rem;
    cursor: pointer;
}
.top-select option {
    color: black;
}

/* ==========================================================================
   NAVBAR (Agenzia Style)
   ========================================================================== */
.agency-navbar {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky; /* Changed from fixed to sticky so it flows below top-bar */
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-agency {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.logo-icon {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-actions {
    display: flex;
    gap: 15px;
}

/* ==========================================================================
   HERO SEARCH
   ========================================================================== */
.hero-search {
    height: 60vh;
    background-image: linear-gradient(rgba(26, 54, 93, 0.7), rgba(26, 54, 93, 0.7)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-search-content {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.hero-search-content h1 {
    color: var(--color-bg-white);
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-search-content p {
    color: var(--color-bg-white);
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.search-bar-box {
    background: var(--color-bg-white);
    padding: 10px;
    border-radius: var(--radius-md);
    display: flex;
    box-shadow: var(--shadow-lg);
}

.search-input, .search-select {
    padding: 15px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    border-right: 1px solid var(--color-border);
}

.search-input { flex: 2; }
.search-select { flex: 1; color: var(--color-text-muted); }
.search-btn { flex: 1; border-radius: var(--radius-sm); font-size: 1.1rem; }

/* ==========================================================================
   PROPERTY CARDS
   ========================================================================== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.property-card {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

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

.property-img-wrapper {
    position: relative;
    height: 240px;
}

.property-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.property-badge.rent {
    background: var(--color-accent);
}

.badge-3d {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    cursor: pointer;
}

.badge-3d:hover {
    background: var(--color-primary);
}

.property-price {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: var(--color-primary);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 2;
}

.property-info {
    padding: 25px;
}

.property-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-location {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-features {
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    margin-bottom: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.feature svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* ==========================================================================
   ROI CALCULATOR BOX
   ========================================================================== */
.roi-calculator {
    background: #F0F4F8;
    border: 1px solid #CBD5E0;
    border-radius: var(--radius-md);
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.roi-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 700;
}
.roi-slider-container {
    margin-bottom: 20px;
}
.roi-slider {
    width: 100%;
    margin-top: 10px;
}
.roi-result {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 15px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.roi-value {
    color: var(--color-accent);
    font-size: 1.4rem;
}

/* ==========================================================================
   FORMS & AUTH
   ========================================================================== */
.auth-container {
    max-width: 500px;
    margin: 120px auto 60px;
    background: var(--color-bg-white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-main);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #CBD5E0;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.agency-footer {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 60px 0 20px;
}

.agency-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
}

.footer-col h3 {
    color: var(--color-bg-white);
    margin-bottom: 20px;
}

.footer-col p, .footer-col li {
    color: #A0AEC0;
    margin-bottom: 10px;
}

.footer-col a {
    color: #A0AEC0;
}
.footer-col a:hover {
    color: var(--color-accent);
}

/* RESPONSIVE */
@media(max-width: 768px) {
    .search-bar-box { flex-direction: column; background: transparent; box-shadow: none; }
    .search-input, .search-select { margin-bottom: 10px; border-radius: var(--radius-sm); background: var(--color-bg-white); }
    .nav-links { display: none; }
    .agency-footer-grid { grid-template-columns: 1fr; }
    .top-bar { display: none; }
}

/* ==========================================================================
   WHATSAPP FLOAT
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.whatsapp-float:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
}
@media(max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}
