/*
   House22 Gruppo Immobiliare - Landing Page Stylesheet
*/

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500;600;700;800&family=Pinyon+Script&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    --bg-color: #000000;
    --card-bg: #ffffff;
    --text-white: #ffffff;
    --text-gold: #f18d07; /* Arancione/oro caldo */
    --brand-red: #d91c1c; /* Rosso "22" */
    --brand-black: #000000;
    --brand-navy: #0d233a;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding: 40px 20px;
}

/* --- Layout Container --- */
.container {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ============================================================ */
/* HEADER BANNER                                                 */
/* ============================================================ */
.main-header {
    background-color: var(--card-bg);
    border-radius: 4px;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.header-title-container {
    display: flex;
    align-items: baseline;
    margin-bottom: 8px;
}

.header-title-house {
    font-size: 5.5rem;
    font-weight: 800;
    color: var(--brand-black);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -2px;
    line-height: 0.9;
}

.header-title-22 {
    font-size: 5.5rem;
    font-weight: 800;
    color: var(--brand-red);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -2px;
    line-height: 0.9;
}

.header-divider {
    width: 85%;
    height: 6px;
    background-color: var(--brand-black);
    margin-bottom: 12px;
}

.header-subtitle {
    font-size: 1.55rem;
    font-weight: 500;
    color: var(--brand-black);
    letter-spacing: 0.38em;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    line-height: 1;
}

/* Contenitore immagine logo-header (parte destra) */
.header-logo-icon {
    flex-shrink: 0;
    width: 160px;      /* dimensione display - il file JPG è 320x280 px (2x) */
    height: 140px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* L'immagine JPG si adatta al contenitore mantenendo le proporzioni */
.header-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center right;
}

/* ============================================================ */
/* GRIGLIA 3x3 DEI BRAND                                        */
/* ============================================================ */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ============================================================ */
/* BRAND CARD - contenitore link                                 */
/* ============================================================ */
.brand-card {
    background-color: var(--card-bg);
    border-radius: 4px;
    display: block;                 /* è un <a>, lo rendiamo block */
    text-decoration: none;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    /* Mantiene l'aspect-ratio 3:2 (600x400) della card */
    aspect-ratio: 3 / 2;
}

/* Bordo dorato animato sull'hover */
.brand-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: var(--transition);
    pointer-events: none;
    z-index: 2;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(223, 159, 40, 0.25);
}

.brand-card:hover::after {
    border-color: var(--text-gold);
}

/* Immagine JPG all'interno della card: riempie tutta la card */
.brand-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;    /* usa "cover" se vuoi che riempia tutta la card senza bande */
    object-position: center center;
    transition: var(--transition);
}

/* Leggero zoom sull'immagine all'hover */
.brand-card:hover img {
    transform: scale(1.03);
}

/* ============================================================ */
/* TAGLINE                                                       */
/* ============================================================ */
.main-tagline {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--text-gold);
    margin: 25px 0 10px 0;
    letter-spacing: 0.02em;
    animation: fadeIn 1.5s ease-out;
}

/* ============================================================ */
/* FOOTER                                                        */
/* ============================================================ */
.main-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
}

.footer-office-title {
    color: var(--text-gold);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-address {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-white);
    letter-spacing: 0.05em;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-top: 5px;
}

/* Link di contatto (tel, wa, email) */
.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--text-gold);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Lista città */
.footer-cities {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--text-gold);
    text-transform: uppercase;
}

.footer-cities .bullet {
    width: 6px;
    height: 6px;
    background-color: var(--text-white);
    border-radius: 50%;
    display: inline-block;
}

/* ============================================================ */
/* ANIMAZIONI                                                    */
/* ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ */
/* RESPONSIVE - Tablet (max 900px)                              */
/* ============================================================ */
@media (max-width: 900px) {
    .main-header {
        padding: 20px 25px;
    }
    .header-title-house,
    .header-title-22 {
        font-size: 4.2rem;
    }
    .header-subtitle {
        font-size: 1.2rem;
        letter-spacing: 0.28em;
    }
    .header-logo-icon {
        width: 130px;
        height: 114px;
    }
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* ============================================================ */
/* RESPONSIVE - Mobile (max 600px)                              */
/* ============================================================ */
@media (max-width: 600px) {
    body {
        padding: 20px 12px;
    }
    .main-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
        padding: 20px 15px;
    }
    .header-brand {
        align-items: center;
    }
    .header-title-container {
        justify-content: center;
    }
    .header-title-house,
    .header-title-22 {
        font-size: 3.2rem;
    }
    .header-divider {
        width: 100%;
    }
    .header-subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.22em;
    }
    .header-logo-icon {
        width: 110px;
        height: 96px;
        justify-content: center;
    }
    .brands-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .main-tagline {
        font-size: 1.25rem;
        padding: 0 10px;
    }
    .footer-address {
        font-size: 0.78rem;
    }
    .footer-cities {
        font-size: 0.7rem;
    }
}
