/*
 Theme Name:   Understrap Child
 Theme URI:    https://understrap.com
 Description:  Understrap Child Theme
 Author:       the Understrap Contributors
 Author URI:   https://github.com/understrap/understrap-child/graphs/contributors
 Template:     understrap
 Version:      1.2.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  understrap-child
 Tags:         one-column, custom-menu, featured-images, theme-options, translation-ready
 GitHub Theme URI: understrap/understrap-child
*/

/* ============================================
   DESIGN TOKENS
   Central place to update brand colours.
============================================ */
:root {
    --ls-red:        #dc3545;
    --ls-red-hover:  #b02a37;
    --ls-dark:       #111;
    --ls-text:       #212529;
    --ls-muted:      #6c757d;
    --ls-border:     #e9ecef;
    --ls-card-shadow: 0 1px 4px rgba(0,0,0,0.08);
}


/* ============================================
   NAVIGATION
============================================ */

/* Red top accent bar — sits on the outer navbar wrapper */
#wrapper-navbar {
    border-top: 4px solid var(--ls-red);
}

#main-nav.navbar {
    background-color: #fff !important;
    padding: 0;
    min-height: 58px;
    border-bottom: 1px solid var(--ls-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

#main-nav .navbar-brand img {
    height: 42px;
    width: auto;
}

#main-nav .navbar-nav .nav-link {
    color: var(--ls-text) !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 1rem !important;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

#main-nav .navbar-nav .nav-link:hover,
#main-nav .navbar-nav .nav-link:focus,
#main-nav .navbar-nav .current-menu-item > .nav-link,
#main-nav .navbar-nav .current_page_item > .nav-link {
    color: var(--ls-red) !important;
    border-bottom-color: var(--ls-red);
}

#main-nav .dropdown-menu {
    background-color: #fff;
    border: none;
    border-top: 3px solid var(--ls-red);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.25rem 0;
    min-width: 220px;
}

#main-nav .dropdown-item {
    color: var(--ls-text);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

#main-nav .dropdown-item:hover {
    background-color: var(--ls-red);
    color: #fff;
}

#main-nav .navbar-toggler {
    border-color: rgba(0,0,0,0.2);
    padding: 6px 10px;
}

#main-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280,0,0,0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#main-nav .navbar-toggler:focus {
    box-shadow: none;
    border-color: var(--ls-red);
}


/* ============================================
   SHARED COMPONENTS
   Used across homepage, archive, and single.
============================================ */

/* Section header row (label + "More →") */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--ls-red);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    color: var(--ls-text);
}

.more-link {
    font-size: 0.8rem;
    color: var(--ls-red);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.more-link:hover {
    text-decoration: underline;
}

/* Category label (small red uppercase, used on cards and singles) */
.card-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ls-red);
    margin-bottom: 0.35rem;
    display: block;
    text-decoration: none;
}

.card-cat:hover {
    text-decoration: underline;
    color: var(--ls-red);
}

/* Date label */
.card-date {
    font-size: 0.75rem;
    color: #adb5bd;
}

/* News card */
.news-card {
    border: none;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--ls-card-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    transform: translateY(-2px);
}

.news-card .card-img-top {
    height: 175px;
    object-fit: cover;
    object-position: center;
    display: block;
    width: 100%;
}

.news-card .card-body {
    padding: 0.85rem;
}

.news-card .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.news-card .card-title a {
    color: var(--ls-text);
    text-decoration: none;
}

.news-card .card-title a:hover {
    color: var(--ls-red);
}

.news-card .card-excerpt {
    font-size: 0.8rem;
    color: var(--ls-muted);
    line-height: 1.4;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ============================================
   HOMEPAGE
============================================ */

.hero-row {
    margin-bottom: 2rem;
}

.news-section {
    margin-bottom: 2.5rem;
}

/* Hero post */
.hero-post {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    display: block;
    text-decoration: none;
}

.hero-post img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.hero-post:hover img {
    transform: scale(1.02);
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1.5rem 1.5rem;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.88) 0%,
        rgba(0,0,0,0.5) 50%,
        transparent 100%
    );
}

.hero-caption .cat-badge {
    display: inline-block;
    background: var(--ls-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 0.6rem;
}

.hero-caption h2 {
    color: #fff;
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.hero-caption .hero-meta {
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
}

/* Secondary sidebar stories */
.secondary-posts {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.secondary-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--ls-border);
}

.secondary-item:last-child {
    border-bottom: none;
}

.secondary-item > a {
    flex-shrink: 0;
    width: 90px;
    height: 68px;
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.secondary-thumb {
    width: 90px !important;
    height: 68px !important;
    object-fit: cover;
}

.secondary-text {
    flex: 1;
    min-width: 0;
}

.secondary-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.secondary-title a {
    color: var(--ls-text);
    text-decoration: none;
}

.secondary-title a:hover {
    color: var(--ls-red);
}

.secondary-date {
    font-size: 0.75rem;
    color: var(--ls-muted);
}


/* ============================================
   SINGLE POST & PAGE
============================================ */

.single-hero {
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: 2rem;
    position: relative;
}

.single-hero-img {
    width: 100% !important;
    height: 130%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    will-change: transform;
}

.single-container {
    padding-bottom: 3rem;
}

.single-cat-label {
    margin-bottom: 0.75rem;
}

.single-cat-label a {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ls-red);
    text-decoration: none;
}

.single-cat-label a:hover {
    text-decoration: underline;
}

.single-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    color: var(--ls-dark);
}

.single-byline {
    font-size: 0.8rem;
    color: var(--ls-muted);
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ls-border);
}

.single-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #2d2d2d;
}

.single-content p {
    margin-bottom: 1.4rem;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.single-tags {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ls-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.single-tags-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ls-muted);
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.single-tag-pill {
    display: inline-block;
    background: #f1f3f5;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.single-tag-pill:hover {
    background: var(--ls-red);
    color: #fff;
}

.single-post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ls-border);
    gap: 1rem;
}

.single-post-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ls-text);
    text-decoration: none;
    max-width: 45%;
}

.single-post-nav a:hover {
    color: var(--ls-red);
}

.single-post-nav-next {
    text-align: right;
}

.single-related {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 3px solid var(--ls-border);
}


/* ============================================
   ARCHIVE (categories, tags)
============================================ */

.archive-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--ls-red);
}

.archive-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ls-red);
    margin-bottom: 0.35rem;
}

.archive-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ls-dark);
    margin: 0;
}

.archive-description {
    color: var(--ls-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.archive-featured {
    border: 1px solid var(--ls-border);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--ls-card-shadow);
}

.archive-featured-img-wrap {
    display: block;
    height: 100%;
    overflow: hidden;
}

.archive-featured-img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.archive-featured-img-wrap:hover .archive-featured-img {
    transform: scale(1.03);
}

.archive-featured-body {
    padding: 1.75rem;
}

.archive-featured-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0.4rem 0 0.75rem;
}

.archive-featured-title a {
    color: var(--ls-dark);
    text-decoration: none;
}

.archive-featured-title a:hover {
    color: var(--ls-red);
}

.archive-featured-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.archive-pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ls-border);
}

.archive-pagination .nav-links {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ls-text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
    background: var(--ls-red);
    border-color: var(--ls-red);
    color: #fff;
}


/* ============================================
   FOOTER
============================================ */

#wrapper-footer {
    margin-top: 3rem;
    border-top: 3px solid var(--ls-red);
}

.footer-top {
    background: var(--ls-dark);
    color: rgba(255,255,255,0.75);
    padding: 3rem 0 2rem;
}

.footer-logo img {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 0.75rem;
}

.footer-site-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
}

.footer-tagline {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.footer-about {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    margin-bottom: 0;
}

.footer-heading {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ls-red);
    margin-bottom: 1rem;
}

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

.footer-nav-list li {
    margin-bottom: 0.5rem;
}

.footer-nav-list a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.footer-nav-list a:hover {
    color: #fff;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.footer-tag-pill {
    display: inline-block;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.footer-tag-pill:hover {
    background: var(--ls-red);
    color: #fff;
}

.footer-bottom {
    background: #000;
    padding: 0.85rem 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}


/* ============================================
   RESPONSIVE
   All breakpoint overrides in one place.
============================================ */

@media (max-width: 767.98px) {

    /* Nav — vertical layout when collapsed */
    #main-nav .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid #f0f0f0 !important;
        border-left: 3px solid transparent;
        color: var(--ls-text) !important;
    }

    #main-nav .navbar-nav .nav-link:hover {
        border-left-color: var(--ls-red);
        border-bottom-color: #f0f0f0 !important;
        color: var(--ls-red) !important;
    }

    #main-nav .dropdown-menu {
        border-top: none;
        box-shadow: none;
        padding-left: 1rem;
        background-color: #f8f9fa;
    }

    /* Homepage hero — full-bleed, shorter */
    .hero-row {
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .hero-row > .col-lg-8 {
        padding-left: 0;
        padding-right: 0;
    }

    .hero-row > .col-lg-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-post {
        border-radius: 0;
    }

    .hero-post img {
        height: 260px;
    }

    .hero-caption {
        padding: 2rem 1rem 1rem;
    }

    .hero-caption h2 {
        font-size: 1.2rem;
    }

    /* Single/page hero — disable parallax, natural height */
    .single-hero {
        height: auto;
        margin-bottom: 1.5rem;
    }

    .single-hero-img {
        position: relative;
        top: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: 260px !important;
        object-fit: cover;
        object-position: center;
    }

    /* Single post typography */
    .single-title {
        font-size: 1.5rem;
    }

    .single-content {
        font-size: 1rem;
    }

    /* Footer */
    .footer-top {
        padding: 2rem 0 1.5rem;
    }
}