/**
 * CSS personalizado RESCOP - SIN DEBUG
 */

/* === OCULTAR ELEMENTOS DEL TEMA PADRE === */
#footer,
.site-info,
.wp-block-template-part[data-wp-block-template-part-area="footer"]:not(.rescop-footer),
footer:not(.rescop-footer) {
    display: none !important;
}

/* Ocultar header del tema padre */
.wp-site-blocks > header:not(.rescop-header),
.site-header:not(.rescop-header),
header:not(.rescop-header) {
    display: none !important;
}
/**
 * Ocultar elementos automáticos en single posts
 */

/* === OCULTAR ENTRADAS RELACIONADAS === */
.single .related-posts,
.single .wp-block-latest-posts,
.single .related-entries,
.single .related-content,
.single [class*="related"],
.single [id*="related"] {
    display: none !important;
}

/**
 * Eliminar relpost container específicamente
 */

/* === ELIMINAR RELPOST CONTAINER === */
.single .relpost-container,
.single #relpost-container,
.single .relpost,
.single #relpost,
.single [class*="relpost"],
.single [id*="relpost"] {
    display: none !important;
}

/* === OTROS CONTENEDORES RELACIONADOS === */
.single .related-posts-container,
.single .related-entries-container,
.single #related-posts-container {
    display: none !important;
}

/* === OCULTAR COMPARTIR AUTOMÁTICO === */
/* .single .share-content,
.single .social-share,
.single .post-share,
.single [class*="share"],
.single [class*="social"] {
    display: none !important;
} */

/* === OCULTAR NAVEGACIÓN DE POSTS === */
.single .post-navigation,
.single .nav-links,
.single .post-nav,
.single .entry-navigation {
    display: none !important;
}

/* === OCULTAR METADATOS AUTOMÁTICOS === */
.single .entry-meta,
.single .post-meta,
.single .entry-footer {
    display: none !important;
}

/* === OCULTAR COMENTARIOS SI NO LOS QUIERES === */
.single #comments,
.single .comments-area {
    display: none !important;
}

/* === LIMPIAR CONTENIDO DEL POST === */
.single .entry-content {
    /* Reset de estilos que puedan interferir */
    margin: 0 !important;
    padding: 0 !important;
}

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

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

/* === RESET BÁSICO === */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
}

body {
    font-family: var(--rescop-font-primary, 'Merriweather Sans', sans-serif) !important;
}

/* Reset específico del tema Twenty Twenty-Five */
.wp-site-blocks {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Eliminar padding por defecto de Twenty Twenty-Five */
body:not(.wp-admin) {
    --wp--style--global--content-size: none !important;
    --wp--style--global--wide-size: none !important;
}

/* Eliminar padding de TODOS los contenedores posibles */
.wp-block-group,
.entry-content,
.wp-block-post-content,
main,
.site-main,
.wp-block-group__inner-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

/* === ASEGURAR FLUJO NORMAL === */
.rescop-hero-component {
    /* Usar margin negativo en lugar de position fixed */
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);

    /* Sin márgenes verticales */
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}



/* === UTILIDADES GENERALES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.w-full { width: 100%; }
.h-full { height: 100%; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/**
 * Border-radius global para todos los recuadros RESCOP
 */

/* === HERO SECTION === */
.rescop-hero-news-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.rescop-hero-news-card-image {
    border-radius: 6px 6px 0 0 !important;
}

/* === CAMPAÑAS === */
.rescop-campaign-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.rescop-campaign-card-image {
    border-radius: 6px 6px 0 0 !important;
}

.rescop-campaign-cta {
    border-radius: 6px !important;
}

/* === ÚLTIMAS NOTICIAS === */
.rescop-latest-main-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.rescop-latest-main-image {
    border-radius: 6px 6px 0 0 !important;
}

.rescop-latest-secondary-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.rescop-latest-secondary-image {
    border-radius: 6px !important;
}

.rescop-latest-secondary-placeholder {
    border-radius: 4px !important;
}

/* === ORGANIZACIONES === */
.rescop-organization-card {
    border-radius: 8px !important;
    overflow: hidden;
}

.rescop-org-logo {
    border-radius: 6px !important;
    overflow: hidden;
}

.rescop-org-logo-placeholder {
    border-radius: 4px !important;
}

.rescop-org-tag {
    border-radius: 6px !important; 
}

/* === HEADER === */
.rescop-mobile-menu {
    border-radius: 12px 0 0 12px !important;
}

.rescop-mobile-cta-button {
    border-radius: 8px !important;
}

/* === FOOTER === */
.rescop-social-icon-bg {
    border-radius: 6px !important;
}
/* === BOTONES GENERALES === */
.rescop-hero-button,
.rescop-campaign-cta,
.rescop-mobile-cta-button,
.rescop-cta-bg {
    border-radius: 6px !important;
}

/* === CARDS GENERALES === */
.rescop-news-card,
.rescop-campaign-card,
.rescop-latest-main-card,
.rescop-latest-secondary-card,
.rescop-organization-card {
    border-radius: 8px !important;
    overflow: hidden;
}

/* === IMÁGENES === */
.rescop-news-card-image,
.rescop-campaign-card-image,
.rescop-latest-main-image,
.rescop-hero-news-image {
    border-radius: 6px 6px 0 0 !important;
}

/* Imágenes redondas pequeñas */
.rescop-org-logo,
.rescop-latest-secondary-image,
.rescop-social-icon-bg {
    border-radius: 6px !important;
}

/* === PLACEHOLDERS === */
.rescop-news-card-placeholder,
.rescop-campaign-card-placeholder,
.rescop-latest-main-placeholder,
.rescop-latest-secondary-placeholder,
.rescop-org-logo-placeholder,
.rescop-hero-news-placeholder {
    border-radius: 4px !important;
}

/* === TAGS Y ELEMENTOS PEQUEÑOS === */
.rescop-org-tag {
    border-radius: 6px !important;
}

/**
 * Text-transform consistente en todos los componentes
 */

/* === TÍTULOS DE CARDS/ARTÍCULOS - CAPITALIZE === */
.rescop-news-card-title,
.rescop-hero-news-card-title,
.rescop-campaign-card-title,
.rescop-latest-main-title,
.rescop-latest-secondary-title {
    text-transform: capitalize !important;
}

/* === NOMBRES DE ORGANIZACIONES - CAPITALIZE === */
.rescop-org-name {
    text-transform: capitalize !important;
}

/* === NAVEGACIÓN Y BOTONES - UPPERCASE ===
.rescop-hero-button span,
.rescop-campaign-cta span,
.rescop-mobile-cta-button,
.rescop-org-tag span {
    text-transform: uppercase !important;
} */

/* === RESET SOLO PARA CTA DEL HEADER === */
.rescop-header .rescop-cta-bg .rescop-cta-text {
    color: white !important;
    /* font-size: 24px !important; */
    font-family: var(--rescop-font-display, 'Anton', sans-serif) !important;
    font-weight: 400 !important;
    line-height: 36px !important;
    text-transform: none !important;
    text-decoration: none !important;
    word-wrap: break-word;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}

/* === FORZAR ESTILOS EN RESPONSIVE === */
@media (max-width: 1680px) and (min-width: 1401px) {
    .rescop-header .rescop-cta-text {
        font-size: 22px !important;
        line-height: 32px !important;
    }
}

@media (max-width: 1400px) and (min-width: 1025px) {
    .rescop-header .rescop-cta-text {
        font-size: 20px !important;
        line-height: 30px !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .rescop-header .rescop-cta-text {
        font-size: 18px !important;
        line-height: 28px !important;
    }
}

@media (max-width: 768px) {
    .rescop-header .rescop-cta-text {
        font-size: 14px !important;
        line-height: 18px !important;
    }
}

@media (max-width: 480px) {
    .rescop-header .rescop-cta-text {
        font-size: 12px !important;
        line-height: 16px !important;
    }
}

/**
 * Ancho máximo 1280px para todos los componentes - MANTENIENDO FLEX
 */

/* === CONTENEDORES PRINCIPALES 1280px === */
.rescop-hero-container,
.rescop-campaigns-container,
.rescop-latest-news-container,
.rescop-organizations-container {
    /* Ancho máximo del cliente */
    max-width: 1280px !important;

    /* Mantener centrado y flex */
    margin: 0 auto;
    width: 100%;

    /* Padding responsivo */
    padding-left: clamp(1rem, 4vw, 4rem) !important;
    padding-right: clamp(1rem, 4vw, 4rem) !important;
}

/* === GRIDS CON ANCHO LIMITADO === */
.rescop-hero-news-grid,
.rescop-campaigns-grid,
.rescop-latest-news-layout,
.rescop-organizations-grid {
    /* Ancho máximo pero manteniendo flex */
    max-width: 1200px; /* Algo menos para dar margen */
    width: 100%;
    margin: 0 auto;
}

/* === AJUSTAR PADDING LATERAL === */
.rescop-hero-news-grid {
    padding: 0 2rem !important; /* Reducir padding */
}

.rescop-organizations-grid {
    /* Recalcular gap para 5 columnas en 1200px */
    gap: 1rem;
}
/* === EXCEPCIONES - SIN TRANSFORM === */
.rescop-hero-subtitle,
.rescop-campaigns-subtitle,
.rescop-campaign-card-excerpt,
.rescop-latest-main-excerpt,
.rescop-latest-main-date,
.rescop-latest-secondary-date,
.rescop-org-email,
.rescop-org-website,
.rescop-footer-copyright {
    text-transform: none !important;
}

/**
 * BLOQUE DE IMAGEN DE CAMPAÑA - MANTENER PROPORCIONES
 * Corregir deformación de imágenes en posts tipo 'campana'
 */

/* === CONTENEDOR DE SECCIÓN IMAGEN === */
.rescop-campaign-section.rescop-section-image {
    width: 100% !important;
    margin: 2rem 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* === WRAPPER DE IMAGEN === */
.rescop-campaign-image-wrapper {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    
    /* CLAVE: Mantener aspect ratio 16:9 */
    aspect-ratio: 16/9 !important;
    
    /* Fallback para navegadores que no soportan aspect-ratio */
    padding-bottom: 56.25% !important;
    height: 0 !important;
}

/* === IMAGEN CON PROPORCIONES CORRECTAS === */
.rescop-campaign-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* CLAVE: object-fit para mantener proporciones */
    object-fit: cover !important;
    object-position: center !important;
    
    /* Eliminar cualquier max-width o height que pueda interferir */
    max-width: none !important;
    max-height: none !important;
    
    /* Transición suave */
    transition: transform 0.3s ease !important;
    
    /* Bordes */
    border-radius: 8px !important;
    display: block !important;
}

/* === HOVER EFFECT === */
.rescop-campaign-image-wrapper:hover .rescop-campaign-image {
    transform: scale(1.02) !important;
}

/* === SOPORTE PARA NAVEGADORES SIN ASPECT-RATIO === */
@supports not (aspect-ratio: 1) {
    .rescop-campaign-image-wrapper {
        position: relative !important;
        padding-bottom: 56.25% !important; /* 16:9 ratio */
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .rescop-campaign-image-wrapper {
        max-width: 100% !important;
        margin: 0 1rem !important;
    }
}

@media (max-width: 768px) {
    .rescop-campaign-section.rescop-section-image {
        margin: 1.5rem 0 !important;
    }
    
    .rescop-campaign-image-wrapper {
        margin: 0 0.5rem !important;
        border-radius: 6px !important;
    }
    
    .rescop-campaign-image {
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    .rescop-campaign-image-wrapper {
        margin: 0 !important;
        border-radius: 4px !important;
    }
    
    .rescop-campaign-image {
        border-radius: 4px !important;
    }
}

