/* Core Stylesheet for Cencora Medicine & Drugs Rebuild */

/* --- Font Definitions --- */
@font-face {
    font-family: 'Cencora Gilroy';
    src: url('../fonts/Cencora-Gilroy-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cencora Gilroy';
    src: url('../fonts/Cencora-Gilroy-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cencora Gilroy';
    src: url('../fonts/Cencora-Gilroy-MediumItalic.otf') format('opentype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cencora Gilroy';
    src: url('../fonts/Cencora-Gilroy-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Design Tokens --- */
:root {
    --primary: #461E96;      /* Violet */
    --secondary: #00B4E6;    /* Unified Brand Blue/Accent */
    --primary-light: #6C3ED1;
    --accent: #00B4E6;       /* Unified Brand Blue/Accent */
    --bg: #F8F9FD;
    --card-bg: #FFFFFF;
    --text: #22252A;
    --text-muted: #5C626E;
    --text-light: #FFFFFF;
    --border: #E8ECF5;
    --shadow-sm: 0 2px 4px rgba(70, 30, 150, 0.05);
    --shadow-md: 0 10px 25px rgba(70, 30, 150, 0.08);
    --shadow-lg: 0 20px 40px rgba(70, 30, 150, 0.12);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Cencora Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --max-width: 1280px;
}

/* --- Resets & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Layout Containers --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--primary); /* Violet background */
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.site-header.scrolled {
    padding: 10px 0;
    background-color: #371675; /* Darker violet on scroll */
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    padding: 8px 0;
    text-transform: uppercase;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00B4E6; /* Light blue highlight */
    transition: var(--transition);
}

.nav-link-monography::after {
    background-color: #E6008C; /* Pink/Magenta highlight for monography */
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-newsletter {
    background-color: var(--text-light);
    color: var(--secondary) !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

.btn-newsletter:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-light); /* White toggle for visibility */
}

/* --- Hero Section --- */
.hero {
    position: relative;
    background-image: url('../images/sfondo hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: var(--text-light);
    padding: 0; /* Padding is handled by hero-bar and min-height */
    text-align: center;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bar {
    width: 100%;
    background-color: #3e2f91; /* Violet color matching PDF exactly */
    padding: 45px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 30px;
    font-weight: 500;
    opacity: 0.9;
    letter-spacing: 0.5px;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Content Typography --- */
.section-title {
    font-size: 36px;
    color: var(--secondary);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

/* --- Grid Systems --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

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

/* --- Card Components --- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background-color: #E2E8F0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
    z-index: 2;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title {
    font-size: 23px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-desc {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: auto;
}

.read-more-link {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.read-more-link:hover {
    color: var(--accent);
}

/* --- Publication Card Specifics (Book style) --- */
.publication-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    padding: 24px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    align-items: start;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.pub-cover {
    width: 140px;
    aspect-ratio: 3/4;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 16px rgba(42, 46, 128, 0.15);
    object-fit: cover;
    background-color: #E2E8F0;
    transition: var(--transition);
}

.publication-card:hover .pub-cover {
    transform: scale(1.03) rotate(-2deg);
}

.pub-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pub-meta {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.pub-title {
    font-size: 23px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.pub-title-monography {
    color: #E6008C;
}

.pub-title-journal {
    color: #00B4E6;
}

.pub-subtitle {
    font-size: 17px;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.pub-desc {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.pub-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--text-light);
}

/* --- Archive & Filtering Elements --- */
.archive-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 50px;
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.search-box {
    display: flex;
    gap: 12px;
    width: 100%;
}

.search-input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(70, 30, 150, 0.15);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.filter-tab {
    padding: 8px 18px;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-lg);
    background-color: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.filter-tab:hover, .filter-tab.active {
    background-color: var(--primary-light);
    color: var(--text-light);
}

.filter-tab-all:hover, .filter-tab-all.active {
    background-color: #461E96 !important;
    color: white !important;
}

.filter-tab-journal:hover, .filter-tab-journal.active {
    background-color: #00B4E6 !important;
    color: white !important;
}

.filter-tab-monography:hover, .filter-tab-monography.active {
    background-color: #E6008C !important;
    color: white !important;
}

.archive-timeline {
    position: relative;
    padding-left: 0;
}

.archive-timeline::before {
    display: none;
}

.archive-year-group {
    margin-bottom: 40px;
}

.archive-year-title {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.archive-year-title::before {
    display: none;
}

.archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* --- Contact Page --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-panel {
    background-color: #461E96;
    color: var(--text-light);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-info-title {
    font-size: 28px;
    font-weight: 700;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-info-icon {
    font-size: 20px;
    margin-top: 4px;
}

.contact-info-text h4 {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.contact-info-text p {
    font-size: 15px;
    opacity: 0.8;
}

.contact-form-panel {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.form-control {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(70, 30, 150, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.form-checkbox-label input {
    margin-top: 3px;
}

.form-alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
}

.form-alert-success {
    background-color: #E6F4EA;
    color: #137333;
    border: 1px solid #C4EED0;
}

.form-alert-error {
    background-color: #FCE8E6;
    color: #C5221F;
    border: 1px solid #FAD2CF;
}

/* --- Footer Elements --- */
.site-footer {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 60px 0 30px;
    margin-top: auto;
    border-top: 4px solid var(--accent);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: center;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.footer-logo-brand {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.footer-logo-sub {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
    color: var(--text-light);
}

.footer-text {
    font-size: 11px;
    opacity: 0.7;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 13px;
}

.footer-links-title {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.footer-links a {
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: #E6008C;
}

.footer-bottom-cencora {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 13px;
}

.footer-bottom-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: flex-start;
}

.footer-bottom-links a {
    color: var(--text-light);
    text-decoration: underline;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    opacity: 1;
    color: #E6008C;
}

.footer-copyright-cencora {
    font-size: 11px;
    opacity: 0.7;
    text-align: left;
    margin-top: 8px;
}

/* --- GDPR Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none; /* Controlled by JavaScript */
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: var(--text-muted);
}

.cookie-text a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.cookie-btn-accept {
    background-color: var(--primary);
    color: var(--text-light);
}

.cookie-btn-accept:hover {
    background-color: #6C3ED1; /* primary-light fallback */
}

.cookie-btn-decline {
    background-color: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.cookie-btn-decline:hover {
    background-color: #e8ecf5;
    color: var(--text);
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 16px;
        gap: 16px;
    }
    
    .cookie-actions {
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
    }
}

/* --- Article Detail Page --- */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 40px;
}

.article-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.article-category {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.25;
    margin-bottom: 16px;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.article-img {
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.article-body {
    font-size: 21px;
    color: var(--text);
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 20px;
}

/* Strip inline backgrounds from rich text copy-pastes */
.article-body span,
.article-body strong,
.article-body em,
.article-body p {
    background-color: transparent !important;
}

.article-body h2, .article-body h3 {
    color: var(--secondary);
    margin: 35px 0 15px;
    font-weight: 700;
}

.article-body h2 {
    font-size: 24px;
}

.article-body h3 {
    font-size: 20px;
}

/* --- Newsletter Modal / Popup --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(22, 23, 38, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 36px;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--accent);
}

.modal-title {
    font-size: 24px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-container {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .header-container {
        justify-content: flex-end;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 40px;
        align-items: flex-start;
        gap: 24px;
        transition: var(--transition);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav .nav-link {
        color: var(--secondary) !important;
    }
    
    .main-nav .nav-link:hover, .main-nav .nav-link.active {
        color: var(--primary) !important;
    }
    
    .header-actions {
        display: none; /* Hide newsletter button on mobile header, can add inside mobile nav */
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .publication-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    
    .pub-info {
        align-items: center;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }
    
    .footer-links {
        align-items: center;
        text-align: center;
    }
    
    .footer-bottom {
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .footer-bottom-left {
        display: none;
    }
    
    .footer-bottom-right {
        justify-content: center;
    }
}

/* --- Editorial Board & Timeline Styles --- */
.board-container {
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding-top: 60px;
}

.board-title {
    font-size: 32px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: left;
}

.board-group-title {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.board-card {
    display: flex;
    background-color: #f7f8fa; /* Light grey card background matching PDF fill */
    border: 1px solid #e1e4eb;
    border-radius: 8px;
    overflow: hidden;
    min-height: 180px;
    transition: var(--transition);
}

.board-card:hover {
    box-shadow: 0 8px 25px rgba(70, 30, 150, 0.08);
    transform: translateY(-2px);
}

.board-card-photo-wrapper {
    width: 180px;
    flex-shrink: 0;
    background: #f7f8fa; /* Light grey background under photo */
    border-right: 1px solid #d1d5db; /* Vertical separator line */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 10px;
}

.board-card-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.board-card-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.board-card-name {
    font-size: 22px;
    font-weight: 700;
    color: #461E96; /* Brand purple */
    margin-bottom: 4px;
    font-family: var(--font-sans);
    line-height: 1.2;
}

.board-card-role {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted); /* Brand gray */
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.board-card-role a {
    color: var(--primary);
    text-decoration: underline;
    text-transform: none; /* keep email lowercase */
}

.board-card-bio {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

/* Timeline filtering style on Archive */
.timeline-filter-wrapper {
    margin-bottom: 50px;
    text-align: center;
}

.timeline-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 20px 0;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-filter::before {
    display: none;
}

.timeline-node {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #461E96;
    border: 4px solid #461E96;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    cursor: pointer;
    z-index: 2;
    transition: var(--transition);
    text-decoration: none;
}

.timeline-node:not(.active):hover {
    transform: scale(1.15);
    background-color: #361773;
    border-color: #361773;
    color: white;
}

.timeline-node.active {
    background-color: white;
    border-color: #461E96;
    color: #461E96;
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(70, 30, 150, 0.3);
}

@media (max-width: 768px) {
    .board-grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .board-card {
        flex-direction: column;
    }
    .board-card-photo-wrapper {
        width: 100%;
        height: 220px;
        border-right: none;
        border-bottom: 1px solid #e1e4eb;
    }
    .timeline-filter {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 20px;
        padding: 20px 10px;
    }
    .timeline-filter::before {
        display: none; /* Hide timeline line on mobile scrolls */
    }
    .timeline-node {
        flex-shrink: 0;
    }
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    .search-box .search-input,
    .search-box button,
    .search-box .btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Sub-page Hero Section adjustments */
.hero-sub {
    background-image: url('../images/sfondo hero.jpg') !important; /* No overlay */
    background-size: cover !important;
    background-position: center !important;
    padding: 30px 0 110px 0 !important;
    min-height: 210px;
}

.hero-sub .hero-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important; /* Align content left as logo is left-aligned */
    text-align: left !important;
    max-width: var(--max-width) !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.hero-logo-sub {
    height: 70px !important; /* Larger sub-page hero logo */
    margin-bottom: 0 !important; /* No subtitle below, so reset margin */
    align-self: flex-start !important;
    display: block !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

/* Page title below hero */
.page-title-below {
    font-size: 38px;
    font-weight: 700;
    color: #461E96; /* Brand purple */
    margin-top: 15px;
    margin-bottom: 30px;
    text-align: left;
    font-family: var(--font-sans);
    line-height: 1.2;
}
