/* Ritorcitura Grandi - tema Grav (ispirato al layout "Modern Business" del sito precedente) */
:root {
    --nav-bg: #222;
    --nav-fg: #9d9d9d;
    --nav-fg-hover: #fff;
    --text: #333;
    --muted: #777;
    --border: #ddd;
    --panel-head: #f5f5f5;
    --link: #337ab7;
    --link-hover: #23527c;
    --bg: #fff;
    --container: 1170px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding-top: 50px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover, a:focus { color: var(--link-hover); text-decoration: underline; }

h1, h2, h3 { font-weight: 500; line-height: 1.2; margin: 20px 0 10px; }
h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid #080808;
    min-height: 50px;
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.brand {
    color: var(--nav-fg);
    font-size: 18px;
    line-height: 50px;
    padding-right: 15px;
}
.brand:hover, .brand:focus { color: var(--nav-fg-hover); text-decoration: none; }

.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.menu a {
    display: block;
    padding: 15px;
    line-height: 20px;
    color: var(--nav-fg);
}
.menu a:hover, .menu a:focus { color: var(--nav-fg-hover); text-decoration: none; }
.menu a.active { color: #fff; background: #080808; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 9px 10px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 767px) {
    .nav-toggle { display: block; }
    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        border-top: 1px solid #101010;
        padding: 6px 0;
    }
    .menu.open { display: flex; }
    .menu a { padding: 10px 0; }
    .menu a.active { background: transparent; }
}

/* Carousel home */
.carousel {
    position: relative;
    height: 75vh;
    min-height: 280px;
    overflow: hidden;
    background: #000;
}
.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
}
.slide.active { opacity: 1; }
.carousel-ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.25);
    color: #fff;
    border: 0;
    font-size: 48px;
    line-height: 1;
    width: 56px;
    height: 72px;
    cursor: pointer;
}
.carousel-ctrl:hover, .carousel-ctrl:focus { background: rgba(0,0,0,.5); }
.carousel-ctrl.prev { left: 0; }
.carousel-ctrl.next { right: 0; }
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.carousel-dots button {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.carousel-dots button.active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .slide { transition: none; }
}

/* Intestazioni pagina */
.page-head { margin-bottom: 20px; }
.page-head h1, .section-title {
    padding-bottom: 9px;
    margin: 40px 0 20px;
    border-bottom: 1px solid #eee;
}
.breadcrumb {
    list-style: none;
    margin: 0;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
}
.breadcrumb li + li::before { content: "/\00a0"; padding: 0 5px; color: #ccc; }
.breadcrumb li[aria-current] { color: var(--muted); }

/* Griglie */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-contact { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 991px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

section.grid { margin-top: 20px; }

/* Pannelli servizi */
.panel {
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
}
.panel-heading {
    margin: 0;
    padding: 10px 15px;
    font-size: 18px;
    background: var(--panel-head);
    border-bottom: 1px solid var(--border);
    border-radius: 3px 3px 0 0;
}
.panel-body { padding: 15px; }
.panel-body img { width: 100%; margin-bottom: 10px; }

/* Immagini */
.shadow { box-shadow: 5px 5px 5px 1px #c9c5c5; }
.bordered { border: 4px solid #fff; }
.grid img.shadow { width: 100%; transition: opacity .2s; }
.grid img.shadow:hover { opacity: .85; }

/* Reparto */
.machine h3 { margin-top: 20px; }
.machine p { margin: 0; }

/* Mappa (caricamento su consenso) */
.map {
    position: relative;
    width: 100%;
    min-height: 450px;
    background: #eceae6;
    border-radius: 4px;
    overflow: hidden;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    gap: 6px;
}
.map-consent p { max-width: 460px; margin: 0; color: #555; font-size: 14px; }

.btn {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.btn:hover, .btn:focus { background: #e6e6e6; text-decoration: none; color: var(--text); }

/* Testo */
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.error-code { font-size: 100px; line-height: 1; margin: 20px 0; }

/* Footer */
.site-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    color: #555;
}
.site-footer p { margin: 0 0 8px; }
.site-footer .copy { color: var(--muted); font-size: 13px; }

:focus-visible { outline: 2px solid #66afe9; outline-offset: 2px; }
