/* ==========================================
   SECCIÓN DE REELS (Maquetación idéntica al diseño)
   ========================================== */

.instagram-reels-section {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.instagram-reels-container {
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* Encabezado */
.instagram-reels-header {
    margin-bottom: 35px;
    width: 100%;
}

.header-content-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 100%;
}

.header-text-block {
    flex: 1;
    max-width: 550px;
}

/* Subtítulo */
.instagram-reels-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0284c7;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

/* Título de 2 líneas */
.instagram-reels-title {
    font-size: 32px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

/* Fuente Manuscrita idéntica para "tu próximo hogar" */
.text-script-blue {
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #0284c7;
    display: inline-block;
    margin-top: -2px;
}

.instagram-reels-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.instagram-reels-desc strong {
    color: #334155;
}

/* Contenedor Flotante de los 4 Accesos con Divisores */
.header-badges-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 15px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.h-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 18px;
    border-right: 1px solid #f1f5f9; /* Línea divisora sutil */
    width: 100px;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.h-badge-item.border-none {
    border-right: none;
}

.h-badge-item:hover {
    transform: translateY(-2px);
}

.hb-icon {
    width: 38px;
    height: 38px;
    background: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.h-badge-item span {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    line-height: 1.25;
}

/* ==========================================
   GRILLA DE VIDEOS
   ========================================== */

.reels-grid {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.reel-card {
    flex: 1;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.reel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.reel-thumbnail {
    width: 100%;
    height: 340px;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.reel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: transform 0.3s ease;
}

.reel-card:hover .reel-thumbnail img {
    transform: scale(1.03);
}

.reel-top-badges {
    position: absolute;
    top: 12px; left: 12px; right: 12px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 3;
}

.ig-icon-badge {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}

.duration-badge {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 6px;
}

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    background: rgba(2, 132, 199, 0.9);
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
    transition: transform 0.2s ease;
}

.reel-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.reel-info {
    padding: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.reel-info h4 {
    font-size: 15px; font-weight: 700;
    color: #0f172a; margin: 0;
}

.reel-text-desc {
    font-size: 12px; color: #64748b; margin: 0; line-height: 1.4;
}

.reel-stats {
    display: flex; gap: 15px; margin-top: auto; padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.reel-stats span {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: #64748b;
}

.instagram-footer-link {
    text-align: center; margin-top: 35px; width: 100%;
}

.btn-ig-main {
    display: inline-flex; align-items: center; gap: 8px;
    background: #0284c7; color: #fff;
    padding: 12px 28px; border-radius: 30px;
    font-weight: 700; font-size: 14px; text-decoration: none;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
    transition: transform 0.2s ease;
}

.btn-ig-main:hover { transform: translateY(-2px); }

/* Modal */
.video-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999; padding: 15px; box-sizing: border-box;
}
.video-modal-content {
    position: relative; background: #fff; width: 100%; max-width: 360px;
    border-radius: 16px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.video-modal-close {
    position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6);
    color: #fff; border: none; font-size: 18px; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center;
}
.video-modal-body { width: 100%; height: 480px; background: #000; }
.video-modal-footer { padding: 15px; text-align: center; background: #fff; border-top: 1px solid #f1f5f9; }
.btn-cotizar-reel {
    display: block; background: #25d366; color: #fff; text-decoration: none;
    font-weight: 700; padding: 12px; border-radius: 8px; font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .header-content-flex { flex-direction: column; align-items: flex-start; }
    .header-badges-container { width: 100%; justify-content: space-around; }
}

@media (max-width: 768px) {
    .reels-grid {
        display: flex; flex-wrap: nowrap; overflow-x: auto;
        scroll-snap-type: x mandatory; gap: 15px; padding-bottom: 15px;
    }
    .reel-card { flex: 0 0 260px; scroll-snap-align: center; }
    .header-badges-container { display: none; }
}