/* ─── LOADER STYLES ─── */

/* FORÇA VISIBILIDADE DO BODY - FIX EMERGÊNCIA */
body {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* FORÇA VISIBILIDADE DOS WIDGETS ELEMENTOR */
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget,
.elementor-widget-wrap,
.elementor-widget-container,
.ohs-wrap,
.obu-wrap,
main,
#main {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.elementor-section {
    display: block !important;
}

.elementor-container {
    display: flex !important;
}

.elementor-widget-wrap {
    display: flex !important;
}

/* Remove qualquer loader inicial que possa estar travando */
#ourofino-loading {
    display: none !important;
    visibility: hidden !important;
}

/* Fallback para classe hidden antes do carregamento do Tailwind */
.hidden {
    display: none;
}

.ourofino-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    will-change: opacity;
}

.ourofino-loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.ourofino-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ourofino-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #10AD31;
    border-radius: 50%;
    animation: ourofino-spin 1s linear infinite;
    will-change: transform;
}

@keyframes ourofino-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.ourofino-loader-text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #002147;
    font-weight: 500;
}

/* ─── SKELETON LOADERS ─── */

.ourofino-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ourofino-skeleton-loading 1.5s infinite;
}

@keyframes ourofino-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.ourofino-skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ourofino-skeleton-image {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ourofino-skeleton-title {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ourofino-skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.ourofino-skeleton-text:last-child {
    margin-bottom: 0;
}

/* ─── GRID SKELETON ─── */

.ourofino-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

@media (max-width: 768px) {
    .ourofino-skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ourofino-skeleton-grid {
        grid-template-columns: 1fr;
    }
}