
/* ================================================
   1. Global Layout & Image Containers
=================================================== */
.card {
    border: none;
    background-color: transparent;
}

.image-container {
    position: relative;
}

.image-flash {
    position: absolute;
    bottom: 5%;
    min-width: 30%;
    left: -2px;
    background-color: var(--color-primary-brand);
}

.scale {
    width: 100%;
    height: auto;
}

/* ================================================
   2. Masthead (Post Detail Header)
   (Rules merged from 3 separate definitions)
=================================================== */
.masthead {
    margin-top: 10px;
    overflow: hidden;
    position: relative;
    display: block;
    width: 100%;
    min-height: auto;
    height: auto;
    margin-bottom: 12px;
}

.masthead-text {
    background-color: var(--bg-dark);
    color: var(--color-text-light);
    position: relative;
}

.masthead-image {
    position: relative;
    overflow: hidden;
}

.masthead-image .scale {
    height: 100%;
    object-fit: cover;
}

.masthead-image:after {
    content: "";
    position: absolute;
    top: 0;
    right: 90%;
    height: 100%;
    width: 150%;
    background: var(--bg-dark);
    -webkit-transform: skew(15deg);
    -moz-transform: skew(15deg);
    transform: skew(15deg);
    z-index: 100;
}

/* ================================================
   3. Buttons & Links
=================================================== */
.btn-signup,
.btn-edit {
    background-color: var(--bg-dark);
    color: var(--color-primary-text);
}

.btn-signup:hover,
.btn-signup:active {
    background-color: var(--color-danger);
    color: var(--color-danger-text);
}

.link {
    color: var(--color-link);
    text-decoration: none;
}

.link:hover,
.link:active {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.btn-like {
    color: var(--color-primary-brand);
    border: none;
    background: transparent;
}

.btn-delete {
    color: var(--color-danger-text);
    background: var(--color-danger);
}

.btn-like:hover,
.btn-like:active {
    color: var(--color-link-hover);
    background: transparent;
    border: none;
}

.btn-edit:hover {
    background-color: var(--color-primary-brand);
    color: var(--color-primary-text);
}

.btn-delete:hover {
    background-color: var(--color-primary-brand);
    color: var(--color-primary-text);
}

/* ================================================
   4. Post List & Meta
=================================================== */
.author {
    color: white;
    margin: 4px;
    text-transform: uppercase;
}

.post-link {
    text-decoration: none;
    color: var(--color-text-dark);
}

.post-link:hover,
.page-link {
    color: var(--color-primary-brand);
}

.post-title {
    margin-top: 10%;
    margin-left: 5%;
}

.post-subtitle {
    margin-left: 5%;
    color: lightgray;
}

/* ================================================
   5. Comment Helper States
=================================================== */
.faded {
    color: rgb(172, 175, 175);
}

.approval {
    color: rgb(222, 146, 168);
}

/* ================================================
   6. Component-Specific Styles (Blog)
   (These were from the 'about' and 'blog index' sections)
=================================================== */

.card-img-top {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.image-wrapper {
    width: 100%;
    height: 60%;
    margin: 0 auto;
    overflow: hidden;
}

.back-link {
    color: var(--color-text-dark);
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
    color: var(--color-text-dark);
}

.left .card-img-top {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4; /* consistent crop */
    object-fit: cover;   /* fill nicely */
}

.left .image-container {
    position: relative;
    overflow: hidden; /* hides any bleed from object-fit */
}


/* ================================================
   7. Responsive Styles
   (Merged from 2 separate media queries)
=================================================== */

@media (max-width: 991.98px) {
    /* Mobile navbar tweaks */
    .navbar-collapse .navbar-nav .nav-link {
        width: fit-content;
        width: -moz-fit-content; /* Firefox support */
        margin-bottom: 4px;
    }
    .navbar-collapse .navbar-nav .nav-link.active::after {
        display: none;
    }

    .masthead {
        min-height: auto;
    }
}
