/**
 * CTR Bienes Raíces - Estilos Home
 * Página principal con hero, carrusel de proyectos y secciones destacadas
 */

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
    padding-bottom: 8rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-background video,
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hero-youtube-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 177.78vh; /* Mantener relación 16:9 basada en altura */
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw; /* Si el ancho es menor, ajustar altura */
}

@media (min-aspect-ratio: 16/9) {
    #hero-youtube-player {
        width: 100vw;
        height: 56.25vw;
        min-width: 100%;
        min-height: 100%;
    }
}

#hero-youtube-player iframe {
    width: 100% !important;
    height: 100% !important;
}

.hero-fallback-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 61, 255, 0.15) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    padding: 0 2rem;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-content .subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CARRUSEL PROYECTOS ===== */
.proyectos-carousel {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-gray-lighter) 100%);
    position: relative;
}

.proyectos-carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.proyectos-carousel-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.proyectos-carousel-header h2 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-sm);
}

.proyectos-carousel-header p {
    font-size: 1.1rem;
    color: var(--color-gray-medium);
    max-width: 600px;
    margin: 0 auto;
}

.proyectos-slider {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.proyectos-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.proyecto-card {
    flex: 0 0 calc(33.333% - 1.5rem);
    min-width: 350px;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.proyecto-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.proyecto-card-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.proyecto-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.proyecto-card-image iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    pointer-events: none;
}

.proyecto-card:hover .proyecto-card-image img {
    transform: scale(1.1);
}

.proyecto-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proyecto-card-content {
    padding: 1.5rem;
}

.proyecto-card-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
}

.proyecto-card-location {
    color: var(--color-gray-medium);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proyecto-card-price {
    font-family: var(--font-title);
    font-size: 1.75rem;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.proyecto-card-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-gray-medium);
}

.proyectos-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.proyectos-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-white);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.proyectos-nav-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.proyectos-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== SECCIÓN CRISTIAN TABORDA ===== */
.about-section {
    padding: var(--spacing-xl) 2rem;
    background-color: var(--color-white);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.forbes-highlight {
    margin-bottom: 1.5rem;
}

.forbes-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.forbes-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.5);
}

.forbes-link svg:first-child {
    width: 24px;
    height: 24px;
}

.forbes-link svg:last-child {
    width: 18px;
    height: 18px;
    margin-left: auto;
}

.about-content h2 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-md);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-gray-medium);
    margin-bottom: var(--spacing-sm);
}

.about-signature {
    margin-top: var(--spacing-md);
    font-family: var(--font-title);
    font-weight: 600;
    color: var(--color-primary);
}

/* ===== SECCIÓN VIDEOS ===== */
.videos-section {
    padding: var(--spacing-xl) 2rem;
    background: linear-gradient(180deg, var(--color-gray-lighter) 0%, var(--color-white) 100%);
}

.videos-container {
    max-width: 1400px;
    margin: 0 auto;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-lg);
}

.video-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--color-gray-dark);
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.video-card:hover {
    transform: scale(1.05);
}

.video-card-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
}

.video-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(0, 61, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 2rem;
    transition: all var(--transition-fast);
}

.video-card:hover .video-card-play {
    background-color: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card-title {
    padding: 1rem;
    color: var(--color-white);
    font-family: var(--font-title);
    font-size: 1.1rem;
}

/* ===== RESPONSIVE ===== */
/* Mobile First - Breakpoints: 390px, 430px, 768px, 1024px */

/* Móvil crítico: 390px - 429px */
@media (max-width: 429px) {
    .hero {
        height: 70vh;
        min-height: 400px;
        margin-top: 60px;
        padding-bottom: 4rem;
    }
    
    #hero-youtube-player {
        min-width: 100%;
        min-height: 100%;
    }
    
    .hero-content {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-content .subtitle {
        font-size: clamp(0.95rem, 3vw, 1.1rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        min-height: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .proyectos-carousel {
        padding: 3rem 0;
    }
    
    .proyectos-carousel-container {
        padding: 0 1rem;
    }
    
    .proyectos-carousel-header {
        margin-bottom: 2rem;
    }
    
    .proyectos-carousel-header h2 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        margin-bottom: 0.75rem;
    }
    
    .proyectos-carousel-header p {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    
    .proyecto-card {
        flex: 0 0 100%;
        min-width: 100%;
        margin: 0;
    }
    
    .proyecto-card-image {
        height: 220px;
    }
    
    .proyecto-card-content {
        padding: 1.25rem;
    }
    
    .proyecto-card-title {
        font-size: 1.25rem;
    }
    
    .proyecto-card-price {
        font-size: 1.5rem;
    }
    
    .about-section {
        padding: 3rem 1rem;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        max-height: 400px;
        width: 100%;
    }
    
    .about-content h2 {
        font-size: clamp(1.75rem, 4vw, 2.25rem);
    }
    
    .about-content p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .forbes-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }
    
    .videos-section {
        padding: 3rem 1rem;
    }
    
    .videos-container {
        padding: 0;
    }
    
    .section-title h2 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .section-title p {
        font-size: 0.95rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .video-card-play {
        width: 60px;
        height: 60px;
    }
    
    .video-card-title {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .proceso-ctr-section {
        padding: 3rem 1rem;
    }
    
    .proceso-modulo {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.25rem;
        align-items: center;
        text-align: center;
    }
    
    .proceso-modulo-number {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .proceso-modulo-title {
        font-size: 1.5rem;
    }
    
    .proceso-modulo-description {
        font-size: 1rem;
    }
    
    .proceso-modulo-cta {
        padding: 0.875rem 1rem;
    }
    
    .proceso-modulo-cta span {
        font-size: 0.9rem;
    }
    
    .proceso-wompi-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
}

/* Móvil grande: 430px - 767px */
@media (min-width: 430px) and (max-width: 767px) {
    .hero {
        height: 75vh;
        min-height: 450px;
        margin-top: 70px;
        padding-bottom: 5rem;
    }
    
    .hero-content {
        padding: 0 1.5rem;
    }
    
    .hero-cta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-cta .btn {
        min-width: 200px;
        min-height: 44px;
    }
    
    .proyectos-carousel-container {
        padding: 0 1.5rem;
    }
    
    .proyecto-card {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .about-section {
        padding: 4rem 1.5rem;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .about-image {
        max-height: 450px;
    }
    
    .videos-section {
        padding: 4rem 1.5rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .proceso-ctr-section {
        padding: 4rem 1.5rem;
    }
    
    .proceso-modulo {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .proceso-modulo-number {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .proceso-wompi-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 44px;
    }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero {
        height: 85vh;
        min-height: 550px;
        padding-bottom: 6rem;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
    
    .proyecto-card {
        flex: 0 0 calc(50% - 1rem);
        min-width: 300px;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        max-height: 500px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .proceso-modulo {
        padding: 2.5rem 2rem;
    }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
    .proyecto-card {
        flex: 0 0 calc(33.333% - 1.5rem);
        min-width: 350px;
    }
    
    .about-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== SECCIÓN PROCESO CTR - 3 MÓDULOS ===== */
.proceso-ctr-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #f8f9fa 0%, var(--color-white) 100%);
    position: relative;
}

.proceso-ctr-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.proceso-modulo {
    background: var(--color-white);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: flex-start;
}

.proceso-modulo:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 50px rgba(0, 61, 255, 0.15);
}

.proceso-modulo-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(0, 61, 255, 0.3);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.proceso-modulo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.proceso-modulo-title {
    font-family: var(--font-title);
    font-size: 1.75rem;
    color: var(--color-gray-dark);
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
}

.proceso-modulo-description {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--color-gray-medium);
    line-height: 1.7;
    margin: 0;
}

.proceso-modulo-cta {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 61, 255, 0.05) 0%, rgba(0, 41, 179, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--color-primary);
    margin-top: auto;
}

.proceso-modulo-cta svg {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.proceso-modulo-cta span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-gray-dark);
    font-weight: 500;
    line-height: 1.5;
}

/* Flecha decorativa entre módulos (vertical) */
.proceso-modulo:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 40px;
    width: 0;
    height: 0;
    border-top: 24px solid var(--color-primary);
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    opacity: 0.4;
    z-index: 1;
    transform: translateX(-50%);
}

.proceso-cta-final {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
}

.proceso-wompi-btn {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 8px 24px rgba(0, 61, 255, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.proceso-wompi-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 61, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .proceso-modulo {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        align-items: center;
        text-align: center;
    }
    
    .proceso-modulo-number {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .proceso-modulo:not(:last-child)::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .proceso-modulo-content {
        text-align: center;
    }
    
    .proceso-wompi-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .proceso-ctr-section {
        padding: 4rem 1.5rem;
    }
    
    .proceso-modulo {
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
    
    .proceso-modulo-number {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .proceso-modulo-title {
        font-size: 1.5rem;
    }
    
    .proceso-modulo-description {
        font-size: 1rem;
    }
}

/* ===== MODO OSCURO ===== */
[data-theme="dark"] .proyectos-carousel {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .proyectos-carousel-header h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .proyectos-carousel-header p {
    color: var(--text-secondary);
}

[data-theme="dark"] .proyecto-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 61, 255, 0.2);
}

[data-theme="dark"] .proyecto-card-title {
    color: var(--text-primary);
}

[data-theme="dark"] .proyecto-card-location {
    color: var(--text-secondary);
}

[data-theme="dark"] .proyecto-card-price span {
    color: var(--text-secondary);
}

[data-theme="dark"] .proyectos-nav-btn {
    background-color: var(--bg-secondary);
    border-color: var(--color-primary);
}

[data-theme="dark"] .about-section {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .about-content h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .about-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .videos-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .proceso-ctr-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

[data-theme="dark"] .proceso-modulo {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 61, 255, 0.2);
}

[data-theme="dark"] .proceso-modulo-title {
    color: var(--text-primary);
}

[data-theme="dark"] .proceso-modulo-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .proceso-modulo-cta {
    background: linear-gradient(135deg, rgba(0, 61, 255, 0.15) 0%, rgba(0, 42, 127, 0.15) 100%);
}

[data-theme="dark"] .proceso-modulo-cta span {
    color: var(--text-primary);
}
