/* ==========================================================================
   Premium Blog Carousel — Full Redesign
   Cache-Busted & High Specificity
   ========================================================================== */

/* === SWIPER CONTAINER & ARROWS === */
.section-blog-carousel .position-relative {
    /* For positioning the arrows outside */
    padding-left: 55px;
    padding-right: 55px;
}

.blog-swiper-prev,
.blog-swiper-next {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 2px solid #f36c21 !important;
    background: #ffffff !important;
    color: #f36c21 !important;
    font-size: 1.1rem;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    outline: none;
    z-index: 100;
    flex-shrink: 0 !important; /* Evita que el contenedor aplaste el círculo */
    line-height: 1 !important;
}

.blog-swiper-prev { left: 0; }
.blog-swiper-next { right: 0; }

.blog-swiper-prev:hover,
.blog-swiper-next:hover {
    background: #f36c21 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(243, 108, 33, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.blog-swiper-prev.swiper-button-disabled,
.blog-swiper-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
    transform: translateY(-50%) none;
    box-shadow: none;
}

/* === CARD SHELL === */
.card-blog-premium {
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Fill slide height */
    border: none !important;
    margin: 5px; /* Prevent shadow clipping */
}

.card-blog-premium:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 40px rgba(243, 108, 33, 0.18) !important;
}

/* === IMAGE WRAP: STRICT FIXED HEIGHT === */
.card-blog-img-wrap {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 220px !important; /* Unified perfect height */
    overflow: hidden !important;
    background: #ffe0cc !important;
    flex-shrink: 0 !important; 
}

/* Force ALL WordPress images inside to adopt this strict constraint */
.card-blog-img-wrap img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* This creates the perfect scaling magic */
    object-position: center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.6s ease !important;
}

.card-blog-premium:hover .card-blog-img-wrap img {
    transform: scale(1.08) !important;
}

/* PLACEHOLDER for missing images */
.card-blog-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f36c21 0%, #ff9a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-blog-placeholder span {
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 6px;
    font-family: 'Poppins', sans-serif;
}

/* === CARD BODY & TYPOGRAPHY === */
.card-blog-body {
    padding: 22px 24px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    justify-content: space-between !important;
    gap: 15px !important;
}

.card-blog-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    color: #222 !important;
    /* Limit exactly to 3 lines */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    line-clamp: 3 !important;
    overflow: hidden !important; 
}

.card-blog-title a {
    color: #222 !important;
    text-decoration: none !important;
    transition: color 0.25s ease !important;
}

.card-blog-title a:hover {
    color: #f36c21 !important;
}

/* === READ MORE BUTTON (Rounded) === */
.card-blog-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #f36c21 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    border: 2px solid #f36c21 !important;
    border-radius: 50px !important; /* Perfect Pill Shape */
    padding: 7px 20px !important;
    align-self: flex-start !important;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.card-blog-btn:hover {
    background: #f36c21 !important;
    color: #ffffff !important;
    transform: translateX(5px) !important;
    text-decoration: none !important;
}

/* === CORPORATE COLORED PAGINATION DOTS === */
.blog-swiper-pagination {
    text-align: center;
    margin-top: 15px;
}

.blog-swiper-pagination .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: #d4d4d4 !important;
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    margin: 0 6px !important;
}

/* Hover effect */
.blog-swiper-pagination .swiper-pagination-bullet:hover {
    transform: scale(1.3) !important;
    opacity: 1 !important;
}

/* Active Dots - Using FCHD Corporate Palette! */
/* 1st Dot: Orange */
.blog-swiper-pagination .swiper-pagination-bullet:nth-child(4n+1).swiper-pagination-bullet-active {
    background: #f36c21 !important;
    transform: scale(1.6) !important;
    box-shadow: 0 0 10px rgba(243, 108, 33, 0.4) !important;
}
/* 2nd Dot: Blue */
.blog-swiper-pagination .swiper-pagination-bullet:nth-child(4n+2).swiper-pagination-bullet-active {
    background: #008ecc !important;
    transform: scale(1.6) !important;
    box-shadow: 0 0 10px rgba(0, 142, 204, 0.4) !important;
}
/* 3rd Dot: Green */
.blog-swiper-pagination .swiper-pagination-bullet:nth-child(4n+3).swiper-pagination-bullet-active {
    background: #8cc63f !important;
    transform: scale(1.6) !important;
    box-shadow: 0 0 10px rgba(140, 198, 63, 0.4) !important;
}
/* 4th Dot: Dark Blue */
.blog-swiper-pagination .swiper-pagination-bullet:nth-child(4n+4).swiper-pagination-bullet-active {
    background: #13325c !important;
    transform: scale(1.6) !important;
    box-shadow: 0 0 10px rgba(19, 50, 92, 0.4) !important;
}

@media (max-width: 767px) {
    .section-blog-carousel .position-relative {
        padding-left: 0;
        padding-right: 0;
    }
    .blog-swiper-prev,
    .blog-swiper-next {
        display: none !important;
    }
}

/* ==========================================================================
   Premium Institutional Achievements (Logros)
   ========================================================================== */

.logros-premium-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.logro-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid transparent; 
}

.logro-item:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-left-color: #f36c21;
}

.logro-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

/* FCHD Palette */
.color-orange { background: #f36c21; box-shadow: 0 4px 10px rgba(243, 108, 33, 0.3); }
.color-blue { background: #008ecc; box-shadow: 0 4px 10px rgba(0, 142, 204, 0.3); }
.color-green { background: #8cc63f; box-shadow: 0 4px 10px rgba(140, 198, 63, 0.3); }
.color-darkblue { background: #13325c; box-shadow: 0 4px 10px rgba(19, 50, 92, 0.3); }

.logro-content {
    flex: 1;
}

.logro-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logro-text {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.45;
}

.logro-highlight {
    font-weight: 700;
    color: #f36c21;
    background: rgba(243, 108, 33, 0.08);
    padding: 2px 6px;
    border-radius: 5px;
}

/* Dashboard Badges for Servicios */
.logro-dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-stat.win { background: #e6f7eb; color: #1e7e34; border: 1px solid #c3e6cb; }
.badge-stat.growth { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.badge-stat.info { background: #cce5ff; color: #004085; border: 1px solid #b8daff; }
.badge-stat.warn { background: #f8dbdf; color: #dc3545; border: 1px solid #f5c6cb; }

/* Accordion Specific CSS */
.logro-item[data-toggle="collapse"] {
    cursor: pointer;
}

.logro-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logro-chevron {
    color: #f36c21;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

/* Rotate chevron when expanded (aria-expanded="true") */
.logro-item[aria-expanded="true"] .logro-chevron {
    transform: rotate(180deg);
}

/* Ensure the title has bottom margin globally except when in flex */
.logro-header-flex .logro-title {
    margin-bottom: 0 !important;
}
