/*
Theme Name: Philip Garcia — Anymag Lean
Theme URI: https://philipgarcia.com/
Description: Streamlined, reversible child theme for the existing Anymag magazine design. Eager, responsive cover images; leaner asset loading; preserves legacy content and Elementor layouts.
Author: Philip Garcia / McKnight Marketing
Template: anymag
Version: 1.3.0
Requires at least: 6.8
Requires PHP: 7.4
Text Domain: pg-anymag-lean
*/

/* Preserve the existing Anymag magazine structure, but remove the blurred
   double-image transition that delayed the largest visible element. */
.magcover .pg-lean-cover-image {
    overflow: hidden;
    animation: none !important;
    -webkit-animation: none !important;
    background: #fff;
}
.magcover .pg-lean-cover-image .pg-lean-cover-asset {
    position: absolute;
    display: block;
    inset: 0;
    width: 100%;
    height: 104%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    filter: none !important;
    opacity: 1;
    transform: none;
}

/* Let the article masthead and cover widgets remain readable in their
   existing stacking contexts; avoid accidental overlay trapping. */
.magcover .pg-lean-cover-image {
    pointer-events: none;
}

/* Prevent layout movement if Smush excludes first-screen logos from lazy load. */
.cover-logo img,
.top-logo img,
.menu-logo img {
    max-width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .magcover .pg-lean-cover-image,
    .magcover .pg-lean-cover-image img {
        transition: none !important;
        animation: none !important;
    }
}

/* Optional lean-navigation mode on standard article pages only. */
.pg-lean-light-navigation #nav-wrapper {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.pg-lean-light-navigation #nav-wrapper .menu-item-has-children > .sub-menu-toggle {
    cursor: pointer;
}
.pg-lean-light-navigation .nav-menu .sub-menu {
    display: none;
}
.pg-lean-light-navigation .nav-menu .menu-item-has-children.pg-submenu-open > .sub-menu {
    display: block;
}
.pg-lean-light-navigation .container iframe[src*='youtube.com'],
.pg-lean-light-navigation .container iframe[src*='youtu.be'],
.pg-lean-light-navigation .container iframe[src*='vimeo.com'] {
    max-width: 100%;
}
