:root {
 --font-serif: 'Lora', serif;
 --font-sans: 'Source Sans 3', sans-serif;
 --color-text: #212121;
 --color-text-muted: #5f5f5f;
 --color-background: #fdfdfd;
 --color-background-light: #f5f5f5;
 --color-border: #e0e0e0;
 --color-accent: #0d47a1; /* A deep, academic blue */
 --color-accent-light: #e3f2fd;
 --max-width-editorial: 800px;
 --max-width-nav: 1200px;
 --header-height: auto;
}

/* --- BASE & TYPOGRAPHY --- */
*, *::before, *::after {
 box-sizing: border-box;
 margin: 0;
 padding: 0;
}

html {
 scroll-behavior: smooth;
}

body {
 font-family: var(--font-sans);
 font-size: 1.1rem;
 line-height: 1.7;
 color: var(--color-text);
 background-color: var(--color-background);
 -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
 font-family: var(--font-serif);
 font-weight: 700;
 line-height: 1.2;
 margin-bottom: 1rem;
}

h1 {
 font-size: clamp(2.5rem, 8vw, 5rem);
 font-weight: 400;
 letter-spacing: -0.02em;
}

h2 {
 font-size: clamp(1.8rem, 5vw, 2.5rem);
 margin-top: 2.5rem;
 border-bottom: 1px solid var(--color-border);
 padding-bottom: 0.5rem;
}

h3 {
 font-size: clamp(1.2rem, 4vw, 1.5rem);
 font-weight: 600;
 margin-top: 2rem;
}

p {
 margin-bottom: 1.5rem;
}

a {
 color: var(--color-accent);
 text-decoration: none;
 transition: color 0.3s ease;
}

a:hover {
 text-decoration: underline;
}

ul {
 list-style-position: inside;
 margin-bottom: 1.5rem;
 padding-left: 1rem;
}

li {
 margin-bottom: 0.75rem;
}

blockquote {
 margin: 2rem 0;
 padding-left: 1.5rem;
 border-left: 3px solid var(--color-accent);
 font-family: var(--font-serif);
 font-style: italic;
 font-size: 1.2rem;
 color: var(--color-text-muted);
}

/* --- HEADER / MASTHEAD --- */
.header {
 width: 100%;
 background-color: var(--color-background);
 border-bottom: 1px solid var(--color-border);
 position: sticky;
 top: 0;
 z-index: 1000;
}

.header-top-bar {
 display: flex;
 justify-content: space-between;
 align-items: center;
 width: 100%;
 max-width: var(--max-width-nav);
 margin: 0 auto;
 padding: 0.5rem 1.5rem;
 font-size: 0.8rem;
 color: var(--color-text-muted);
 border-bottom: 1px solid #f0f0f0;
}

.nav {
 display: flex;
 flex-direction: column;
 align-items: center;
 max-width: var(--max-width-nav);
 margin: 0 auto;
 padding: 1rem 1.5rem 0.5rem;
}

.nav-logo {
 font-family: var(--font-serif);
 font-size: 2.5rem;
 font-weight: 600;
 color: var(--color-text);
 margin-bottom: 1rem;
}
.nav-logo:hover {
 text-decoration: none;
}

.nav-links {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 list-style: none;
 gap: 1rem 2rem;
 width: 100%;
 padding-left: 0;
 border-top: 1px solid var(--color-border);
 padding-top: 0.75rem;
}

.nav-links a {
 font-size: 1rem;
 font-weight: 500;
 color: var(--color-text-muted);
 padding: 0.5rem 0;
 position: relative;
}

.nav-links a::after {
 content: '';
 position: absolute;
 bottom: 0;
 left: 0;
 width: 0;
 height: 2px;
 background-color: var(--color-accent);
 transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
 color: var(--color-text);
 text-decoration: none;
}

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

.nav-toggle {
 display: none;
}

/* --- EDITORIAL LAYOUT --- */
.main {
 padding-top: var(--header-height);
}

.hero-editorial {
 padding: 4rem 1.5rem;
}

.hero-content {
 max-width: var(--max-width-editorial);
 margin: 0 auto;
 text-align: center;
}

.hero-byline {
 font-size: 0.9rem;
 color: var(--color-text-muted);
 margin-bottom: 1rem;
 text-transform: uppercase;
 letter-spacing: 0.05em;
}

.hero-intro {
 font-size: 1.3rem;
 max-width: 700px;
 margin: 1.5rem auto 0;
 line-height: 1.6;
 color: var(--color-text-muted);
}

.drop-cap {
 float: left;
 font-family: var(--font-serif);
 font-size: 6rem;
 line-height: 0.8;
 padding-right: 0.5rem;
 color: var(--color-accent);
}

.section-editorial {
 padding: 3rem 1.5rem;
}

.section-editorial.bg-light {
 background-color: var(--color-background-light);
}

.container-editorial {
 max-width: var(--max-width-editorial);
 margin: 0 auto;
}

.section-header-editorial {
 text-align: center;
 margin-bottom: 3rem;
}

.section-title-editorial {
 font-size: 2rem;
 border: none;
}

.section-subtitle-editorial {
 font-size: 1.2rem;
 color: var(--color-text-muted);
 max-width: 600px;
 margin: 0.5rem auto 0;
}

.multi-column-content {
 column-count: 2;
 column-gap: 3rem;
 margin-top: 2rem;
}

@media (max-width: 768px) {
 .multi-column-content {
 column-count: 1;
 }
}

.pull-quote-wrapper {
 margin: 3rem 0;
}

.pull-quote {
 font-size: 1.8rem;
 text-align: center;
 max-width: 80%;
 margin: 2rem auto;
 padding: 0;
 border: 0;
 position: relative;
}
.pull-quote::before, .pull-quote::after {
 content: '“';
 font-family: var(--font-serif);
 font-size: 5rem;
 color: var(--color-accent-light);
 position: absolute;
 top: -1rem;
 left: -2rem;
 line-height: 1;
 z-index: -1;
}
.pull-quote::after {
 content: '”';
 left: auto;
 right: -2rem;
 top: auto;
 bottom: -3rem;
}

/* --- LONG-FORM ARTICLE --- */
.long-form-article {
 padding: 2rem 1.5rem;
}

.container-article {
 max-width: var(--max-width-editorial);
 margin: 0 auto;
}

.resource-list li {
 font-weight: 500;
}
.resource-list strong {
 font-weight: 600;
 color: var(--color-text);
}

/* Link Cards Grid */
.link-card-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 2rem;
 margin-top: 2rem;
}

.link-card {
 background: var(--color-background);
 border: 1px solid var(--color-border);
 padding: 2rem;
 display: flex;
 flex-direction: column;
}

.link-card h3 {
 margin-top: 0;
}

.link-card p {
 flex-grow: 1;
 color: var(--color-text-muted);
}

.editorial-button {
 display: inline-block;
 padding: 0.75rem 1.5rem;
 background: var(--color-accent);
 color: white;
 font-weight: 600;
 font-size: 0.9rem;
 border-radius: 4px;
 text-align: center;
 transition: background-color 0.3s ease;
 align-self: flex-start;
}
.editorial-button:hover {
 background: #0b3a8a;
 text-decoration: none;
 color: white;
}

/* Contributors Section */
.contributors-grid {
 display: grid;
 gap: 2rem;
}
.contributor-byline {
 padding: 1.5rem;
 border: 1px solid var(--color-border);
 background-color: var(--color-background);
}
.contributor-byline h3 {
 margin-top: 0;
 font-family: var(--font-sans);
 font-size: 1.2rem;
}
.contributor-byline p {
 margin-bottom: 0;
 color: var(--color-text-muted);
}

/* --- CONTACT PAGE --- */
.contact-page-layout {
 display: grid;
 grid-template-columns: 1fr 1.5fr;
 gap: 3rem;
}
.contact-details h3 {
 margin-top: 0;
 border-bottom: 1px solid var(--color-border);
 padding-bottom: 0.5rem;
}
.contact-item {
 margin-bottom: 1.5rem;
}
.contact-item strong {
 display: block;
 color: var(--color-text);
}
.contact-item p {
 margin: 0.25rem 0 0 0;
 color: var(--color-text-muted);
}
.contact-item a {
 color: var(--color-accent);
}

.contact-form-editorial .form-group {
 margin-bottom: 1.5rem;
}
.contact-form-editorial label {
 display: block;
 font-weight: 600;
 margin-bottom: 0.5rem;
}
.contact-form-editorial input[type="text"],
.contact-form-editorial input[type="email"],
.contact-form-editorial textarea {
 width: 100%;
 padding: 0.75rem;
 font-family: var(--font-sans);
 font-size: 1rem;
 border: 1px solid var(--color-border);
 background-color: var(--color-background);
 border-radius: 4px;
}
.contact-form-editorial textarea {
 min-height: 150px;
 resize: vertical;
}

.form-group-checkbox {
 display: flex;
 align-items: flex-start;
 gap: 0.75rem;
 margin-bottom: 1.5rem;
}
.form-group-checkbox input {
 margin-top: 0.3rem;
}
.form-group-checkbox label {
 font-size: 0.9rem;
 color: var(--color-text-muted);
}

.map-container {
 width: 100%;
 height: 400px;
 border-radius: 4px;
 overflow: hidden;
 border: 1px solid var(--color-border);
 margin-top: 2rem;
}
.map-container iframe {
 width: 100%;
 height: 100%;
 border: none;
}

/* Cookie Table */
.cookie-table table {
 width: 100%;
 border-collapse: collapse;
 margin-top: 1rem;
}
.cookie-table th, .cookie-table td {
 text-align: left;
 padding: 0.75rem;
 border-bottom: 1px solid var(--color-border);
}
.cookie-table th {
 font-weight: 600;
}

/* Form validation styles */
.input-error {
 border-color: #dc2626 !important;
 box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.field-error {
 color: #dc2626;
 font-size: 0.85rem;
 margin-top: 4px;
}

.spinner {
 display: inline-block;
 width: 16px;
 height: 16px;
 border: 2px solid rgba(255,255,255,0.3);
 border-radius: 50%;
 border-top-color: #fff;
 animation: spin 0.8s linear infinite;
 margin-right: 8px;
 vertical-align: middle;
}

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

button[disabled] {
 opacity: 0.7;
 cursor: not-allowed;
}

/* --- MINIMALIST FOOTER --- */
.footer-minimal {
 background-color: var(--color-background);
 border-top: 1px solid var(--color-border);
 padding: 2rem 1.5rem;
 margin-top: 4rem;
 font-size: 0.9rem;
 color: var(--color-text-muted);
}
.footer-container-minimal {
 max-width: var(--max-width-editorial);
 margin: 0 auto;
 text-align: center;
}
.footer-brand-minimal {
 font-family: var(--font-serif);
 font-size: 1.5rem;
 font-weight: 600;
 color: var(--color-text);
 margin-bottom: 1rem;
}
.footer-links-minimal {
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
 gap: 0.5rem;
 margin-bottom: 1rem;
}
.footer-links-minimal a {
 color: var(--color-text-muted);
}
.footer-links-minimal a:hover {
 color: var(--color-text);
}
.footer-separator {
 margin: 0 0.5rem;
}
.footer-contact-info-minimal, .footer-hours-minimal {
 margin-bottom: 1rem;
}
.footer-contact-info-minimal p, .footer-hours-minimal p {
 margin-bottom: 0.25rem;
}
.footer-contact-info-minimal a {
 color: var(--color-accent);
}
.footer-copyright-minimal {
 margin-top: 2rem;
 padding-top: 1rem;
 border-top: 1px solid var(--color-border);
}
.footer-copyright-minimal p {
 margin-bottom: 0.5rem;
}
.back-to-top {
 font-weight: 600;
 color: var(--color-accent);
}

/* --- COOKIE BANNER --- */
.cookie-banner {
 position: fixed;
 bottom: 0;
 left: 0;
 right: 0;
 background-color: #333;
 color: white;
 padding: 1rem;
 display: none;
 justify-content: space-between;
 align-items: center;
 z-index: 2000;
 flex-wrap: wrap;
 gap: 1rem;
}

.cookie-banner p {
 margin: 0;
 flex-grow: 1;
}

.cookie-banner a {
 color: #fff;
 text-decoration: underline;
}

.cookie-buttons button {
 background-color: var(--color-accent);
 color: white;
 border: none;
 padding: 0.6rem 1.2rem;
 margin-left: 0.5rem;
 cursor: pointer;
 border-radius: 4px;
}
.cookie-buttons button:last-child {
 background-color: #555;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
 body {
 font-size: 1rem;
 }
 
 .header-top-bar {
 font-size: 0.7rem;
 padding: 0.5rem 1rem;
 }
 
 .nav {
 padding: 1rem;
 flex-direction: row;
 justify-content: space-between;
 align-items: center;
 position: relative;
 }

 .nav-logo {
 margin-bottom: 0;
 font-size: 2rem;
 }

 .nav-links {
 display: none;
 position: fixed;
 bottom: -100%;
 left: 0;
 right: 0;
 background-color: var(--color-background);
 flex-direction: column;
 padding: 2rem;
 gap: 1rem;
 box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
 transition: bottom 0.3s ease-in-out;
 border-top: 1px solid var(--color-border);
 }
 
 .nav-links.active {
 display: flex;
 bottom: 0;
 }

 .nav-toggle {
 display: block;
 background: none;
 border: none;
 cursor: pointer;
 z-index: 1001;
 }

 .nav-toggle span {
 display: block;
 width: 25px;
 height: 2px;
 background-color: var(--color-text);
 margin: 5px 0;
 transition: all 0.3s ease;
 }
 .nav-toggle.active span:nth-child(1) {
 transform: translateY(7px) rotate(45deg);
 }
 .nav-toggle.active span:nth-child(2) {
 opacity: 0;
 }
 .nav-toggle.active span:nth-child(3) {
 transform: translateY(-7px) rotate(-45deg);
 }

 .contact-page-layout {
 grid-template-columns: 1fr;
 }
 
 .link-card-grid {
 grid-template-columns: 1fr;
 }
}