/* =========================================================
   HYDRA THEME — main.css
   Struttura: variabili -> reset minimo -> layout generico ->
   header varianti -> mini-header varianti -> footer varianti ->
   page-title -> blog/portfolio -> utility.
   ========================================================= */

:root {
    --hydra-color-text: #16181d;
    --hydra-color-bg: #ffffff;
    --hydra-color-accent: #1a1a1a;
    --hydra-color-muted: #6b7280;
    --hydra-color-border: #e5e7eb;
    --hydra-header-height: 88px;
    --hydra-container-width: 1280px;
    --hydra-font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --hydra-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--hydra-font-base);
    color: var(--hydra-color-text);
    background: var(--hydra-color-bg);
    line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

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

/* ---------- HEADER: base comune ---------- */
.hydra-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: background-color var(--hydra-transition), box-shadow var(--hydra-transition);
}

.hydra-header__inner {
    max-width: var(--hydra-container-width);
    margin: 0 auto;
    height: var(--hydra-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.hydra-menu {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.hydra-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
}
.hydra-header__burger span {
    display: block;
    height: 2px;
    background: currentColor;
    width: 100%;
}

/* Header 1: trasparente -> bianco allo scroll */
.hydra-header--transparent {
    background-color: transparent;
    color: #ffffff;
}
.hydra-header--transparent.is-scrolled {
    background-color: #ffffff;
    color: var(--hydra-color-text);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Header 2: sempre bianco, logo centrato */
.hydra-header--solid {
    background-color: #ffffff;
    color: var(--hydra-color-text);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.hydra-header__inner--split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.hydra-header__nav--right .hydra-menu { justify-content: flex-end; }

/* Header 3: scuro con off-canvas */
.hydra-header--dark {
    background-color: #0f0f10;
    color: #ffffff;
}
.hydra-offcanvas {
    position: fixed;
    inset: 0;
    background: #0f0f10;
    color: #fff;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform var(--hydra-transition);
}
.hydra-offcanvas.is-open { transform: translateY(0); }
.hydra-offcanvas__menu {
    list-style: none;
    text-align: center;
    font-size: 2.2rem;
    padding: 0;
}
.hydra-offcanvas__menu li { margin: 16px 0; }
.hydra-offcanvas__close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* ---------- MINI-HEADER ---------- */
.hydra-mini-header {
    background: var(--hydra-color-accent);
    color: #fff;
    font-size: 0.85rem;
    position: relative;
    z-index: 998;
}
.hydra-mini-header__inner {
    max-width: var(--hydra-container-width);
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hydra-mini-header--contacts a { margin-right: 16px; opacity: 0.85; }
.hydra-mini-header--announcement { text-align: center; }
.hydra-mini-header--announcement .hydra-mini-header__inner { justify-content: center; position: relative; }
.hydra-mini-header__dismiss {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}
.hydra-mini-header.is-dismissed { display: none; }

/* ---------- PAGE TITLE ---------- */
.hydra-page-title {
    padding: calc(var(--hydra-header-height) + 64px) 24px 64px;
    background: #f7f7f8;
    text-align: center;
}
.hydra-page-title__heading { margin: 0 0 8px; font-size: 2.4rem; }
.hydra-breadcrumb { color: var(--hydra-color-muted); font-size: 0.9rem; }
.hydra-breadcrumb a { color: var(--hydra-color-muted); }

/* ---------- FOOTER varianti ---------- */
.hydra-footer { background: #101114; color: #d1d5db; }
.hydra-footer__columns {
    max-width: var(--hydra-container-width);
    margin: 0 auto;
    padding: 64px 24px 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.hydra-footer__col h4 { color: #fff; margin-top: 0; }
.hydra-footer__menu { list-style: none; padding: 0; margin: 0; }
.hydra-footer__menu li { margin-bottom: 8px; }
.hydra-footer__newsletter { display: flex; gap: 8px; }
.hydra-footer__newsletter input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #2a2c31;
    background: #17181c;
    color: #fff;
}
.hydra-footer__newsletter button {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: #101114;
    cursor: pointer;
}
.hydra-footer__bottom {
    text-align: center;
    padding: 16px 24px;
    border-top: 1px solid #23252a;
    font-size: 0.85rem;
}

.hydra-footer--minimal .hydra-footer__inner {
    max-width: var(--hydra-container-width);
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.hydra-footer__menu--inline { display: flex; gap: 20px; }

.hydra-footer__wide-grid {
    max-width: var(--hydra-container-width);
    margin: 0 auto;
    padding: 64px 24px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.hydra-footer__wide-grid--single { grid-template-columns: 1fr; }
.hydra-footer__map iframe, .hydra-footer__map { width: 100%; min-height: 280px; border: 0; border-radius: 8px; }

/* ---------- BLOG / CARD ---------- */
.hydra-blog__grid, .hydra-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.hydra-card {
    border: 1px solid var(--hydra-color-border);
    border-radius: 8px;
    overflow: hidden;
}
.hydra-card__body { padding: 20px; }
.hydra-card__meta { color: var(--hydra-color-muted); font-size: 0.8rem; margin: 0 0 8px; }
.hydra-card__title { font-size: 1.15rem; margin: 0 0 8px; }
.hydra-card__link { font-weight: 600; }

.hydra-single__thumbnail img { width: 100%; border-radius: 8px; }
.hydra-single__meta { color: var(--hydra-color-muted); font-size: 0.9rem; margin: 16px 0; display: flex; gap: 16px; }

.hydra-portfolio-filters { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.hydra-portfolio-filter {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--hydra-color-border);
    background: transparent;
    cursor: pointer;
}
.hydra-portfolio-filter.is-active { background: var(--hydra-color-accent); color: #fff; }
.hydra-portfolio-item { border-radius: 8px; overflow: hidden; }
.hydra-portfolio-item__image { aspect-ratio: 4/3; overflow: hidden; }
.hydra-portfolio-item__image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--hydra-transition); }
.hydra-portfolio-item:hover .hydra-portfolio-item__image img { transform: scale(1.05); }
.hydra-portfolio-item__title { margin: 12px 0; font-size: 1rem; }
.hydra-portfolio-item[data-hidden="true"] { display: none; }

.hydra-pagination { text-align: center; margin-top: 40px; }
.hydra-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid var(--hydra-color-border);
    border-radius: 4px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .hydra-header__nav { display: none; }
    .hydra-header__burger { display: flex; }
    .hydra-header__inner--split { grid-template-columns: auto 1fr auto; }
    .hydra-header__nav--left, .hydra-header__nav--right { display: none; }
    .hydra-footer__columns { grid-template-columns: 1fr 1fr; }
    .hydra-blog__grid, .hydra-portfolio-grid { grid-template-columns: 1fr 1fr; }
    .hydra-footer__wide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .hydra-footer__columns { grid-template-columns: 1fr; }
    .hydra-blog__grid, .hydra-portfolio-grid { grid-template-columns: 1fr; }
    .hydra-page-title__heading { font-size: 1.8rem; }
}
