:root {
 --primary-color: #0d47a1; /* Deep Blue */
 --primary-dark: #093170;
 --secondary-color: #64748b; /* Slate Grey */
 --text-dark: #1e293b; /* Dark Slate */
 --text-light: #475569;
 --text-muted: #64748b;
 --bg-light: #f8fafc; /* Very Light Grey/Blue */
 --bg-white: #ffffff;
 --border-color: #e2e8f0;
 --radius-md: 8px;
 --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
 --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
 --transition: all 0.3s ease;
 --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 --font-serif: 'Lora', Georgia, serif;
}

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

html {
 scroll-behavior: smooth;
 font-size: 16px;
}

body {
 font-family: var(--font-main);
 line-height: 1.7;
 color: var(--text-dark);
 background-color: var(--bg-white);
 -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
 font-family: var(--font-serif);
 line-height: 1.3;
 font-weight: 600;
 margin-bottom: 1rem;
 color: var(--text-dark);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
 margin-bottom: 1.5rem;
 color: var(--text-light);
}

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

a:hover {
 color: var(--primary-dark);
 text-decoration: underline;
}

.container {
 max-width: 1100px;
 margin: 0 auto;
 padding: 0 20px;
}

/* Header & Nav */
.header {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 z-index: 1000;
 background: rgba(255, 255, 255, 0.9);
 backdrop-filter: blur(10px);
 border-bottom: 1px solid var(--border-color);
 transition: var(--transition);
}

.header.scrolled {
 box-shadow: var(--shadow-md);
}

.nav {
 display: flex;
 justify-content: space-between;
 align-items: center;
 height: 70px;
}

.nav-logo {
 font-family: var(--font-serif);
 font-size: 1.75rem;
 font-weight: 700;
 color: var(--primary-color);
}
.nav-logo:hover {
 text-decoration: none;
}
.nav-links {
 display: flex;
 list-style: none;
 gap: 32px;
}
.nav-links a {
 font-weight: 500;
 font-size: 0.95rem;
 color: var(--text-dark);
 padding: 5px 0;
 position: relative;
}
.nav-links a:hover,
.nav-links a.active {
 color: var(--primary-color);
 text-decoration: none;
}

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

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

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

.nav-toggle span {
 display: block;
 width: 25px;
 height: 2px;
 background-color: var(--text-dark);
 margin: 6px 0;
 transition: var(--transition);
}

/* Sections */
main {
 padding-top: 70px;
}

.section {
 padding: 60px 0;
}

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

.section-title {
 margin-bottom: 2rem;
}

.page-header-section {
 padding: 80px 0;
 background-color: var(--bg-light);
 border-bottom: 1px solid var(--border-color);
}
.page-header-section h1 {
 font-size: 3rem;
 max-width: 900px;
}
.page-header-section .subtitle {
 font-size: 1.2rem;
 color: var(--text-light);
 max-width: 800px;
 margin-top: 1rem;
}

.content-body {
 max-width: 800px;
}
.content-body ul, .content-body ol {
 margin-bottom: 1.5rem;
 padding-left: 20px;
}
.content-body li {
 margin-bottom: 0.75rem;
}
.content-body .subsection-title {
 margin-top: 2.5rem;
 margin-bottom: 1rem;
 font-size: 1.5rem;
 border-left: 3px solid var(--primary-color);
 padding-left: 1rem;
}

/* Footer */
.footer {
 background-color: var(--text-dark);
 color: #a0aec0;
 padding: 60px 0 30px;
 margin-top: 60px;
 font-size: 0.9rem;
}
.footer-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 gap: 40px;
 margin-bottom: 40px;
}
.footer a {
 color: #a0aec0;
}
.footer a:hover {
 color: var(--bg-white);
 text-decoration: none;
}
.footer-logo {
 font-family: var(--font-serif);
 font-size: 1.75rem;
 font-weight: 700;
 color: var(--bg-white);
 margin-bottom: 1rem;
 display: block;
}
.footer-heading {
 font-family: var(--font-main);
 font-size: 1rem;
 font-weight: 600;
 color: var(--bg-white);
 margin-bottom: 20px;
 text-transform: uppercase;
 letter-spacing: 0.5px;
}
.footer-links {
 list-style: none;
}
.footer-links li {
 margin-bottom: 12px;
}
.footer-divider {
 border-top: 1px solid #4a5568;
 margin: 30px 0;
}
.footer-bottom {
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1rem;
 font-size: 0.85rem;
 color: #718096;
}
.footer-contact-item {
 margin-bottom: 1rem;
}

/* Buttons */
.btn {
 display: inline-block;
 padding: 12px 24px;
 border-radius: var(--radius-md);
 font-weight: 600;
 text-align: center;
 cursor: pointer;
 transition: var(--transition);
 border: 1px solid transparent;
}
.btn-primary {
 background-color: var(--primary-color);
 color: var(--bg-white);
 border-color: var(--primary-color);
}
.btn-primary:hover {
 background-color: var(--primary-dark);
 border-color: var(--primary-dark);
 color: var(--bg-white);
 text-decoration: none;
}
.read-more-link {
 font-weight: 600;
 color: var(--primary-color);
 display: inline-block;
 margin-top: -1rem;
}

/* Forms */
.form-group {
 margin-bottom: 1.5rem;
}
.form-group label {
 display: block;
 font-weight: 500;
 margin-bottom: 0.5rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
 width: 100%;
 padding: 12px;
 border: 1px solid var(--border-color);
 border-radius: var(--radius-md);
 font-family: var(--font-main);
 font-size: 1rem;
 transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
 outline: none;
 border-color: var(--primary-color);
 box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}
.checkbox-group {
 display: flex;
 align-items: flex-start;
 gap: 10px;
}
.checkbox-group input[type="checkbox"] {
 margin-top: 5px;
}
.checkbox-group label {
 font-size: 0.9rem;
 color: var(--text-muted);
 font-weight: 400;
}
.contact-layout {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 60px;
}
.contact-details .contact-item {
 margin-bottom: 2rem;
}
.contact-details .contact-item h3 {
 margin-bottom: 0.25rem;
 font-size: 1rem;
 color: var(--primary-color);
 font-family: var(--font-main);
}
.contact-details .contact-item p {
 margin-bottom: 0;
}

/* Resources page */
.resource-list {
 list-style-type: none;
 padding-left: 0;
}
.resource-list li {
 background-color: var(--bg-light);
 border: 1px solid var(--border-color);
 border-left: 4px solid var(--primary-color);
 padding: 1.5rem;
 margin-bottom: 1.5rem;
 border-radius: var(--radius-md);
}
.resource-list h3 {
 margin-bottom: 0.5rem;
}

/* About page */
.team-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
 gap: 30px;
 margin-top: 2rem;
}

.team-member {
 border: 1px solid var(--border-color);
 padding: 1.5rem;
 border-radius: var(--radius-md);
}
.team-title {
 font-weight: 500;
 color: var(--primary-color);
 margin-bottom: 0.5rem;
}
.team-bio {
 font-size: 0.95rem;
 line-height: 1.6;
 margin-bottom: 0;
}

/* Cookie Banner */
.cookie-banner {
 position: fixed;
 bottom: 0;
 left: 0;
 right: 0;
 background-color: var(--text-dark);
 color: var(--bg-white);
 padding: 20px;
 display: none;
 justify-content: space-between;
 align-items: center;
 gap: 20px;
 z-index: 2000;
}
.cookie-banner p {
 margin: 0;
 color: var(--bg-light);
}
.cookie-banner a {
 color: var(--bg-white);
 text-decoration: underline;
}
.cookie-buttons button {
 padding: 10px 20px;
 border: none;
 border-radius: var(--radius-md);
 cursor: pointer;
 font-weight: 600;
 margin-left: 10px;
}
#cookie-accept {
 background-color: var(--primary-color);
 color: white;
}
#cookie-decline {
 background-color: var(--secondary-color);
 color: white;
}

/* Map */
.map-container {
 height: 350px;
 margin-top: 30px;
 border-radius: var(--radius-md);
 overflow: hidden;
 border: 1px solid var(--border-color);
}
.map-container iframe {
 width: 100%;
 height: 100%;
 border: none;
}
/* Table */
.table-container {
 overflow-x: auto;
 margin: 2rem 0;
}
table {
 width: 100%;
 border-collapse: collapse;
 font-size: 0.95rem;
}
th, td {
 padding: 12px 15px;
 text-align: left;
 border-bottom: 1px solid var(--border-color);
}
th {
 background-color: var(--bg-light);
 font-weight: 600;
}
tbody tr:last-child td {
 border-bottom: none;
}

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

.field-error {
 color: #dc2626;
 font-size: 0.85rem;
 margin-top: 4px;
 animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
 from { opacity: 0; transform: translateY(-5px); }
 to { opacity: 1; transform: translateY(0); }
}

button[type="submit"] .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;
}

/* Responsive */
@media (max-width: 768px) {
 h1 { font-size: 2.25rem; }
 .page-header-section h1 { font-size: 2.5rem; }
 .contact-layout { grid-template-columns: 1fr; }

 .nav-menu {
 position: fixed;
 top: 70px;
 left: -100%;
 width: 100%;
 height: calc(100vh - 70px);
 background-color: var(--bg-white);
 transition: left 0.4s ease;
 padding: 30px;
 }
 .nav-menu.active {
 left: 0;
 }
 .nav-links {
 flex-direction: column;
 gap: 24px;
 }
 .nav-links a {
 font-size: 1.2rem;
 }
 .nav-toggle {
 display: block;
 }
 
 .cookie-banner {
 flex-direction: column;
 text-align: center;
 }
 .cookie-buttons {
 margin-top: 1rem;
 }
 .footer-grid {
 grid-template-columns: 1fr;
 text-align: center;
 }
 .footer-brand {
 margin: 0 auto;
 }
 .footer-bottom {
 flex-direction: column;
 gap: 1rem;
 }
}