/* Color Variables */
:root {
    --primary: #e31e24;
    --primary-dark: #D6272C;
    --secondary: #333333;
    --secondary-light: #666666;
    --white: #ffffff;
    --background: #f5f5f5;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--secondary);
    background-color: var(--background);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography con font Inter ottimizzato */
h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -0.005em;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 500;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 500;
}

h6 {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 500;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Classi utility per dimensioni testo */
.text-small {
    font-size: 0.875rem;
    line-height: 1.6;
}

.text-large {
    font-size: 1.125rem;
    line-height: 1.7;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Links */
a:hover {
    color: var(--secondary);
}

/* Buttons */
.cta-button {
    display: inline-block;
    background: var(--primary-dark);
    color: var(--white);
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: var(--white);
}

.cta-button-white {
    display: inline-block;
    background: var(--secondary-light);
    color: white;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-button-white:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.05);
}

/* Header and Navigation */
.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}


.main-nav {
    padding: 15px 0;
}

.logo img {
    height: 100px; /* Aumentato da 50px a 60px per migliore visibilità */
    width: auto; /* Mantiene le proporzioni */
    max-width: 180px; /* Limita la larghezza massima */
    object-fit: contain; /* Assicura che l'immagine non si deformi */
    transition: all 0.3s ease; /* Transizione fluida per effetti hover */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0 10px;
    letter-spacing: -0.005em;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-dark);
}

.contact-button a {
    background: var(--primary-dark);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.contact-button a:hover {
    background: var(--primary);
    color: var(--white);
}

/* Mobile Menu */
.mobile-menu {
    background: var(--white);
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.nav-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-mobile li {
    margin-bottom: 15px;
}

.nav-mobile a {
    color: var(--secondary);
    font-weight: 500;
    text-decoration: none;
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
}

.nav-mobile a:hover,
.nav-mobile a.active {
    color: var(--primary-dark);
}

.navbar-toggler {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

.navbar-toggler:hover {
    color: var(--primary-dark);
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.25);
}



/* Main Content Container with Better Definition */
#content-container {
    margin-top: 120px; /* Adjusted for fixed header */
    min-height: calc(100vh - 400px); /* Ensures content area is at least viewport height minus header/footer */
}

/* Section Separators for Better Reading */
section {
    position: relative;
}

section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-dark), transparent);
}

/* Form Elements with Better Borders */
.form-select,
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-select:focus,
.form-control:focus,
input:focus,
textarea:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 0.2rem rgba(227, 30, 36, 0.15);
    outline: none;
}

/* Button Improvements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.3);
}

.btn-outline-primary {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

/* Footer */
.main-footer {
    background-color: var(--secondary);
    color: var(--white);
    padding-top: 50px;
}

.footer-logo img {
    max-width: 220px;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-dark);
    color: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    background-color: var(--primary);
}

.footer-contacts h3,
.footer-hours h3 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-contacts h3::after,
.footer-hours h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-dark);
}

.contact-list,
.hours-list {
    list-style: none;
    padding: 0;
}

.contact-list li,
.hours-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-list li i {
    margin-right: 10px;
    color: var(--primary-dark);
    min-width: 20px;
    margin-top: 4px;
}

.copyright-bar {
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    margin-bottom: 0;
}

.copyright-bar p {
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .footer-contacts h3::after,
    .footer-hours h3::after {
        left: 0;
        transform: none;
    }
    
    .property-card {
        margin-bottom: 25px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    /* Stack navigation items vertically on tablet */
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-nav {
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    #content-container {
        margin-top: 100px;
    }
    
    .contact-list li, 
    .hours-list li {
        justify-content: flex-start;
    }
    
    /* Migliora leggibilità su mobile */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .property-card {
        margin-bottom: 20px;
    }
    
    .property-card .card-body {
        padding: 1.5rem;
    }
    
    .property-features {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start !important;
    }
    
    .property-features span {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    /* Form responsive */
    .property-filters {
        padding: 20px 15px;
    }

    /* Dropdown mobile-friendly con spacing migliorato */
    .form-select,
    .form-control {
        font-size: 16px; /* Previene zoom su iOS */
        min-height: 48px; /* Touch target WCAG compliant */
        padding: 12px 40px 12px 12px; /* Più spazio per il dito e per la freccia dropdown */
        background-position: right 12px center; /* Freccia più visibile */
        background-size: 16px 12px;
    }

    /* Label con spacing migliorato su mobile */
    .property-filters .form-label {
        margin-bottom: 10px;
        font-size: 0.95rem;
        font-weight: 600;
        display: block;
    }

    /* Migliora visibilità stati focus su mobile */
    .form-select:focus,
    .form-control:focus {
        border-width: 2px;
        box-shadow: 0 0 0 0.25rem rgba(227, 30, 36, 0.25);
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .property-card .card-body {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .property-price {
        font-size: 1.2rem;
    }
    
    .property-features {
        font-size: 0.8rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Stack form elements */
    .property-filters .row {
        margin: 0;
    }

    .property-filters .col-md-3,
    .property-filters .col-md-3.mb-3 {
        margin-bottom: 20px; /* Più spazio tra i campi */
    }

    /* Dropdown extra large su mobile piccolo */
    .form-select,
    .form-control {
        min-height: 52px; /* Touch target più grande */
        font-size: 16px;
        padding: 14px 40px 14px 14px;
    }

    .btn {
        min-height: 52px; /* Touch target maggiorato */
        font-size: 16px;
        font-weight: 600;
    }

    /* Migliora il bottone cerca su schermi piccoli */
    .property-filters .btn-primary {
        width: 100%;
        padding: 14px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Toggle filtri avanzati più visibile */
    .property-filters .btn-link {
        font-size: 1rem;
        font-weight: 600;
        padding: 12px 24px;
        background: var(--background);
        border-radius: 8px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--secondary);
        border: 2px solid #e0e0e0;
    }

    .property-filters .btn-link:hover,
    .property-filters .btn-link:focus {
        background: var(--primary-dark);
        color: var(--white);
        border-color: var(--primary-dark);
    }
}

/* Common section styles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--secondary);
}

.section-title span {
    border-bottom: 2px solid var(--primary-dark);
}

/* Property Cards - Clickable with Better Borders */
.property-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    background-color: var(--white);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-dark);
    border-width: 2px;
}

.property-card.clickable-card:hover {
    background-color: #fafafa;
}

.property-badge {
    font-size: 0.8rem;
    font-weight: 600;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
}

.card-location {
    font-size: 0.9rem;
    color: var(--secondary-light);
    margin-bottom: 10px;
}

.property-features {
    font-size: 0.85rem;
    color: var(--secondary-light);
}

.property-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.property-details-btn:hover {
    background-color: var(--primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.3);
}

.property-details-btn i {
    transition: transform 0.3s ease;
}

.property-details-btn:hover i {
    transform: translateX(3px);
}

/* Responsive styles for details button */
@media (max-width: 768px) {
    .property-details-btn {
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .property-details-btn {
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        min-height: 44px;
        width: 100%;
        margin-top: 10px;
    }
    
    .property-card .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    
    .property-price {
        text-align: center;
        margin-bottom: 5px;
    }
}

/* Utility classes */
.text-primary-dark {
    color: var(--primary-dark);
}

.bg-primary-dark {
    background-color: var(--primary-dark);
    color: var(--white);
}

.text-center {
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}


/* WhatsApp Button Styles - Modifica delle classi esistenti */
.contact-button a {
    background: #25D366; /* Colore verde WhatsApp */
    color: var(--white);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Spazio tra icona e testo */
    
    white-space: nowrap; /* Evita che il testo vada a capo */
}

.contact-button a:hover {
    /*background: #25D366;  Colore verde WhatsApp */
    color: var(--white);
    /*transform: translateY(-2px);  Leggero movimento verso l'alto */
   /* box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);  Ombra più intensa */
   scale: 1.05;
}

.contact-button a i {
    font-size: 1.2rem; /* Dimensione icona WhatsApp */
    margin-right: 0; /* Reset del margin esistente */
}

/* Responsive per mobile - Override delle media queries esistenti */
@media (max-width: 768px) {
    .contact-button a {
        padding: 10px 15px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .contact-button a i {
        font-size: 1rem;
    }
}

@media (max-width: 991px) {
    /* Su mobile: solo icona WhatsApp pulita, allineata a destra */
    .contact-button {
        display: flex;
        justify-content: flex-end;
    }

    .contact-button a {
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .contact-button a:hover {
        background: transparent;
        box-shadow: none;
        transform: none;
        scale: 1;
    }

    .contact-button a span {
        display: none;
    }

    .contact-button a i {
        font-size: 1.8rem;
        color: #25D366;
    }
}

