/* Stile generale del sito */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #1d2733;
    background-color: #f4f7fb;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1180px;
    margin: 0 auto;
}

/* Header e navigazione */
.site-header {
    background-color: #0d1a27;
    border-bottom: 1px solid #1b3147;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    width: 220px;
    height: auto;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 15px;
}

.main-nav a:hover {
    color: #bce4ff;
}

.menu-button {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 590px;
    color: #ffffff;
    background-image: url("assets/img/hero_impianti.jpg");
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    min-height: 590px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(13, 26, 39, 0.88), rgba(13, 26, 39, 0.58), rgba(13, 26, 39, 0.08));
}

.hero-content {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    align-items: center;
}

.hero-text {
    max-width: 670px;
}

.hero h1 {
    font-size: 46px;
    line-height: 1.12;
    margin: 10px 0 20px;
}

.hero p {
    font-size: 18px;
}

.eyebrow,
.section-label {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0d62a8;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 8px;
}

.eyebrow {
    color: #bce4ff;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}

.primary {
    background-color: #e21f2f;
    color: #ffffff;
}

.primary:hover {
    background-color: #bf1725;
}

.secondary {
    background-color: #ffffff;
    color: #103a5c;
}

.secondary:hover {
    background-color: #eef4fa;
}

/* Sezioni */
.section {
    padding: 72px 0;
}

.white-section {
    background-color: #ffffff;
}

.soft-section {
    background-color: #eef4fa;
}

.contact-section {
    background-color: #ffffff;
}

.section h2 {
    font-size: 34px;
    margin: 0 0 16px;
    color: #10243a;
}

.section-intro {
    max-width: 820px;
    margin-bottom: 32px;
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 44px;
    align-items: center;
}

.image-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.image-card img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.info-box {
    background-color: #eef4fa;
    border-left: 5px solid #0d62a8;
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
}

.info-box h3 {
    margin-top: 0;
}

.info-box ul {
    padding-left: 20px;
    margin-bottom: 0;
}

/* Schede categorie */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.service-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.service-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 14px;
    background-color: #f7f9fc;
    border-radius: 12px;
}

.service-card h3 {
    margin: 0 0 10px;
    color: #103a5c;
    font-size: 18px;
}

.service-card p {
    margin: 0;
    font-size: 14px;
}

/* Marchi */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.brand-card {
    background-color: #ffffff;
    border: 1px solid #d8e2ef;
    border-radius: 14px;
    padding: 16px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.brand-card img {
    width: 100%;
    height: 90px;
    object-fit: contain;
}

.brand-card span {
    font-weight: bold;
    color: #103a5c;
    text-align: center;
}

/* Contatti */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 40px;
}

.contact-list {
    background-color: #eef4fa;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
}

.contact-list p {
    margin: 8px 0;
}

.contact-list a {
    color: #0d62a8;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-form {
    background-color: #f4f7fb;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    margin-top: 0;
}

.contact-form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #c9d5e3;
    border-radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.contact-form button {
    margin-top: 18px;
}

.small-note {
    font-size: 13px;
    color: #5f6f81;
}

/* Footer */
.site-footer {
    background-color: #0d1a27;
    color: #ffffff;
    padding: 24px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-content p {
    margin: 0;
}

.footer-content a {
    color: #ffffff;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Adattamento per tablet e telefono */
@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .hero-content,
    .two-columns,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .hero-overlay {
        min-height: 520px;
    }

    .cards-grid,
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .menu-button {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background-color: #0d1a27;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid #1b3147;
    }

    .main-nav.open {
        display: flex;
    }

    .hero,
    .hero-overlay {
        min-height: 560px;
    }

    .hero h1 {
        font-size: 33px;
    }

    .cards-grid,
    .brand-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        width: 180px;
    }

    .image-card img {
        height: 300px;
    }
}

/* Stili semplici per le pagine PHP collegate al database */
.page-message {
    min-height: 65vh;
    display: flex;
    align-items: center;
}

.success-box {
    background: #ffffff;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 25px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.admin-table th,
.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #12355b;
    color: #ffffff;
}

.visible-nav {
    display: flex;
}
