/*
Enhanced 3DX Housing Solutions Theme - Premium Edition
Professional animations and interactive elements
*/

/* Import base styles */
@import url("style.css");

/* Premium Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes floatingElement {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Enhanced Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--steel-blue) 0%, var(--charcoal) 100%);
    animation: fadeInUp 1s ease-out;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="steel" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="%23ffffff" opacity="0.03"/><rect width="2" height="20" fill="%23ffffff" opacity="0.08"/><rect width="20" height="2" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23steel)"/></svg>');
    opacity: 0.4;
    animation: floatingElement 6s ease-in-out infinite;
}

.hero-content {
    animation: slideInLeft 1.2s ease-out 0.3s both;
}

.hero h1 {
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-tagline {
    animation: slideInRight 1s ease-out 0.7s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.cta-buttons {
    animation: fadeInUp 1s ease-out 1.1s both;
}

/* Animated CTA Buttons */
.cta-primary, .cta-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(183, 131, 90, 0.4);
}

.cta-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Enhanced Product Cards */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--copper-accent), var(--steel-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.product-image {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s;
}

.product-card:hover .product-image::after {
    left: 100%;
}

/* Floor Plan Modal Styles */
.floor-plan-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    animation: fadeInUp 0.3s ease-out;
}

.floor-plan-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.floor-plan-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.floor-plan-close:hover {
    color: var(--copper-accent);
}

.floor-plan-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.floor-plan-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.floor-plan-spec {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.spec-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--steel-blue);
}

.spec-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Interactive Technology Section */
.tech-item {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.tech-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(183, 131, 90, 0.1);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item:hover::before {
    opacity: 1;
}

.tech-item:hover {
    transform: translateY(-10px);
}

.tech-icon {
    transition: all 0.3s ease;
}

.tech-item:hover .tech-icon {
    animation: pulse 1s infinite;
}

/* Enhanced Contact Form */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--copper-accent), var(--steel-blue), var(--copper-accent));
    z-index: -1;
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form:hover::before {
    opacity: 1;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea,
.form-group select {
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: white;
    border-color: var(--copper-accent);
    box-shadow: 0 0 0 4px rgba(183, 131, 90, 0.1);
    transform: translateY(-2px);
}

.form-group label {
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label {
    color: var(--copper-accent);
    transform: translateX(5px);
}

/* Submit Button Animation */
.submit-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(183, 131, 90, 0.3);
}

/* Image Gallery Enhancements */
.model-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Parallax Background */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Premium Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--copper-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .floor-plan-content {
        padding: 20px;
        margin: 20px;
    }
    
    .gallery-overlay {
        transform: translateY(0);
        background: rgba(0,0,0,0.7);
    }
    
    .model-gallery {
        grid-template-columns: 1fr;
    }
}