/**
 * Theme Name:        Fontmell Magna Theme
 * Description:       Fontmell Magna Theme (Child of 2025)
 * Version:           1.0.1
 * Author:            Egret Digital
 * Author URI:        https://egret.digital/
 * Text Domain:       fontmell-magna-theme
 * Domain Path:       /assets/lang
 * Tested up to:      6.9
 * License:           GNU General Public License v2.0 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Template:          twentytwentyfive
 */


/* Menu Styles */
nav {
    /* Highlight current menu item */
	.current-menu-item > a,
	a:hover,
	a:active {
		color: var(--wp--preset--color--custom-fontmell-red) !important;
		text-decoration: underline;
	}
	
	 /* Home link not needed on desktop */
	@media (min-width: 600px) {
	    .nav-home {
	        display: none !important;
	    }
	}

    /* Improve mobile menu styles */
    @media (max-width: 599px) {
	    .wp-block-navigation__responsive-container {
		background-color: #fffffff5 !important;
	    }
	    .wp-block-navigation__responsive-container-content {
		justify-content: center !important;
		align-items: center !important;

		ul {
		    justify-content: center !important;
		    align-items: center !important;
		}
		li {
		    font-size: var(--wp--preset--font-size--large) !important;
		}
	}
    }
}


/* Remove default margin above Footer */
footer {
    margin-block-start: 0;
}


/* Archive pages - core fix for loop images sometimes being wider than containers */
.archive .wp-block-post-featured-image {
	max-width: 100% !important;
}
/* Core fix for list items displayed as flex */
.archive .entry-content li {
	display: list-item;
}


/* Heading separators */
hr {
    color: #fff !important;
    height: 0.8em;
    background: repeating-linear-gradient(
      135deg,
      var(--wp--preset--color--custom-fontmell-light-grey),
      var(--wp--preset--color--custom-fontmell-light-grey) 4px,
      #fff 4px,
      #fff 8px
    );
}


/* Image captions */
figcaption {
    font-style: italic;
    text-align: center;
}


/* Image galleries */
.gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: normal;
    gap: var(--wp--style--gallery-gap-default, var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)));
    --wp--style--unstable-gallery-gap: var(--wp--style--gallery-gap-default, var(--gallery-block--gutter-size, var(--wp--style--block-gap, 0.5em)));
}
.gallery-item {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    max-width: 100%;
    position: relative;
    margin: 0;
    width: calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px) * .66667);
    
    @media (max-width: 600px) {
        width: calc(50% - var(--wp--style--unstable-gallery-gap, 16px) / 2);
    }
    @media (max-width: 375px) {
        width: 100%;
    }
    
    .gallery-icon {
        height: 100%;
    }
    img {
        aspect-ratio: 1 / 1;
        width: 100%;
        object-fit: cover;
        max-width: 100%;
        height: 100%;
    }
}


/* Keep search box at top */
@media (max-width: 781px) {
    .search-box {
        order: 0;
    }
    .search-results {
        order: 1;
    }
}