@import 'user/colors.css';

/* =========================================
   1. GLOBAL & RESET
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-body);
    overflow-x: hidden;
    padding: 0 0 50px;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    color: var(--text-heading);
}

.text-primary { color: var(--color-primary); }

/* =========================================
   2. HEADER & NAVIGAZIONE
   ========================================= */
.site-header {
    padding: 15px 5%; /* Ridotto leggermente per consistenza */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color-light);
    position: sticky;
    top: 0;
    background: var(--bg-header-blur);
    backdrop-filter: blur(8px);
    z-index: 1000;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 40px; /* Altezza fissa per evitare salti */
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-weight: 500;
    font-size: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.header-buttons { display: flex; gap: 10px; }

/* Bottoni */
.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    white-space: nowrap; /* Impedisce al testo di andare a capo */
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-heading);
    background: var(--bg-white);
}
.btn-outline:hover { background-color: var(--bg-light); border-color: var(--border-color-hover); }

.btn-solid {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-btn-primary);
}
.btn-solid:hover { background: var(--color-primary-dark); }

/* =========================================
   3. CONTENUTO PAGINA CONTATTI
   ========================================= */
.page-title {
    text-align: center;
    margin: 40px 0;
    color: var(--text-heading);
    font-weight: 700;
    font-size: 32px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.info-section {
    width: 100%;
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.section-title {
    margin-bottom: 30px;
    color: var(--text-heading);
    border-bottom: 2px solid var(--border-color-light);
    padding-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Card Stile */
.info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    height: 100%;
}

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

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* Gradienti (Mantenuti fissi in quanto brand colors) */
.bg-phone { background: linear-gradient(135deg, #3498db, #2980b9); }
.bg-email { background: linear-gradient(135deg, #e67e22, #d35400); }
.bg-insta { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }

.info-card h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-heading);
    text-transform: uppercase;
    font-weight: 700;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.contact-item {
    display: block;
    padding: 10px;
    background-color: var(--bg-body-alt);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
    word-break: break-word; /* Importante per email lunghe su mobile */
}

.contact-item:hover {
    background-color: var(--bg-light);
    color: var(--color-primary);
    transform: translateX(3px);
    box-shadow: var(--shadow-card);
}

/* Mappa */
.map-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 350px;
    background: var(--bg-white);
}

.map-label {
    background: var(--bg-dark-section);
    color: var(--text-light);
    padding: 12px 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.map-wrapper iframe {
    border: none;
    width: 100%;
    flex-grow: 1;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 60px;
}

/* =========================================
   4. MEDIA QUERIES (RESPONSIVENESS)
   ========================================= */

/* Tablet & Laptop piccoli */
@media (max-width: 900px) {
    .contacts-grid {
        grid-template-columns: 1fr; /* Colonna singola per le card */
    }

    .nav-links {
        display: none; /* Nasconde il menu di navigazione centrale */
    }
}

/* Mobile (Smartphone) */
@media (max-width: 480px) {
    /* Header: ottimizzazione spazio */
    .site-header {
        padding: 10px 15px;
    }

    .logo img {
        height: 32px; /* Logo leggermente più piccolo */
    }

    /* Contenitore Pagina */
    .main-container {
        padding: 0 10px; /* Riduce i margini laterali */
    }

    .page-title {
        font-size: 24px;
        margin: 25px 0;
    }

    .info-section {
        padding: 20px 15px; /* Meno padding interno alla card bianca */
    }

    .contacts-grid {
        gap: 20px;
    }

    .info-card {
        padding: 20px 15px; /* Card più compatte */
    }

    /* Mappa su mobile */
    .map-wrapper {
        min-height: 300px; /* Altezza garantita */
    }

    .map-wrapper iframe {
        height: 300px;
    }
}