/* Custom Styles for AG Construcciones Landing Page */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Mobile Menu Hamburger Button Styles - Perfectly Round */
.th-menu-toggle {
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.th-menu-toggle:hover {
    transform: scale(1.05);
}

.th-menu-wrapper .th-menu-toggle {
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.th-menu-wrapper .th-menu-toggle:hover {
    transform: scale(1.05);
}

/* Fix para filtrado de tipologías */
.filter-item {
    margin-bottom: 30px;
}

/* Text shadow blanco para los textos de los slides */
.hero-style2 .hero-title {
    text-shadow: 
        2px 2px 4px rgba(255, 255, 255, 0.9),
        -2px -2px 4px rgba(255, 255, 255, 0.9),
        2px -2px 4px rgba(255, 255, 255, 0.9),
        -2px 2px 4px rgba(255, 255, 255, 0.9),
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 16px rgba(255, 255, 255, 0.6);
}

.hero-style2 .hero-text {
    text-shadow: 
        2px 2px 4px rgba(255, 255, 255, 0.9),
        -2px -2px 4px rgba(255, 255, 255, 0.9),
        2px -2px 4px rgba(255, 255, 255, 0.9),
        -2px 2px 4px rgba(255, 255, 255, 0.9),
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 16px rgba(255, 255, 255, 0.6);
}

/* Fix para evitar que las imágenes del hero se encimen */
#hero-thumb .swiper-slide {
    opacity: 0 !important;
    pointer-events: none;
}

#hero-thumb .swiper-slide-active {
    opacity: 1 !important;
    pointer-events: auto;
}

#hero-thumb .th-hero-img {
    visibility: hidden;
}

#hero-thumb .swiper-slide-active .th-hero-img {
    visibility: visible;
}

/* Video Section Aesthetic Styles */
.video-section-aesthetic {
    position: relative;
    background-color: #6C6D71;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
}

.single-video-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-video-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.thumbnail-placeholder {
    width: 100%;
    height: 450px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.single-thumb {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
}

.thumb-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.construction-icon {
    font-size: 80px;
    margin-bottom: 25px;
    opacity: 0.9;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.thumb-content h3 {
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 28px;
}

.thumb-content p {
    opacity: 0.9;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.thumbnail-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(255,255,255,0.1) 0%, transparent 60%);
    z-index: 1;
}

.video-thumbnail:hover .thumbnail-placeholder {
    transform: scale(1.02);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.play-btn-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #34495E, #2C3E50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.play-btn-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.play-btn-circle i {
    color: white;
    font-size: 32px;
    margin-left: 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    padding: 30px;
    text-align: center;
}

.video-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.video-info h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.video-info p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.duration {
    background: linear-gradient(45deg, #34495E, #2C3E50);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.video-cta {
    background: rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Popup Styles */
.popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: rgba(255, 255, 255, 1);
    border-radius: 15px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    animation: popup-appear 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes popup-appear {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

.popup-image {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    overflow: hidden;
}

.popup-image img {
    width: 100%;
    height: auto;
    display: block;
}

.popup-text {
    padding: 25px 35px 35px 35px;
}

.popup-text h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #000;
    font-weight: 700;
}

.popup-text .th-btn {
    background-color: #dc3545;
    color: #fff;
    font-weight: 600;
    padding: 12px 30px;
}

.popup-text .th-btn:hover {
    background-color: #c82333;
}

/* Estilos para los botones de tipología */
.project-btn {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.project-btn .th-btn {
    flex: 1;
    min-width: 180px;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 100px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-bob 2s ease-in-out infinite;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    color: #fff;
    transform: scale(1.1);
    transition: all 0.3s;
    animation: none; /* Stop bobbing on hover */
}

@keyframes float-bob {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) translateY(-50%) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translateX(-50%) translateY(-50%) scale(2);
        opacity: 0;
    }
}

/* Floor Plan Popup Styles */
.floorplan-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.floorplan-popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.floorplan-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    z-index: 10000;
    background: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.floorplan-popup-close:hover {
    background: #f0f0f0;
    color: #000;
    transform: scale(1.1);
}

.floorplan-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    display: block;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .video-section-aesthetic {
        padding: 60px 0;
        min-height: auto;
    }
    
    .thumbnail-placeholder {
        height: 300px;
    }
    
    .play-btn-circle {
        width: 80px;
        height: 80px;
    }
    
    .play-btn-circle i {
        font-size: 24px;
    }
    
    .construction-icon {
        font-size: 60px;
    }
    
    .thumb-content h3 {
        font-size: 22px;
    }
    
    .video-info h3 {
        font-size: 22px;
    }
    
    .video-info p {
        font-size: 16px;
    }
    
    .video-cta {
        padding: 30px 20px;
    }
    
    .project-btn {
        flex-direction: column;
        gap: 15px;
    }
    
    .project-btn .th-btn {
        width: 100%;
        min-width: 100%;
    }
    
    .floorplan-popup-wrapper {
        padding: 15px;
    }
    
    .floorplan-popup-content {
        max-width: 95vw;
        max-height: 85vh;
        padding: 20px;
    }
    
    .floorplan-image {
        max-height: 60vh;
    }
    
    .floorplan-popup-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .floorplan-popup-content {
        padding: 15px;
    }
    
    .floorplan-image {
        max-height: 55vh;
    }
}