/* ===== Design System – Plymouth Sound SAC ===== */

:root {
    /* Brand palette (derived from logo) — using --brand- prefix to avoid Bootstrap conflicts */
    --brand-primary: #0d7ec4;
    --brand-primary-dark: #0a5a8c;
    --brand-primary-light: #e8f4fa;
    --brand-accent-red: #8b1a1a;
    --brand-accent-cyan: #00b0d4;
    --brand-neutral-dark: #1e293b;
    --brand-neutral-light: #f8fafc;

    --brand-heading: #0a5a8c;
    --brand-body: #334155;
    --brand-muted: #64748b;
}

/* ===== Base ===== */

body {
    color: var(--brand-body);
    background-color: #fff;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
    color: var(--brand-heading);
    font-weight: 700;
}

body h1 {
    margin-top: 15px;
}

body a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color .2s;
}

body a:hover {
    color: var(--brand-primary-dark);
}

/* ===== Breadcrumb ===== */

.nav-breadcrumb {
    background-color: var(--brand-primary-light);
    border-left: 4px solid var(--brand-primary);
    padding: .5rem 1rem;
    border-radius: .375rem;
    margin-bottom: 1.5rem;
}

.nav-breadcrumb .breadcrumb-item a {
    color: var(--brand-primary);
    font-weight: 500;
}

.nav-breadcrumb .breadcrumb-item.active {
    color: var(--brand-body);
    font-weight: 500;
}

/* ===== Buttons ===== */

body .btn-primary,
body .btn-primary:active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

body .btn-primary:hover,
body .btn-primary:focus-visible {
    background-color: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
    color: #fff !important;
}

body .btn-accent {
    background-color: var(--brand-accent-red);
    border-color: var(--brand-accent-red);
    color: #fff;
}

body .btn-accent:hover,
body .btn-accent:focus-visible {
    background-color: #6e1515;
    border-color: #6e1515;
    color: #fff;
}

body .btn-outline-light:hover {
    color: var(--brand-primary-dark);
}

/* ===== Cards ===== */

body .card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .06);
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
}

body .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
}

body .card .card-body {
    padding: 1.5rem;
}

/* ===== Tables ===== */

body .table {
    --bs-table-striped-bg: var(--brand-primary-light);
    border-color: #e2e8f0;
}

body .table thead th {
    background-color: var(--brand-primary-dark);
    color: #fff;
    border-bottom: none;
    font-weight: 600;
    padding: .75rem 1rem;
}

body .table-sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

body .table tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
}

/* ===== Tabs ===== */

body .nav-tabs {
    border-bottom: 2px solid var(--brand-primary-light);
}

body .nav-tabs .nav-link {
    color: var(--brand-muted);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: .75rem 1.25rem;
    transition: color .2s, border-color .2s;
}

body .nav-tabs .nav-link:hover {
    color: var(--brand-primary);
    border-color: transparent;
    border-bottom-color: var(--brand-primary-light);
}

body .nav-tabs .nav-link.active {
    color: var(--brand-primary);
    background: transparent;
    border: none;
    border-bottom: 3px solid var(--brand-primary);
}

/* ===== Pills ===== */

body .nav-pills .nav-link {
    color: var(--brand-muted);
    font-weight: 600;
    border-radius: .375rem .375rem 0 0;
}

body .nav-pills .nav-link:hover {
    color: var(--brand-primary);
}

body .nav-pills .nav-link.active {
    background-color: var(--brand-primary-dark);
    color: #fff;
    border-radius: .375rem .375rem 0 0;
}

/* ===== Accordion ===== */

body .accordion-button:not(.collapsed) {
    background-color: var(--brand-primary-light);
    color: var(--brand-primary-dark);
    box-shadow: none;
}

body .accordion-button:focus {
    box-shadow: 0 0 0 .25rem rgba(13, 126, 196, .25);
}

/* ===== Alerts / Flash Messages ===== */

body .alert-success {
    background-color: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

body .alert-error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ===== Section Helpers ===== */

.section-light {
    background-color: var(--brand-primary-light);
}

.section-dark {
    background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-neutral-dark) 100%);
    color: #fff;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark p,
.section-dark a:not(.btn) {
    color: #fff;
}

.section-dark a:not(.btn):hover {
    color: var(--brand-accent-cyan);
}

.section-white {
    background-color: #fff;
}

/* ===== Hero ===== */

.hero {
    background: linear-gradient(135deg, var(--brand-primary-dark) 0%, #065a8c 50%, var(--brand-primary) 100%);
    color: #fff;
    padding: 5rem 1rem 4rem;
    text-align: center;
}

.hero h1,
.hero p {
    color: #fff;
}

.hero h1 {
    font-size: 2.75rem;
    letter-spacing: -.02em;
}

.hero .lead {
    font-size: 1.2rem;
    opacity: .9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero img {
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .25));
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 2rem 5rem;
    }

    .hero h1 {
        font-size: 3.25rem;
    }
}

/* ===== Homepage Sections ===== */

.home-section {
    padding: 4rem 1rem;
}

.home-section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.home-section .gallery-thumb {
    border-radius: .75rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.home-section .gallery-thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.home-section .gallery-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.home-section .gallery-thumb .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
    color: #fff;
    padding: 2rem .75rem .75rem;
    font-size: .85rem;
}

/* ===== Event Card (Calendar Style) ===== */

.event-card {
    display: flex;
    border-radius: .5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    background: #fff;
    transition: box-shadow .2s ease;
}

.event-card:hover {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .1);
}

.event-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 1rem .75rem;
    background: var(--brand-primary);
    color: #fff;
}

.event-card-month {
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1;
}

.event-card-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.event-card-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-card-name {
    font-size: 1.2rem;
    color: var(--brand-heading);
    margin: 0 0 .25rem;
}

.event-card-time {
    color: var(--brand-muted);
    font-size: .875rem;
}

.event-card-location {
    color: var(--brand-muted);
    font-size: .875rem;
    margin-top: .25rem;
}

/* ===== CTA Section ===== */

.cta-section {
    background: linear-gradient(135deg, var(--brand-neutral-dark) 0%, var(--brand-primary-dark) 100%);
    padding: 4rem 1rem;
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: .85;
    max-width: 550px;
    margin: 0 auto 2rem;
}

.cta-section .btn {
    min-width: 160px;
}

/* ===== Quick Links Grid ===== */

.quick-link {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: transform .2s, box-shadow .2s;
    display: block;
    color: var(--brand-heading);
    text-decoration: none;
}

.quick-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    color: var(--brand-primary);
}

.quick-link h5 {
    margin-bottom: .25rem;
    font-size: 1.05rem;
}

.quick-link p {
    color: var(--brand-muted);
    font-size: .875rem;
    margin-bottom: 0;
}

/* ===== Navbar ===== */

.navbar-branded {
    background-color: #fff !important;
    border-bottom: 3px solid var(--brand-primary);
    padding: .5rem 0;
}

.navbar-branded .navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-branded .nav-link {
    color: var(--brand-body) !important;
    font-weight: 500;
    padding: .5rem .85rem !important;
    transition: color .2s;
}

.navbar-branded .nav-link:hover,
.navbar-branded .nav-link:focus {
    color: var(--brand-primary) !important;
}

.navbar-branded .nav-item.active .nav-link,
.navbar-branded .nav-link.active {
    color: var(--brand-primary) !important;
    border-bottom: 2px solid var(--brand-primary);
}

.navbar-branded .dropdown-menu {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}

.navbar-branded .dropdown-item {
    color: var(--brand-body);
}

.navbar-branded .dropdown-item:hover {
    background-color: var(--brand-primary-light);
    color: var(--brand-primary-dark);
}

.navbar-branded .navbar-toggler {
    border-color: rgba(0, 0, 0, .15);
}

/* ===== Footer ===== */

.site-footer {
    background-color: var(--brand-neutral-dark);
    color: rgba(255, 255, 255, .7);
    padding: 3rem 0 0;
    margin-top: auto;
    font-size: .9rem;
}

.site-footer h5 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    transition: color .2s;
}

.site-footer a:hover {
    color: var(--brand-accent-cyan);
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: .5rem;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.25rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: .85rem;
}

/* ===== Page Heading ===== */

.page-heading {
    background-color: var(--brand-primary-light);
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.page-heading h1 {
    margin-bottom: 0;
    font-size: 2rem;
}

/* ===== Login Card ===== */

.login-card {
    max-width: 560px;
    margin: 2rem auto;
}

.login-card .card-body {
    padding: 2rem;
}

@media (min-width: 576px) {
    .login-card .mb-3.row>.col-sm-2 {
        width: 30%;
    }

    .login-card .mb-3.row>.col-sm-10 {
        width: 70%;
    }

    .login-card .mb-3.row>.col-form-label {
        white-space: nowrap;
    }
}

/* ===== Full-width body helper ===== */

html,
body {
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
}

body>.page-wrapper {
    flex: 1 0 auto;
}

/* ===== Misc ===== */

.text-brand {
    color: var(--brand-primary);
}

.text-accent {
    color: var(--brand-accent-red);
}