/*
Theme Name: Astra Child
Template: astra
Author: Paul Robertson
Version: 1.0.0
*/

/* General Styles */
body.page-template-template-home-php .ast-container,
body.home .ast-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.entry-meta,
.author-info,
.post-date {
    display: none !important;
}

body.blog .ast-container,
body.single-post .ast-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Prevent distortion of blog card featured images */
.blog .ast-blog-featured-section img,
.archive .ast-blog-featured-section img {
    width: 100%;
    height: auto;
    /* maintains aspect ratio */
    object-fit: cover;
    /* crops instead of squishing */
    display: block;
}

main.site-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Header Styling */
.ast-above-header-bar {
    min-height: 300px !important;
}

/* Menu Styling */
.sub-menu>li a {
    color: #686868 !important;
}

.sub-menu>li a:hover {
    color: white !important;
    background-color: #686868 !important;
}

/* Scrollable Container */
.scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 4rem;
    box-sizing: border-box;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 1rem;
    padding: 0 3rem 0 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    flex-grow: 1;
    z-index: 1;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Scroll Buttons */
.scroll-left {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    z-index: 10;
}

.scroll-right {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 10;
}

.scroll-left, .scroll-right {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 2rem;
    border-radius: 4px;
    opacity: 0.8;
    height: 60px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center; 
}

/* Hide scroll buttons on mobile */
@media (max-width: 768px) {
    .scroll-wrapper {
        padding: 0;
    }
    .scroll-left,
    .scroll-right {
        display: none;
    }
}

/* Carousel section */
.carousel-section {
    position: relative;
    background-color: #f8f8f8;
    overflow: hidden;
}
.carousel-section h2 {
    transform: translate(5%, 0);
}

/* Post Cards */
/* Default: Mobile View */
.projects-post-card,
.past-projects-post-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 300px;
    height: 300px;
    background-size: cover;
    background-position: center;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Desktop: wider cards */
@media (min-width: 1024px) {

    .projects-post-card,
    .past-projects-post-card {
        width: 850px;
        max-width: 850px;
    }
}

.projects-post-card::before,
.past-projects-post-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.card-content {
    position: relative;
    padding: 1rem;
    z-index: 1;
    color: white;
}

.card-content h3 {
    margin: 0 0 0.5rem;
    color: rgb(255, 255, 255);
}

.card-content p {
    margin: 0;
}

/* People Section */
.feature-grid-section {
    padding:3rem;
    margin: 3rem 0;
    box-sizing: border-box;
    background-color: black;
}
.feature-grid-section h2 {
    /* transform: translate(45%, 0); */
    /* color: white; */
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 300px));
    grid-template-rows: repeat(3, 1fr);
    justify-content: center;
    gap: 1rem;
}

.person-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 6px;
    text-decoration: none;
    background: #eee;
    height: 160px;
    text-align: center;
}

.person-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.name-overlay {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 0.5em;
    font-size: 0.85rem;
}

.people-widget.people-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.people-widget.people-layout-row {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.people-widget .person {
    text-align: center;
}

.people-widget .person img {
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .people-section {
        padding: 0 0 1rem 0;
        margin: 0;
    }

    .people-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
}


/* Highlight Carousel */
#highlight-section {
    margin: 0 !important;
    padding: 0 10rem !important;
}

.highlight-section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.highlight-image-wrapper {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 60vh;
    max-height: 418px;
}

.highlight-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(58, 122, 217, 0.35), rgba(58, 122, 217, 0.5));
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 2rem;
}

.highlight-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.highlight-button {
    padding: 0.75rem 1.5rem;
    background-color: #fff;
    color: #3a7ad9;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.highlight-button:hover {
    background-color: #efefef;
}

/* Carousel Alt Section */
.carousel-alt-section {
    position: relative;
    background-color: #f8f8f8;
    overflow: hidden;
}
.carousel-alt-section h2 {
    transform: translate(5%, 0);
}

/* Utility */
.post-section {
    margin: 3rem 0;
}

