/* --- 1. LOADING FADE SYSTEM --- */

/* Initially hide content so it can fade in. 
   Requires the JS snippet in your footer to add 'is-loaded' class. */
body:not(.is-loaded) .wp-site-blocks,
body:not(.is-loaded) #page {
    opacity: 0 !important; 
}

#page, .wp-site-blocks {
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Fallback: Show site if JS is disabled */
.no-js .wp-site-blocks, .no-js #page { opacity: 1 !important; }

/* --- 2. GLOBAL LINK RESET (NO UNDERLINES) --- */

a, a:hover, a:focus, .wp-block-navigation-item__content {
    text-decoration: none !important; 
    outline: none !important;
    box-shadow: none !important;
}

/* --- 3. CRITICAL LAYOUT & ZERO GAPS --- */

header.wp-block-template-part, 
.wp-site-blocks > footer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

main#wp--skip-link--target, 
.entry-content,
.wp-site-blocks {
    /* Global Padding Removed as requested */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important; 
}

.entry-content > *:first-child { margin-top: 0 !important; }
.entry-content > *:last-child { margin-bottom: 0 !important; }

/* Sticky Header */
header.wp-block-template-part {
    position: sticky !important;
    top: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Admin Bar Fix */
.admin-bar header.wp-block-template-part { top: 0px !important; }
@media screen and (max-width: 782px) {
    .admin-bar header.wp-block-template-part { top: 0px !important; }
}

/* --- 4. BUTTONS: LOCK BACKGROUND & SCALE 1.1 --- */

.wp-block-button__link, 
.wp-element-button {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: inline-block !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    filter: none !important;  
    opacity: 1 !important;
    box-shadow: none !important;
    transform: scale(1.1) !important;
}

/* HEADER BUTTON: White Border Lock */
header.wp-block-template-part .wp-block-button__link:hover,
header.wp-block-template-part .wp-element-button:hover {
    border: 2px solid #ffffff !important;
    background-color: transparent !important;
    background: transparent !important;
}

/* --- 5. SITE IDENTITY & NAVIGATION (SUBMENU BOX LOCKED) --- */

.wp-block-site-title a, .wp-block-site-tagline {
    display: inline-block !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.wp-block-site-title a:hover, .wp-block-site-tagline:hover {
    transform: scale(1.05) !important;
}

.wp-block-navigation-item { transform: none !important; }

/* Lock the submenu dropdown container so it doesn't scale with the text */
.wp-block-navigation__submenu-container,
.wp-block-navigation-submenu {
    transform: none !important; 
    transition: none !important;
}

.wp-block-navigation-item__content {
    display: inline-block !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.wp-block-navigation-item__content:hover {
    transform: scale(1.15) !important;
}

.wp-block-site-logo img { transform: none !important; transition: none !important; }

/* General list item hover */
li:not(.wp-block-navigation-item) { 
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important; 
}
li:not(.wp-block-navigation-item):hover { transform: scale(1.05) !important; }
/* --- 6. POP GALLERY (CLEAN FIX) --- */

/* 1. The Container: Targets the Image Block within your pop-gallery group */
.pop-gallery .wp-block-image {
    overflow: hidden !important;
    position: relative !important;
    /* This matches your 2% radius to keep corners clean during the zoom */
    border-radius: 2% !important; 
    display: block;
}

/* 2. The Image: Targets the actual image tag */
.pop-gallery .wp-block-image img {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform;
    backface-visibility: hidden;
}

/* 3. The Hover Trigger: Zoom the image when hovered */
.pop-gallery .wp-block-image:hover img {
    transform: scale(1.12) !important;
}

/* 4. Interface Protection: Keep the lightbox button from scaling */
.pop-gallery .wp-block-image .lightbox-trigger {
    transform: none !important;
    z-index: 10;
}

/* --- 7. FOOTER SETTINGS & CUSTOM ICON LISTS --- */

ul.custom-icon-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

ul.custom-icon-list li {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #fff !important;
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

ul.custom-icon-list li:hover {
    transform: scale(1.05) !important;
}

ul.custom-icon-list a {
    color: white !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
}

ul.custom-icon-list svg {
    fill: #ffffff !important;
    width: 17px !important;
    height: 24px !important;
    flex-shrink: 0;
}

/* MOBILE FOOTER RESPONSIVENESS */
@media (max-width: 768px) {
    .site-footer .footer-container, 
    footer .wp-block-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    ul.custom-icon-list, 
    ul.custom-icon-list li {
        justify-content: center !important;
        width: 100% !important;
        margin-left: 0 !important;
        transform-origin: center;
    }
}

/* --- 8. INDIVIDUAL TEXT POP (RESTORED CURSOR) --- */

/* 1. Base styles for all text elements */
.text-hover p, 
.text-hover h1, .text-hover h2, .text-hover h3, 
.text-hover h4, .text-hover h5, .text-hover h6,
.text-hover span, .text-hover li, .text-hover a {
    display: inline-block !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
    transform-origin: left center;
    backface-visibility: hidden;
}

/* 2. Restore standard cursors */
.text-hover span, .text-hover p, .text-hover li {
    cursor: text !important; /* Typical text selection cursor */
}

/* 3. Keep the pointer only for actual links */
.text-hover a {
    cursor: pointer !important;
}

/* 4. Individual Hover Zoom */
.text-hover p:hover, 
.text-hover h1:hover, .text-hover h2:hover, .text-hover h3:hover, 
.text-hover h4:hover, .text-hover h5:hover, .text-hover h6:hover,
.text-hover span:hover, .text-hover li:hover, .text-hover a:hover {
    transform: scale(1.1) !important;
    z-index: 10;
    position: relative;
}
/* --- 6. GALLERY POP (FOR '.pop-gallery' CLASS) --- */

.pop-cover-gallery .wp-block-cover { overflow: hidden !important; }
.pop-cover-gallery .wp-block-cover img { 
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important; 
}
.pop-cover-gallery .wp-block-cover:hover img { transform: scale(1.15) !important; }
.pop-cover-gallery .wp-block-cover:hover .wp-block-cover__inner-container { transform: scale(1.05) !important; }
