:root {
    --brand-darkBlue: #173857;
    --brand-blue: #035394;
    --brand-cyan: #0aade8;
    --brand-mint: #14e8ad;
    --brand-lightBg: #F8FAFC;
    --text-gray-700: #334155;
    --text-gray-600: #475569;
    --text-gray-500: #6b7280;
    --text-gray-400: #9ca3af;
    --text-red-500: #ef4444;
    --text-red-600: #dc2626;
    --text-red-700: #b91c1c;
    --text-emerald-700: #047857;
    --text-sky-600: #0ea5e9;
    --bg-red-100: #fee2e2;
    --bg-emerald-100: #d1fae5;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: 'Alexandria', sans-serif;
    background: var(--brand-lightBg);
    color: var(--brand-darkBlue);
}

body {
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100%, 1200px);
    margin-inline: auto;
    padding-inline: 0.75rem;
}

.bg-white { background-color: #ffffff; }
.bg-black\/50 { background-color: rgba(0,0,0,0.5); }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-red-100 { background-color: var(--bg-red-100); }
.bg-brand-lightBg { background-color: var(--brand-lightBg); }
.bg-brand-darkBlue { background-color: var(--brand-darkBlue); }
.bg-brand-blue { background-color: var(--brand-blue); }
.bg-brand-cyan { background-color: var(--brand-cyan); }
.bg-brand-mint { background-color: var(--brand-mint); }

.text-white { color: #ffffff; }
.text-brand-darkBlue { color: var(--brand-darkBlue); }
.text-brand-blue { color: var(--brand-blue); }
.text-brand-cyan { color: var(--brand-cyan); }
.text-brand-mint { color: var(--brand-mint); }
.text-gray-700 { color: var(--text-gray-700); }
.text-gray-600 { color: var(--text-gray-600); }
.text-gray-500 { color: var(--text-gray-500); }
.text-gray-400 { color: var(--text-gray-400); }
.text-red-500 { color: var(--text-red-500); }
.text-red-600 { color: var(--text-red-600); }
.text-red-700 { color: var(--text-red-700); }
.text-emerald-700 { color: var(--text-emerald-700); }
.text-sky-600 { color: var(--text-sky-600); }
.text-blue-600 { color: #2563eb; }
.text-green-600 { color: #16a34a; }

.bg-red-500 { background-color: var(--text-red-500); }

.border { border: 1px solid #d1d5db; }
.border-0 { border: 0; }
.border-b { border-bottom: 1px solid #d1d5db; }
.border-b-2 { border-bottom: 2px solid #d1d5db; }
.border-b-4 { border-bottom: 4px solid #d1d5db; }
.border-brand-cyan { border-color: var(--brand-cyan); }
.border-brand-mint { border-color: var(--brand-mint); }
.border-gray-100 { border-color: #f3f4f6; }
.border-collapse { border-collapse: collapse; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.shadow-md { box-shadow: 0 4px 8px rgba(15, 23, 42, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(15, 23, 42, 0.15); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Responsive card helpers */
.card { display: flex; flex-direction: column; height: 100%; }
.card-image { width: 100%; overflow: hidden; background: #f3f4f6; }
.card-image img, .card-image iframe { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Prefer modern aspect-ratio, fallback to 16:9 via padding hack */
.aspect-16-9 { aspect-ratio: 16 / 9; }
@supports not (aspect-ratio: 16/9) {
    .aspect-16-9 { position: relative; padding-top: 56.25%; }
    .aspect-16-9 > * { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
}
.card-content { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card-footer { margin-top: auto; }

/* Make grid adjust smoothly across breakpoints */
@media (max-width: 640px) {
    .grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
@media (min-width: 641px) and (max-width: 1023px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-4 { width: 1rem; }
.h-full { height: 100%; }
.h-10 { height: 2.5rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.h-72 { height: 18rem; }
.min-h-screen { min-height: 100vh; }

.block { display: block; }
.inline-block { display: inline-block; }
.col-span-full { grid-column: 1 / -1; }
.object-cover { object-fit: cover; }
.outline-none { outline: none; }
.pt-4 { padding-top: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.mr-1 { margin-right: 0.25rem; }
.max-h-\[90vh\] { max-height: 90vh; }
.focus\:ring-2:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.focus\:ring-brand-cyan:focus { box-shadow: 0 0 0 3px rgba(10, 173, 232, 0.35); }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-8 { margin-top: 2rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-sans { font-family: 'Alexandria', sans-serif; }
.leading-relaxed { line-height: 1.75; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-nowrap { white-space: nowrap; }

.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.2s ease-in-out; }
.underline { text-decoration: underline; }
.hover\:bg-sky-400:hover { background-color: #7dd3fc; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.hover\:bg-sky-900:hover { background-color: #0c4a6e; }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:text-gray-600:hover { color: var(--text-gray-600); }
.hover\:underline:hover { text-decoration: underline; }
.disabled\:opacity-50:disabled { opacity: 0.5; }

.hidden { display: none !important; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; position: absolute; }
.fixed { position: fixed; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.relative { position: relative; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-h-\[90vh\] { max-height: 90vh; }

input[type="text"],
input[type="url"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    outline: none;
    background: #ffffff;
}

input[type="file"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px rgba(10, 173, 232, 0.15);
}

button,
button[type="submit"] {
    border: none;
}

table {
    width: 100%;
    border-spacing: 0;
}

tbody tr:hover {
    background: #f8fafc;
}

th, td {
    text-align: right;
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:h-80 { height: 20rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:w-1\/2 { width: 50%; }
    .md\:w-1\/3 { width: 33.333333%; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.bg-blue-600 { background-color: #2563eb; }
.text-2xl { font-size: 1.5rem; }

button.bg-brand-blue {
    background-color: var(--brand-blue);
    color: #ffffff;
}

button.bg-brand-cyan {
    background-color: var(--brand-cyan);
    color: var(--brand-darkBlue);
}

button.bg-brand-mint {
    background-color: var(--brand-mint);
    color: var(--brand-darkBlue);
}

button.bg-red-500 {
    background-color: var(--text-red-500);
    color: #ffffff;
}

button:hover {
    opacity: 0.95;
}

.bg-brand-cyan:hover {
    background-color: #89d7f7;
}

.bg-brand-mint:hover {
    background-color: #1ae6be;
}

.bg-brand-blue:hover {
    background-color: #02477a;
}

.bg-red-500:hover {
    background-color: #b91c1c;
}

a.text-blue-600:hover,
a.text-brand-blue:hover,
a.text-brand-cyan:hover,
a.text-brand-mint:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .flex-wrap { flex-wrap: wrap; }
    .justify-between { justify-content: space-between; }
}
