/* Ensure main content area has dark background */
main,
.main-content {
    background: #0a0e27 !important;
    color: #fff !important;
}

/* Override any white backgrounds */
.bg-white {
    background: #0a0e27 !important;
}

/* Override common Tailwind/Bootstrap classes that might conflict */
.text-gray-900,
.text-gray-800,
.text-gray-700,
.text-gray-600,
.text-black {
    color: #fff !important;
}

.bg-gray-50,
.bg-gray-100,
.bg-slate-50,
.bg-blue-50 {
    background: transparent !important;
}

/* Ensure container backgrounds are transparent */
.container,
.max-w-7xl,
.mx-auto {
    background: transparent;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Content Sections - Ensure dark background */
section {
    background: transparent;
    color: #fff;
}

/* Hero Section */
.hero-section {
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: transparent;
    color: #fff;
}

.hero-content h2 {
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #00f5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: #8b9dc3;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #00f5ff 0%, #0099ff 100%);
    color: #0a0e27;
    padding: 15px 35px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 245, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: #00f5ff;
    padding: 15px 35px;
    border: 2px solid #00f5ff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
    height: 500px;
}

.bim-3d-model {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 245, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 245, 255, 0.2);
}

/* Three.js 3D Model Container */
.three-js-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #00f5ff;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 245, 255, 0.3);
    border-top: 3px solid #00f5ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-indicator p {
    color: #8b9dc3;
    font-size: 14px;
    margin: 0;
}

/* 3D Model Canvas Styling */
#three-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Navigation Section */
.navigation-section {
    max-width: 1400px;
    margin: 120px auto;
    padding: 0 40px;
}

.navigation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.nav-card {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

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

.nav-card:hover::before {
    left: 100%;
}

.nav-card:hover {
    transform: translateY(-10px);
    border-color: #00f5ff;
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.3);
    background: rgba(26, 31, 58, 0.9);
    text-decoration: none;
    color: inherit;
}

.nav-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
    color: #00f5ff;
}

.nav-card h3 {
    font-size: 20px;
    color: #00f5ff;
    margin-bottom: 15px;
    font-weight: 600;
}

.nav-card p {
    font-size: 14px;
    color: #8b9dc3;
    line-height: 1.6;
    margin: 0;
}

/* BIM Lifecycle Section */
.lifecycle-section {
    max-width: 1400px;
    margin: 120px auto;
    padding: 0 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #00f5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: #8b9dc3;
    font-size: 16px;
}

.lifecycle-timeline {
    position: relative;
    padding: 40px 0;
}

.timeline-phases {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

.phase-card {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.4s;
    cursor: pointer;
}

.phase-card:hover {
    transform: translateY(-10px);
    border-color: #00f5ff;
    box-shadow: 0 20px 40px rgba(0, 245, 255, 0.3);
    background: rgba(26, 31, 58, 0.9);
}

.phase-icon {
    font-size: 48px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.5));
    color: #00f5ff;
}

.phase-card h3 {
    font-size: 16px;
    color: #00f5ff;
    margin-bottom: 10px;
    font-weight: 600;
}

.phase-card p {
    font-size: 13px;
    color: #8b9dc3;
    line-height: 1.5;
}

/* AEC Coordination */
.aec-section {
    max-width: 1400px;
    margin: 120px auto;
    padding: 0 40px;
}

.aec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.aec-card {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(0, 153, 255, 0.05) 100%);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

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

.aec-card:hover::before {
    left: 100%;
}

.aec-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 25px 50px rgba(0, 245, 255, 0.2);
}

.aec-card h3 {
    color: #00f5ff;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.aec-card ul {
    list-style: none;
    padding: 0;
}

.aec-card li {
    color: #8b9dc3;
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
}

.aec-card li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #00f5ff;
    font-weight: bold;
}

/* Submission Form */
.submission-section {
    max-width: 1400px;
    margin: 120px auto;
    padding: 0 40px;
}

.form-container {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 60px;
    margin-top: 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    color: #00f5ff;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00f5ff;
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.file-upload-zone {
    border: 2px dashed rgba(0, 245, 255, 0.3);
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    background: rgba(10, 14, 39, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    margin: 30px 0;
}

.file-upload-zone:hover {
    border-color: #00f5ff;
    background: rgba(0, 245, 255, 0.05);
}

.file-icon {
    color: #00f5ff;
    margin-bottom: 20px;
}

.upload-text {
    color: #8b9dc3;
    font-size: 16px;
    margin-bottom: 10px;
}

.upload-formats {
    color: #5a6a85;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 40px;
}

/* Learn More Section */
.learn-more-section {
    max-width: 1400px;
    margin: 120px auto;
    padding: 0 40px;
}

.learn-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.learn-more-card {
    background: rgba(26, 31, 58, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.learn-more-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.learn-more-card:hover::before {
    left: 100%;
}

.learn-more-card:hover {
    transform: translateY(-15px);
    border-color: rgba(0, 245, 255, 0.6);
    box-shadow: 0 25px 50px rgba(0, 245, 255, 0.3);
}

.learn-more-card .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(0, 153, 255, 0.2));
    border-radius: 50%;
    margin-bottom: 25px;
    color: #00f5ff;
    transition: all 0.3s ease;
}

.learn-more-card:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(0, 153, 255, 0.3));
}

.learn-more-card h3 {
    color: #00f5ff;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.learn-more-card p {
    color: #8b9dc3;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1rem;
}

.learn-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00f5ff, #0099ff);
    color: #0a0e27;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.learn-more-btn::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 ease;
}

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

.learn-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 245, 255, 0.4);
}

.learn-more-btn svg {
    transition: transform 0.3s ease;
}

.learn-more-btn:hover svg {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 60px auto;
        padding: 0 30px;
    }

    .timeline-phases {
        grid-template-columns: repeat(3, 1fr);
    }

    .navigation-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .aec-grid {
        grid-template-columns: 1fr;
    }

    .learn-more-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet-specific layout for AEC section */
@media (max-width: 1024px) and (min-width: 769px) {
    .aec-section {
        max-width: 1200px;
        margin: 100px auto;
        padding: 0 30px;
    }

    .aec-grid {
        display: block;
        margin-top: 60px;
    }

    .aec-card {
        display: flex;
        flex-direction: column;
        margin-bottom: 60px;
        padding: 40px;
    }

    .aec-card:last-child {
        margin-bottom: 0;
    }

    .aec-card h3 {
        text-align: center;
        margin-bottom: 30px;
        font-size: 28px;
    }

    .aec-card-content {
        display: grid;
        grid-template-columns: 1fr 200px;
        gap: 40px;
        align-items: center;
    }

    .aec-card-content ul {
        margin: 0;
    }

    .aec-card-content .aec-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 80px;
        color: #00f5ff;
        filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.5));
    }

    .aec-card .aec-icon svg {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    /* Hero section mobile fixes */
    .hero-section {
        margin: 40px auto;
        padding: 0 20px;
        gap: 30px;
    }

    .hero-content h2 {
        font-size: 32px;
        line-height: 1.1;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 25px;
        font-size: 14px;
        text-align: center;
        width: 100%;
    }

    /* Hero visual mobile adjustments */
    .hero-visual {
        height: 300px;
        order: 1; /* Move visual below content on mobile */
    }

    .bim-3d-model svg {
        width: 300px;
        height: 300px;
    }

    .timeline-phases {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .phase-card {
        padding: 20px 15px;
    }

    .phase-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .phase-card h3 {
        font-size: 14px;
    }

    .phase-card p {
        font-size: 12px;
    }

    .navigation-section {
        margin: 80px auto;
        padding: 0 20px;
    }

    .navigation-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 40px;
    }

    .nav-card {
        padding: 30px 20px;
    }

    .nav-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .nav-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .nav-card p {
        font-size: 13px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 40px 20px;
    }

    .file-upload-zone {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    .hero-section {
        margin: 30px auto;
        padding: 0 15px;
        gap: 25px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero-visual {
        height: 250px;
    }

    .bim-3d-model svg {
        width: 250px;
        height: 250px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }

    .timeline-phases {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .lifecycle-section,
    .navigation-section,
    .aec-section,
    .submission-section,
    .learn-more-section {
        margin: 80px auto;
        padding: 0 15px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .learn-more-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .learn-more-card {
        padding: 30px 20px;
    }
}
