/*
 Theme Name: GeneratePress Child
 Theme URI: https://astro42.com/resources/
 Description: A child theme for GeneratePress, customized for Astro42 blog.
 Author: Your Name
 Author URI: https://astro42.com/
 Template: generatepress
 Version: 1.0
*/

/* ==========================================================================
   Custom Fonts
   ========================================================================== */
@font-face {
    font-family: "FH Lecturis Light";
    src: local("FH Lecturis Light"), local("FH Lecturis Light"),
        url("fonts/FHLecturis-Light.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "FH Lecturis Regular";
    src: local("FH Lecturis Regular"), local("FH Lecturis Regular"),
        url("fonts/FHLecturis-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Apply Custom Fonts
   ========================================================================== */
body, .main-navigation ul li a {
    font-family: "FH Lecturis Light", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "FH Lecturis Regular", sans-serif;
}

/* ==========================================================================
   General Page Styles
   ========================================================================== */
body {
    background-image: url('https://astro42.com/resources/wp-content/uploads/2025/04/background.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.site-content {
    background-color: transparent;
    padding: 20px;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.site-header {
    background-color: transparent;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

/* Styles when scrolling (sticky state) */
.site-header.sticky {
    background-color: rgba(11, 24, 36, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: smoothScroll 1s forwards;
    display: flex;
    align-items: center;
}

/* Keyframes for smooth scroll animation */
@keyframes smoothScroll {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Ensure the content below the header isn't hidden */
.site-content {
    padding-top: 50px;
}

.main-navigation {
    background-color: transparent;
}

.site-header .site-branding .main-title a {
    color: #FFFFFF;
}

/* Style the menu items for better spacing and appearance */
.main-navigation ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    line-height: 40px;
}

/* Style the last item in the primary menu */
.main-navigation ul li:last-child a {
    align-items: center;
    background: linear-gradient(90deg, #033a6b, #041047 60%) padding-box, linear-gradient(90deg, #0472d4, #071a71) border-box;
    border: 2px solid transparent;
    border-radius: 50em;
    display: inline-flex;
    flex-direction: row;
    font-weight: 700;
    justify-content: center;
    text-align: center;
    text-decoration: inherit;
    line-height: 40px;
}

/* Add SVG arrow after the last menu item text */
.main-navigation ul li:last-child a::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBhcmlhLWhpZGRlbj0idHJ1ZSI+PHBhdGggZD0iTTUgMTJIMTkiIHN0cm9rZT0id2hpdGUiIHN0cm9rZVdpZHRoPSIyIiBzdHJva2VDYXBsaW5lPSJyb3VuZCIgc3Ryb2tlTGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTEyIDVMMTkgMTJMMTIgMTkiIHN0cm9rZT0id2hpdGUiIHN0cm9rZVdpZHRoPSIyIiBzdHJva2VDYXBsaW5lPSJyb3VuZCIgc3Ryb2tlTGluZWpvaW49InJvdW5kIi8+PC9zdmc+');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 8px;
}

/* Ensure the header contents are laid out properly */
.inside-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    padding: 10px 20px;
}

/* Ensure the logo stays on the left */
.site-branding {
    flex-shrink: 0;
    margin-right: auto;
}

/* Ensure the menu stays on the right */
.main-navigation {
    flex-shrink: 0;
    margin-left: auto;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    /* Hide the desktop menu items and show the mobile menu */
    .main-navigation .menu {
        display: none;
    }

    .main-navigation.toggled .menu {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: transparent;
        margin: 0;
        padding: 1rem 2vw;
        border-radius: 3px;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        z-index: 1000;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        transform: translateZ(0);
        will-change: backdrop-filter;
        transition: all 0.3s ease;
    }
    
    /* Background when scrolled */
    .site-header.sticky .main-navigation.toggled .menu {
        background: rgba(11, 24, 36, 0.9);
    }

    /* Style the menu items */
    .main-navigation.toggled .menu li {
        padding: 0.5rem 0;
        text-align: end;
    }

    .main-navigation.toggled .menu li a {
        font-size: 1.5rem;
        font-weight: bold;
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        font-family: "FH Lecturis Light", sans-serif;
    }

    /* Adjust the last menu item (button) for mobile */
    .main-navigation.toggled .menu li:last-child a {
        font-size: 1.25rem;
        padding: 7px 2rem;
    }
}

/* ==========================================================================
   Blog and Archive Layouts
   ========================================================================== */
.blog .site-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.blog .site-main article {
    position: relative;
    flex: 1 1 calc(33.33% - 4px);
    box-sizing: border-box;
}

.blog .site-main article:nth-child(n+4) {
    flex: 1 1 100%;
}

.blog .site-main article,
.blog .site-main article .inside-article {
    background-color: transparent;
    padding: 15px;
    box-sizing: border-box;
}

.archive.category .site-main {
    display: block;
}

.archive.category .site-main article {
    flex: 1 1 100%;
    position: relative;
    margin-bottom: 30px;
}

.archive.category .site-content,
.archive.category .site-main,
.archive.category .page-header,
.archive.category .inside-article {
    background-color: transparent;
}

/* ==========================================================================
   Single Post Styles
   ========================================================================== */
.single-post .site-content,
.single-post .site-main,
.single-post .inside-article {
    background-color: transparent;
}

.single-post .inside-article .featured-image {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.single-post .inside-article .featured-image .wp-post-image {
    width: 100%;
    max-width: 100%;
    height: 400px;
    object-fit: cover;
}

.single-post .entry-content,
.single-post .entry-title,
.single-post .entry-content p {
    color: #FFFFFF;
}

.single-post .posted-on,
.single-post .byline {
    color: #FFFFFF;
}

/* ==========================================================================
   Post Image and Overlay Styles
   ========================================================================== */
.blog .post-image,
.archive.category .post-image {
    position: relative;
    margin-bottom: 0;
}

.blog .post-image::before,
.archive.category .post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

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

.archive.category .post-image a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ==========================================================================
   Entry Header and Titles
   ========================================================================== */
.blog .site-main article .entry-header {
    position: absolute;
    bottom: 80px;
    left: 50px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.archive.category .site-main article .entry-header {
    position: absolute;
    bottom: 80px;
    left: 70px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.blog .entry-title,
.archive.category .entry-title {
    font-size: 20px;
    margin: 0;
}

.blog .entry-title a,
.archive.category .entry-title a,
.archive.category .page-header .page-title {
    color: #FFFFFF;
    text-decoration: none;
}

/* ==========================================================================
   Category Links
   ========================================================================== */
.blog .entry-meta .cat-links {
    display: none;
}

.blog .entry-header .cat-links.custom-cat-links,
.archive.category .entry-header .cat-links.custom-cat-links {
    display: block;
    margin-bottom: 10px;
}

.blog .cat-links.custom-cat-links a,
.archive.category .cat-links.custom-cat-links a {
    background: linear-gradient(90deg, #033a6b, #041047 60%) padding-box, linear-gradient(90deg, #0472d4, #071a71) border-box;
    border: 2px solid transparent;
    color: #FFFFFF;
    border-radius: 20px;
    padding: 5px 10px;
    font-size: 12px;
    text-transform: uppercase;
    display: inline-block;
    text-decoration: none;
}

.blog .cat-links::before,
.blog .cat-links a::before,
.blog .cat-links .screen-reader-text {
    display: none;
}

/* ==========================================================================
   Hidden Elements
   ========================================================================== */
.blog .site-main .entry-summary,
.archive.category .entry-summary {
    display: none;
}

.blog .site-main .read-more {
    display: none;
}

.blog .posted-on,
.blog .byline {
    display: none;
}

.blog .comments-link {
    display: none;
}

.entry-meta {
    display: none;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
.site-footer {
    background-color: transparent !important;
    color: #FFFFFF;
    padding-top: 20px;
    font-size: 14px;
    border-top: none;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.0625rem;
    background-color: transparent;
    background-image: linear-gradient(90deg, hsla(0, 0%, 100%, 0), #fff, hsla(0, 0%, 100%, 0)) !important;
    border: 0 solid rgba(0, 0%, 0, 0.08);
    border-bottom: none;
    flex-shrink: 0;
    margin: 1rem 0;
    opacity: 0.25;
}

.site-footer * {
    background-color: transparent !important;
}

.site-info {
    text-align: center;
    font-size: 12px;
    color: #A0A0A0;
    padding-top: 20px;
}

.site-info a {
    color: #A0A0A0;
    text-decoration: none;
}

.site-info::after,
.site-footer .site-info + *::before,
.site-footer .site-info + * {
    border-top: none !important;
    border-bottom: none !important;
    display: none !important;
}

/* Footer Widgets */
.footer-widgets {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-widgets .footer-widget-1,
.footer-widgets .footer-widget-2,
.footer-widgets .footer-widget-3,
.footer-widgets .footer-widget-4,
.footer-widgets .footer-widget-5 {
    flex: 1 1 20%;
    min-width: 250px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-widget-3,
.footer-widget-5,
.footer-widget-1,
.footer-widget-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Footer Maps */
.footer-maps {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Footer Links */
.footer-widget-4 .widget_nav_menu ul {
    padding-left: 20px;
    margin: 0;
    text-align: left;
}

.footer-widget-4 .widget_nav_menu ul li {
    list-style-type: disc;
    list-style-position: outside;
    margin-bottom: 5px;
}

.footer-widget-4 .widget_nav_menu ul li a {
    color: #A0A0A0;
    text-decoration: underline;
    font-size: 12px;
}

/* ==========================================================================
   LinkedIn Icon
   ========================================================================== */
.linkedin-icon {
    display: inline-block;
    margin-top: 20px;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #033a6b, #041047 60%) padding-box, linear-gradient(90deg, #0472d4, #071a71) border-box;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 10px 10px;
}

.linkedin-icon img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
/* Tablets */
@media (max-width: 768px) {
    .blog .site-main {
        gap: 10px;
    }

    .blog .site-main article {
        flex: 1 1 calc(50% - 10px);
    }

    .blog .site-main article:nth-child(n+3) {
        flex: 1 1 100%;
    }

    .footer-widgets .footer-widget-1,
    .footer-widgets .footer-widget-2,
    .footer-widgets .footer-widget-3,
    .footer-widgets .footer-widget-4,
    .footer-widgets .footer-widget-5 {
        flex: 1 1 100%;
        margin-bottom: 20px;
    }

    .footer-widget-2 img {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .blog .site-main {
        gap: 15px;
    }

    .blog .site-main article {
        flex: 1 1 100%;
    }
}

/*
 * 
 * 
 * **************  Only FIERCE page *******************
 * 
 * 
 * */
body.page-id-139 .inside-article {
    padding: 0 !important;
}