/* ===== Variables ===== */
:root {
    --purple-dark: #5a3d5c;
    --purple-muted: #8a7090;
    --green-accent: #4db8a4;
    --green-text: #3aaa8a;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.90);
    --white-80: rgba(255, 255, 255, 0.80);
    --white-70: rgba(255, 255, 255, 0.70);
    --dark-text: #2d2d2d;
    --gray-text: #555;
    --footer-bg: #4a3550;
    --navbar-bg: #f0eaec;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    padding: 0 3%;
    background: var(--navbar-bg) url('../images/triangoli.png') center / cover no-repeat;
    height: 80px;
    position: relative;
    z-index: 100;
}

.navbar-logo {
    flex-shrink: 0;
    margin-right: 2rem;
}

.navbar-logo img {
    height: 60px;
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: 0;
    flex: 1;
}

.navbar-links li a {
    display: block;
    text-decoration: none;
    color: var(--purple-muted);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s;
}

.navbar-links li a:hover {
    color: var(--purple-dark);
}

.navbar-links li a.active {
    background: var(--purple-dark);
    color: var(--white);
    border-radius: 4px;
}

.navbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.search-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.search-input {
    border: none;
    border-bottom: 1px solid var(--purple-muted);
    background: transparent;
    padding: 0.3rem 0.5rem;
    width: 150px;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--purple-dark);
    outline: none;
}

/* triangoli integrati come background della navbar */

/* ===== Page content ===== */
.page-content {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3rem 5%;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px - 140px);
    position: relative;
}

/* ===== Glass card ===== */
.glass-card {
    background: var(--white-80);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 4px;
    padding: 2.5rem 3rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card-light {
    background: var(--white-70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===== Page header card ===== */
.page-header {
    max-width: 900px;
    margin-bottom: 2rem;
    position: relative;
}

.page-header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.page-header .header-logo {
    height: auto;
    max-width: 250px;
}

.page-header .page-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--purple-dark);
    background: var(--white-70);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
}

.page-header .header-description {
    font-size: 1rem;
    color: var(--dark-text);
    line-height: 1.7;
}

/* ===== HOME page ===== */
.home-hero {
    max-width: 65%;
    margin: 1.5rem 0;
    padding: 2rem 3rem 2rem;
}

.home-hero .hero-logo {
    max-width: 380px;
    margin-bottom: 2rem;
}

.home-hero .hero-payoff {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--green-accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.home-hero .hero-payoff span {
    color: var(--purple-dark);
    margin: 0 0.3rem;
}

.home-hero .hero-more {
    display: block;
    text-align: right;
    color: var(--green-text);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    margin-bottom: 1rem;
}

.home-hero .hero-more:hover {
    color: var(--purple-dark);
}

.home-hero .hero-text {
    font-size: 0.95rem;
    color: var(--dark-text);
    line-height: 1.7;
}

/* ===== Services grid ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 2rem;
}

.service-card {
    background: var(--white-70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-card .service-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.service-card .service-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
}

.service-card .service-header img {
    height: 28px;
    width: auto;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--gray-text);
    line-height: 1.6;
}

/* ===== ABOUT page ===== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content .about-intro {
    font-size: 1rem;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-content .about-body {
    font-size: 0.95rem;
    color: var(--gray-text);
    line-height: 1.8;
}

/* ===== SERVIZI page ===== */
.servizi-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.servizi-detail-card {
    background: var(--white-70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.servizi-detail-card .service-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.servizi-detail-card .service-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
}

.servizi-detail-card .service-header img {
    height: 28px;
}

.servizi-detail-card .service-intro {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.servizi-detail-card .service-body {
    font-size: 0.85rem;
    color: var(--gray-text);
    line-height: 1.7;
}

/* ===== CONTATTI page ===== */
.contatti-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.contact-form-wrapper {
    margin-left: auto;
    margin-top: 2rem;
    width: 380px;
}

.contact-form {
    background: var(--white-70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 0.6rem 0.8rem;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--dark-text);
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-bottom-color: var(--green-accent);
}

.contact-form textarea {
    resize: vertical;
    min-height: 60px;
}

.btn-submit {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: var(--white-80);
    color: var(--purple-dark);
    border: 1px solid var(--purple-muted);
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    margin-top: 0.5rem;
    align-self: center;
}

.btn-submit:hover {
    background: var(--purple-dark);
    color: var(--white);
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 1rem;
    max-width: 380px;
    margin-left: auto;
}

.alert-success {
    background: rgba(236, 253, 245, 0.9);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: rgba(254, 242, 242, 0.9);
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ===== Footer ===== */
.footer {
    background: var(--footer-bg);
    color: var(--white);
}

.footer-top {
    padding: 1rem 3%;
}

.btn-contatti {
    display: inline-block;
    padding: 0.5rem 1.8rem;
    background: transparent;
    color: var(--green-accent);
    border: 1px solid var(--green-accent);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    transition: all 0.3s;
}

.btn-contatti:hover {
    background: var(--green-accent);
    color: var(--white);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-social a img {
    height: 32px;
    width: 32px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-social a:hover img {
    opacity: 1;
}

.footer-info {
    text-align: center;
    flex: 1;
}

.footer-info p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-info .visit-stats {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.3rem;
}

.footer-credits {
    display: flex;
    align-items: flex-end;
}

.footer-credits img {
    height: auto;
    width: 200px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-credits a:hover img {
    opacity: 1;
}

/* ===== Risorse / Articoli ===== */
.articoli-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.articolo-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.articolo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.articolo-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.articolo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.articolo-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.articolo-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.articolo-category {
    background: var(--green-accent);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.articolo-date {
    color: var(--purple-muted);
    font-weight: 500;
}

.articolo-author {
    color: var(--purple-muted);
    font-weight: 500;
}

.articolo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.articolo-summary {
    font-size: 0.9rem;
    color: var(--gray-text);
    line-height: 1.6;
    flex: 1;
}

.articolo-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--green-text);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.articolo-card:hover .articolo-link {
    color: var(--purple-dark);
}

.articoli-empty {
    margin-top: 2rem;
    text-align: center;
    padding: 3rem;
}

.articoli-empty p {
    font-size: 1rem;
    color: var(--gray-text);
}

/* Article detail */
.articolo-detail {
    max-width: 800px;
}

.articolo-back {
    display: inline-block;
    color: var(--green-text);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.articolo-back:hover {
    color: var(--purple-dark);
}

.articolo-full {
    padding: 2.5rem 3rem;
}

.articolo-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.articolo-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.articolo-detail-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.articolo-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.articolo-content {
    font-size: 0.95rem;
    color: var(--dark-text);
    line-height: 1.8;
}

.articolo-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: var(--purple-dark);
}

.articolo-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--dark-text);
}

.articolo-content p {
    margin-bottom: 1rem;
}

.articolo-content ul,
.articolo-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.articolo-content li {
    margin-bottom: 0.5rem;
}

.articolo-content figure.article-figure {
    margin: 2rem auto;
    text-align: center;
}

.articolo-content figure.article-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
}

.articolo-content figure.article-figure figcaption {
    font-size: 0.85rem;
    color: var(--gray-text);
    margin-top: 0.75rem;
    font-style: normal;
}

.articolo-content blockquote {
    border-left: 3px solid var(--green-accent);
    padding: 0.75rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(77, 184, 164, 0.05);
    font-style: italic;
    color: var(--gray-text);
}

.articolo-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

.articolo-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.articolo-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== Article series ===== */
.series-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--purple-dark);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.series-label {
    font-weight: 700;
}

.series-chapter {
    opacity: 0.8;
    font-size: 0.8rem;
}

.series-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

.series-nav a {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--white-80);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    text-decoration: none;
    color: var(--purple-dark);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.series-nav a:hover {
    background: var(--purple-dark);
    color: white;
}

.series-nav-next {
    margin-left: auto;
}

/* Article TOC */
.article-toc {
    background: rgba(90, 61, 92, 0.05);
    border: 1px solid rgba(90, 61, 92, 0.15);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.article-toc h3 {
    font-size: 0.9rem;
    color: var(--purple-dark);
    margin-bottom: 0.75rem;
}

.article-toc ol {
    padding-left: 1.5rem;
    margin: 0;
}

.article-toc li {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.article-toc a {
    color: var(--green-text);
    text-decoration: none;
    font-weight: 500;
}

.article-toc a:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

.article-toc .toc-current {
    color: var(--purple-dark);
    font-weight: 700;
}

/* Article lesson box */
.article-lesson {
    background: rgba(77, 184, 164, 0.08);
    border-left: 4px solid var(--green-accent);
    border-radius: 0 4px 4px 0;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dark-text);
}

.article-lesson strong {
    color: var(--green-text);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Article subtitle */
.article-subtitle {
    font-size: 1rem;
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 1.5rem;
}

/* Article CTA */
.article-cta {
    background: var(--purple-dark);
    color: white;
    border-radius: 4px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.article-cta p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

.article-cta-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--green-accent);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: all 0.3s;
}

.article-cta-btn:hover {
    background: white;
    color: var(--purple-dark);
}

/* ===== Language selector (in navbar) ===== */
.navbar-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    border-left: 1px solid rgba(138, 112, 144, 0.3);
    padding-left: 1rem;
}

.lang-btn {
    padding: 3px 10px;
    border: 1px solid var(--purple-muted);
    border-radius: 4px;
    background: transparent;
    color: var(--purple-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.4;
}

.lang-btn:hover {
    background: rgba(90, 61, 92, 0.08);
    color: var(--purple-dark);
    border-color: var(--purple-dark);
}

.lang-btn.active {
    background: var(--purple-dark);
    color: var(--white);
    border-color: var(--purple-dark);
}

.lang-btn.detected {
    border-color: var(--green-accent);
    color: var(--green-accent);
}

.lang-btn.detected.active {
    background: var(--green-accent);
    color: var(--white);
    border-color: var(--green-accent);
}

.lang-select {
    padding: 3px 4px;
    border: 1px solid var(--purple-muted);
    border-radius: 4px;
    background: transparent;
    color: var(--purple-muted);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lang-select:hover {
    border-color: var(--purple-dark);
    color: var(--purple-dark);
}

.lang-select option {
    background: var(--white);
    color: var(--dark-text);
    font-size: 0.85rem;
}

/* ===== Article comments ===== */
.commenti-section,
.commenti-form-section {
    max-width: 800px;
    margin-top: 2rem;
    padding: 2rem 2.5rem;
}

.commenti-heading,
.commenti-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 1rem;
}

.commenti-form-hint {
    font-size: 0.9rem;
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.commento {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.commento:first-of-type {
    padding-top: 0;
}

.commento:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.commento-meta {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.commento-author {
    font-weight: 700;
    color: var(--dark-text);
}

.commento-date {
    color: var(--purple-muted);
    font-size: 0.8rem;
}

.commento-body {
    font-size: 0.95rem;
    color: var(--dark-text);
    line-height: 1.7;
    white-space: pre-wrap;
}

.commento-reply {
    background: rgba(77, 184, 164, 0.06);
    border-left: 3px solid var(--green-accent);
    border-radius: 0 4px 4px 0;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.commento-reply-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.commento-reply-body {
    font-size: 0.9rem;
    color: var(--dark-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.form-group-check {
    font-size: 0.85rem;
    color: var(--gray-text);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Progressive article translation: banner shown at the bottom of a
   partially-translated article until the last chunk arrives. */
.i18n-translating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.5rem 0 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(77, 184, 164, 0.08);
    border-left: 3px solid var(--green-accent);
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem;
    color: var(--gray-text);
    font-style: italic;
}

.i18n-translating .i18n-spinner {
    margin-left: 0;
}

/* i18n loading spinner */
.i18n-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    border: 2px solid var(--purple-muted);
    border-top-color: var(--green-accent);
    border-radius: 50%;
    animation: i18nSpin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes i18nSpin {
    to { transform: rotate(360deg); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .services-grid,
    .servizi-detail-grid {
        grid-template-columns: 1fr;
    }

    .articoli-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        margin-left: 0;
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.8rem 3%;
        gap: 0.5rem;
    }

    .navbar-logo {
        margin-right: 0;
    }

    .navbar-logo img {
        height: 40px;
    }

    /* Links drop to second row; lang stays on first row next to logo */
    .navbar-links {
        order: 3;
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 0;
    }

    .navbar-links li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    .navbar-lang {
        order: 2;
        border-left: none;
        padding-left: 0;
        gap: 4px;
    }

    .lang-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .navbar-search {
        display: none;
    }

    .navbar-triangoli {
        display: none;
    }

    .page-content {
        padding: 2rem 4%;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .articolo-full {
        padding: 1.5rem;
    }

    .articolo-detail-title {
        font-size: 1.3rem;
    }

    .home-hero {
        max-width: 100%;
    }

    .home-hero .hero-logo {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-social {
        order: 2;
    }

    .footer-info {
        order: 1;
    }

    .footer-credits {
        order: 3;
    }
}
