/* ==========================================================================
   MEJORAS PORTADA - Héroes de 4 Patas
   Archivo: custom-homepage.css
   Solo afecta a la página de inicio (.asi-front-page)
   Colores: azul #004a83, verde #007732
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. MEJORAS GENERALES DE LA PORTADA
   -------------------------------------------------------------------------- */

/* Scroll suave en toda la web */
html {
    scroll-behavior: smooth;
}

/* Separación entre secciones de la portada */
.asi-front-page .asi-front-page .widget.asitheme-widget + .widget.asitheme-widget {
    border-top: none;
}

/* Limitar ancho máximo de la portada en escritorio */
@media only screen and (min-width: 1200px) {
    .asi-front-page .site-inner {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Two-blocks: limitar para que las imágenes no se estiren */
    .asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .image-wrapper {
        max-height: 500px;
    }

    /* Widget-main (heros/CTAs con imagen de fondo): limitar altura */
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main {
        max-height: 600px;
    }

    /* Logos: contener dentro de un ancho razonable */
    .asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logos-wrapper {
        max-width: 1100px;
    }

    /* Features: contener items */
    .asi-front-page .widget.asitheme-widget .asitheme-widget-features .items {
        max-width: 1100px;
    }
}

/* --------------------------------------------------------------------------
   2. HERO / BANNER PRINCIPAL
   -------------------------------------------------------------------------- */

/* Mayor impacto visual en el hero */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main {
    padding: 18rem 0;
    position: relative;
}

/* Overlay con degradado más sofisticado */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main > .back {
    background: linear-gradient(
        135deg,
        rgba(0, 74, 131, 0.7) 0%,
        rgba(0, 119, 50, 0.5) 100%
    );
    opacity: 1;
}

/* Título del hero más grande y con sombra */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main .title {
    font-size: 5.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
    line-height: 1.2;
}

/* Subtítulo del hero */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main .text {
    font-size: 2.2rem;
    font-weight: 300;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
    max-width: 70%;
}

/* Botón del hero mejorado */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main .button {
    font-size: 2rem;
    padding: 1.5rem 5rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-main .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive hero */
@media only screen and (max-width: 990px) {
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main {
        padding: 12rem 0;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .title {
        font-size: 4rem;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .text {
        max-width: 85%;
    }
}

@media only screen and (max-width: 544px) {
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main {
        padding: 8rem 0;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .title {
        font-size: 2.8rem;
        letter-spacing: 0.02em;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .text {
        font-size: 1.6rem;
        max-width: 90%;
    }

    #asitheme_widget_main-1 .button,
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .button {
        font-size: 1.4rem !important;
        padding: 1.2rem 2.5rem !important;
        white-space: nowrap !important;
        letter-spacing: 0.05em !important;
        display: inline-block !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        width: auto !important;
        height: auto !important;
        border-radius: 50px !important;
        border: none !important;
        outline: none !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    #asitheme_widget_main-1 .button::before,
    #asitheme_widget_main-1 .button::after,
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .button::before,
    .asi-front-page .widget.asitheme-widget .asitheme-widget-main .button::after {
        display: none !important;
        content: none !important;
        border: none !important;
    }
}

/* --------------------------------------------------------------------------
   3. SECCIÓN FEATURED / PERROS EN ADOPCIÓN
   -------------------------------------------------------------------------- */

/* Contenedor de features con mejor espaciado */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features {
    padding: 8rem 0;
    background-color: #f8f9fa;
}

/* Título de sección */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features h2 {
    font-size: 3.8rem;
    font-weight: 600;
    color: #004a83;
    position: relative;
    padding-bottom: 2rem;
    max-width: 80%;
}

/* Línea decorativa bajo el título */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #004a83, #007732);
    border-radius: 2px;
}

/* Items/tarjetas de features */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features .items .item {
    background: #fff;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-features .items .item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 74, 131, 0.12);
}

/* Imágenes en features redondeadas */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features .items .item img {
    border-radius: 8px;
}

/* Títulos de items */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features .items .item h3 {
    color: #004a83;
    font-weight: 600;
    font-size: 2rem;
    margin-top: 1rem;
}

/* Texto descriptivo */
.asi-front-page .widget.asitheme-widget .asitheme-widget-features .items .item .i-text {
    color: #555;
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   4. SECCIÓN TWO-BLOCKS (Noticias, Info, Solidarios)
   -------------------------------------------------------------------------- */

/* Contenedor two-blocks con mejor estilo */
.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks {
    overflow: hidden;
}

/* Imagen de fondo del bloque */
.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .image-wrapper {
    background-size: cover;
    background-position: center;
    min-height: 45rem;
    transition: transform 0.6s ease;
}

/* Efecto zoom suave en hover */
.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks:hover .image-wrapper {
    transform: scale(1.02);
}

/* Texto del two-blocks */
.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper {
    padding: 6rem 8rem;
    display: flex;
    align-items: center;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper h2 {
    color: #004a83;
    font-weight: 600;
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 2rem;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper p {
    color: #444;
    line-height: 1.8;
    font-size: 1.7rem;
}

/* Botón dentro de two-blocks */
.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1.2rem 4rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.6rem;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 131, 0.2);
}

@media only screen and (max-width: 990px) {
    .asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper {
        padding: 4rem 5rem;
    }
}

@media only screen and (max-width: 544px) {
    .asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .image-wrapper {
        min-height: 25rem;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper {
        padding: 3rem;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-two-blocks .text-wrapper h2 {
        font-size: 2.4rem;
    }
}

/* --------------------------------------------------------------------------
   5. SECCIONES DE LOGOS (Patrocinadores y Colaboradores)
   -------------------------------------------------------------------------- */

/* Contenedor de logos */
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos {
    padding: 7rem 0;
    background-color: #fff;
}

/* Título de la sección de logos */
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .title {
    font-size: 2.2rem;
    font-weight: 600;
    color: #004a83;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    padding-bottom: 2rem;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #004a83, #007732);
    border-radius: 2px;
}

/* Logos individuales - efecto escala de grises */
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo {
    padding: 1.5rem 3rem;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    max-height: 5rem;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   6. CTAs INTERMEDIOS (Apadrinar, Adoptar, Colaborar)
   -------------------------------------------------------------------------- */

/* Todos los CTAs tipo widget-main en la portada */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main > .inner {
    max-width: 65%;
}

/* Mejor legibilidad del texto sobre imagen */
.asi-front-page .widget.asitheme-widget .asitheme-widget-main .title + .text {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* --------------------------------------------------------------------------
   7. SECCIÓN BLOG / PRENSA (Artículos destacados)
   -------------------------------------------------------------------------- */

/* Contenedor de artículos */
.asi-front-page .widget.featured-content {
    padding: 6rem 5rem;
    background-color: #f8f9fa;
}

/* Título de la sección de blog */
.asi-front-page .widget.featured-content .widget-title {
    font-size: 2.2rem;
    color: #004a83;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 2rem;
}

.asi-front-page .widget.featured-content .widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #004a83, #007732);
    border-radius: 2px;
}

/* Tarjetas de artículos */
.asi-front-page .widget.featured-content .entry {
    border-bottom: none;
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.5rem;
}

.asi-front-page .widget.featured-content .entry:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 74, 131, 0.1);
}

/* Configuración de cuadrícula si posee imagen destacada */
.asi-front-page .widget.featured-content .entry:has(.alignleft),
.asi-front-page .widget.featured-content .entry:has(.entry-image-link) {
    grid-template-columns: 150px 1fr;
    column-gap: 2.5rem;
}

/* Contenedor de la imagen de entrada */
.asi-front-page .widget.featured-content .entry .alignleft,
.asi-front-page .widget.featured-content .entry .entry-image-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    float: none !important;
    margin: 0 !important;
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.asi-front-page .widget.featured-content .entry img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 8px;
}

/* Título y contenido */
.asi-front-page .widget.featured-content .entry .entry-header {
    margin: 0;
}

.asi-front-page .widget.featured-content .entry:has(.alignleft) .entry-header,
.asi-front-page .widget.featured-content .entry:has(.entry-image-link) .entry-header {
    grid-column: 2;
    grid-row: 1;
}

.asi-front-page .widget.featured-content .entry .entry-content {
    margin: 0;
}

.asi-front-page .widget.featured-content .entry:has(.alignleft) .entry-content,
.asi-front-page .widget.featured-content .entry:has(.entry-image-link) .entry-content {
    grid-column: 2;
    grid-row: 2;
}

/* Título del artículo */
.asi-front-page .widget.featured-content .entry-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    text-align: left;
    line-height: 1.4;
}

.asi-front-page .widget.featured-content .entry-title a {
    color: #333;
    transition: color 0.2s ease;
}

.asi-front-page .widget.featured-content .entry-title a:hover {
    color: #004a83;
}

/* --------------------------------------------------------------------------
   8. ANIMACIONES DE ENTRADA (aparición al hacer scroll)
   -------------------------------------------------------------------------- */

/* Animación fade-in desde abajo */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplicar animación a las secciones principales */
.asi-front-page .widget.asitheme-widget {
    animation: fadeInUp 0.6s ease-out both;
}

/* Escalonar la aparición de widgets */
.asi-front-page .widget.asitheme-widget:nth-child(1) { animation-delay: 0s; }
.asi-front-page .widget.asitheme-widget:nth-child(2) { animation-delay: 0.1s; }
.asi-front-page .widget.asitheme-widget:nth-child(3) { animation-delay: 0.15s; }
.asi-front-page .widget.asitheme-widget:nth-child(4) { animation-delay: 0.2s; }

/* --------------------------------------------------------------------------
   9. MEJORAS AL FOOTER (solo en portada)
   -------------------------------------------------------------------------- */

.asi-front-page ~ .site-footer {
    background-color: #1C3149;
    color: rgba(255, 255, 255, 0.8);
}

.asi-front-page ~ .site-footer a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

.asi-front-page ~ .site-footer a:hover {
    color: #fff;
}

/* --------------------------------------------------------------------------
   10. MEJORA DE BOTONES GLOBALES EN PORTADA
   -------------------------------------------------------------------------- */

/* Todos los botones de la portada con estilo consistente */
.asi-front-page .button,
.asi-front-page button,
.asi-front-page input[type="submit"] {
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   11. SEPARADORES ENTRE SECCIONES
   -------------------------------------------------------------------------- */

/* Separador sutil entre secciones */
.asi-front-page .widget.asitheme-widget + .widget.asitheme-widget {
    border-top: none;
}

/* Alternar fondos claros y blancos para crear ritmo visual */
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos:nth-of-type(even) {
    background-color: #f8f9fa;
}

/* --------------------------------------------------------------------------
   12. MEJORA REDES SOCIALES
   -------------------------------------------------------------------------- */

/* Logos de redes sociales */
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo img[alt*="youtube"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo img[alt*="facebook"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo img[alt*="twitter"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo img[alt*="instagram"] {
    max-height: 4rem;
    filter: none;
    opacity: 0.7;
}

.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo:hover img[alt*="youtube"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo:hover img[alt*="facebook"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo:hover img[alt*="twitter"],
.asi-front-page .widget.asitheme-widget .asitheme-widget-logos .logo:hover img[alt*="instagram"] {
    opacity: 1;
    transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE FINAL
   -------------------------------------------------------------------------- */

@media only screen and (max-width: 544px) {
    .asi-front-page .widget.featured-content {
        padding: 4rem 2rem;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-logos {
        padding: 4rem 0;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-features {
        padding: 5rem 0;
    }

    .asi-front-page .widget.asitheme-widget .asitheme-widget-features h2 {
        font-size: 2.8rem;
    }

    /* Adaptación de tarjetas del blog en móviles */
    .asi-front-page .widget.featured-content .entry {
        padding: 2rem;
        row-gap: 1.5rem;
    }

    .asi-front-page .widget.featured-content .entry:has(.alignleft),
    .asi-front-page .widget.featured-content .entry:has(.entry-image-link) {
        grid-template-columns: 1fr;
        row-gap: 1.5rem;
    }

    .asi-front-page .widget.featured-content .entry .alignleft,
    .asi-front-page .widget.featured-content .entry .entry-image-link {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 160px;
    }

    .asi-front-page .widget.featured-content .entry:has(.alignleft) .entry-header,
    .asi-front-page .widget.featured-content .entry:has(.entry-image-link) .entry-header {
        grid-column: 1;
        grid-row: 2;
    }

    .asi-front-page .widget.featured-content .entry:has(.alignleft) .entry-content,
    .asi-front-page .widget.featured-content .entry:has(.entry-image-link) .entry-content {
        grid-column: 1;
        grid-row: 3;
    }
}
