/*
 * Static-site CSS overrides.
 * Forces visibility on Inspiro/Elementor elements that depend on JS,
 * and lays out the Elementor gallery widget without its JS dependency.
 */

/* === Inspiro theme: force ready state === */
.site-branding,
.has-header-image .site-branding,
.has-header-video .site-branding,
.inspiro-front-page .site-branding {
    opacity: 1 !important;
    top: 50% !important;
}

.has-header-image .site-branding,
.has-header-video .site-branding {
    transform: translate(-50%, -50%) !important;
}

/* === Elementor: force visibility on animated elements === */
.elementor-invisible {
    visibility: visible !important;
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

.elementor-element[data-settings*="_animation"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.elementor-counter-number-wrapper {
    opacity: 1 !important;
    visibility: visible !important;
}

[data-aos]:not(.aos-animate) {
    opacity: 1 !important;
    transform: none !important;
}

/* === Footer: halve the band height + hide empty widget area === */

/* The footer-widgets aside contains an empty <section> on every page.
 * Hide it entirely so we don't get a tall empty band above the copyright. */
.site-footer .footer-widgets {
    display: none !important;
}

.site-footer.has-footer-widgets .inner-wrap {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.site-info {
    padding: 0.9em 0 !important;
}

/* Vertically center the copyright text and logo */
.site-info .copyright {
    align-items: center;
}

/* === Elementor Gallery widget — manual layout === */
/* Without e-gallery.min.js, items have no positioning. We replicate
 * the 3:2 grid with CSS grid (3 cols desktop, 2 tablet, 1 mobile). */

.elementor-widget-gallery .elementor-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
}

@media (max-width: 1024px) {
    .elementor-widget-gallery .elementor-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .elementor-widget-gallery .elementor-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Each gallery item: positioned, with a 3:2 aspect ratio */
.elementor-widget-gallery .e-gallery-item {
    display: block !important;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    text-decoration: none;
    background: #1a1a1a;
}

/* The thumbnail itself is rendered via background-image set by JS */
.elementor-widget-gallery .e-gallery-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.elementor-widget-gallery .e-gallery-item:hover .e-gallery-image {
    transform: scale(0.96); /* matches the "shrink" hover effect */
}

/* Overlay on top of image */
.elementor-widget-gallery .elementor-gallery-item__overlay {
    position: absolute;
    inset: 0;
    background-color: #1B252F1F;
    transition: background-color 0.8s ease;
    z-index: 1;
}

.elementor-widget-gallery .e-gallery-item:hover .elementor-gallery-item__overlay {
    background-color: #1B252F6E;
}

/* Title content centered */
.elementor-widget-gallery .elementor-gallery-item__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2;
}

.elementor-widget-gallery .elementor-gallery-item__title {
    color: #F8F812;
    font-family: "Archivo", Sans-serif;
    font-size: 23px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2em;
}

@media (max-width: 1024px) {
    .elementor-widget-gallery .elementor-gallery-item__title {
        font-size: 22px;
    }
}

@media (max-width: 767px) {
    .elementor-widget-gallery .elementor-gallery-item__title {
        font-size: 18px;
    }
}
