/* Media Grid Layout */
.media-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

/* 1. Top Video Section */
.video-container {
    width: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 200px;
}

@media (min-width: 769px) {
    .media-grid {
        display: flex;
        flex-direction: row;
        gap: 10px;
        height: 510px; /* 250px * 2 + 10px gap */
    }

    .video-container {
        flex: 1.2;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .video-container video {
        height: 100% !important;
        max-height: 100% !important;
        object-fit: cover;
    }

    .media-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
        height: 100% !important;
    }

    .media-col {
        flex: 1;
        height: calc(50% - 5px) !important;
    }
}

/* Overlay Generic */
.video-overlay,
.trigger-overlay {
    position: absolute;
    bottom: 20px;
    pointer-events: none;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-overlay h2 {
    color: #fff;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.btn-fullscreen-video {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s;
}

.btn-fullscreen-video:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 2. Media Row (Split) */
.media-row {
    display: flex;
    gap: 10px;
    height: 250px;
}

.media-col {
    flex: 1;
    position: relative;
    background: var(--bg-surface);
    border-radius: 10px;
    overflow: hidden;
}

/* Left: 360 Trigger */
.media-360-trigger {
    cursor: pointer;
}

.pannellum-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s;
}

.media-360-trigger:hover .pannellum-thumbnail {
    transform: scale(1.05);
}

.trigger-overlay {
    bottom: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s;
    justify-content: center;
}

.media-360-trigger:hover .trigger-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.4);
}

.icon-circle i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.icon-circle span {
    font-size: 0.7rem;
    font-weight: bold;
}

.trigger-overlay p {
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin: 0;
    text-align: center;
}

/* Right: Mini Gallery */
.mini-gallery-container {
    position: relative;
}

.mini-gallery-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.mini-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.mini-slide.active {
    opacity: 1;
    z-index: 1;
}

.mini-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mini Controls */
.mini-prev,
.mini-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.mini-gallery-container:hover .mini-prev,
.mini-gallery-container:hover .mini-next {
    opacity: 1;
}

.mini-prev {
    left: 10px;
}

.mini-next {
    right: 10px;
}

.mini-dots {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background 0.3s;
}

.dot.active {
    background: #fff;
}

/* FULLSCREEN MODALS */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 300000;
    display: none;
    flex-direction: column;
    background: #00000085;
}

.fullscreen-modal.active {
    display: flex;
}

.close-fs {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 300002;
    text-shadow: 0 0 10px #000;
}

/* Pannellum Scene Hotspot Custom Style */
.pnlm-hotspot.scene-hotspot {
    background-color: transparent !important;
    width: 10px !important;
    height: 10px !important;
    border: none !important;
    box-shadow: none;
    display: block;
    cursor: pointer;
    animation: none;
}

.pnlm-hotspot.scene-hotspot:hover {
    z-index: 1000 !important;
}

.pnlm-hotspot.scene-hotspot::after {
    content: none;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

/* Pannellum Size */
#pannellumViewer {
    width: 100%;
    height: 100%;
}

/* FS Video */
.fs-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-video-container video {
    max-width: 100%;
    max-height: 100%;
    height: 100vh;
}

/* FS Gallery */
.gallery-mode {
    background: rgba(0, 0, 0, 0.95);
}

.fs-gallery-track {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-slide {
    display: none;
    max-width: 90%;
    max-height: 90vh;
}

.fs-slide.active {
    display: block;
    animation: fadeIn 0.3s;
}

.fs-slide img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.fs-prev,
.fs-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 300001;
    transition: transform 0.2s;
}

.fs-prev:hover,
.fs-next:hover {
    transform: translateY(-50%) scale(1.2);
    color: var(--primary-color);
}

.fs-prev {
    left: 20px;
}

.fs-next {
    right: 20px;
}

/* Property Header Redesign - GLOBAL STYLES */
.property-header-redesign {
    font-family: 'Montserrat', sans-serif;
}

.prop-subtitle {
    font-size: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.prop-main-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 1rem;
    /* text-shadow para legibilidad sobre cualquier fondo */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.prop-location-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.prop-location-row i {
    color: var(--primary-color);
}

/* Red Stats Card — Premium redesign */
.red-stats-card {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 50%, #0d0d0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    color: white;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255,255,255,0.04) inset;
    gap: 0;
    flex-wrap: nowrap;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Subtle animated glow background */
.red-stats-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(251, 146, 60, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.red-stats-card .stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.8rem 2rem;
    position: relative;
    transition: background 0.3s ease;
}

.red-stats-card .stat-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Vertical divider between items */
.red-stats-card .stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
}

.red-stats-card .stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.red-stats-card .stat-value {
    font-size: 1rem;
    font-weight: 400;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ÁREA — accent verde-lima */
.red-stats-card .stat-item:nth-child(1) .stat-value b {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: #a3e635;
    text-shadow:
        0 0 20px rgba(163, 230, 53, 0.6),
        0 0 40px rgba(163, 230, 53, 0.3);
    letter-spacing: -1px;
}

.red-stats-card .stat-item:nth-child(1) .stat-currency {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(163, 230, 53, 0.8);
}

/* PRECIO — accent naranja dorado */
.red-stats-card .stat-item:nth-child(2) .stat-value b {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: #fb923c;
    text-shadow:
        0 0 20px rgba(251, 146, 60, 0.7),
        0 0 40px rgba(251, 146, 60, 0.4);
    letter-spacing: -1px;
}

.red-stats-card .stat-item:nth-child(2) .stat-currency {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.6);
}

.red-stats-card .stat-value b {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.red-stats-card .stat-value small {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    align-self: flex-end;
    padding-bottom: 4px;
}



/* Responsive */
@media (max-width: 768px) {
    .video-overlay h2 {
        font-size: 1rem;
    }

    .property-header-redesign {
        margin-top: 20px;
        position: relative;
        z-index: 5;
    }

    .media-row {
        flex-direction: row;
        height: 180px;
        gap: 5px;
    }

    .media-col {
        height: 100%;
        width: 50%;
        flex: 1;
    }

    .icon-circle {
        width: 40px;
        height: 40px;
    }

    .icon-circle i {
        font-size: 1rem;
    }

    .icon-circle span {
        font-size: 0.6rem;
    }

    .trigger-overlay p {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .prop-main-title {
        font-size: 1.5rem;
    }

    .red-stats-card {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
        padding: 0;
        border-radius: 12px;
    }

    .red-stats-card .stat-item {
        flex: 1;
        padding: 1.2rem 0.8rem;
    }

    .red-stats-card .stat-item + .stat-item::before {
        top: 15%;
        height: 70%;
    }

    .red-stats-card .stat-label {
        font-size: 0.6rem;
        margin-bottom: 8px;
        letter-spacing: 1.5px;
    }

    .red-stats-card .stat-value {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        align-items: baseline;
    }

    .red-stats-card .stat-item:nth-child(1) .stat-value b,
    .red-stats-card .stat-item:nth-child(2) .stat-value b {
        font-size: 1.8rem;
        letter-spacing: -0.5px;
    }

    .red-stats-card .stat-value b {
        font-size: 1.8rem;
    }

    .red-stats-card .stat-item:nth-child(1) .stat-currency,
    .red-stats-card .stat-item:nth-child(2) .stat-currency {
        font-size: 0.9rem;
    }

    .red-stats-card .stat-value small {
        font-size: 0.75rem;
        width: 100%;
        text-align: center;
        padding-bottom: 0;
    }
}