/* ========================================
   Homepage
   ======================================== */

.homepage {
    width: 100%;
}

/* ========================================
   Hero
   ======================================== */

.hero {
    display: flex;
    align-items: flex-start;

    min-height: 500px;

    max-width: 1100px;
    margin: 0 auto;

    padding: 60px 30px;
    gap:40px;
}

/* .hero-content {
    max-width: 750px;
} */

/* When add a visual, alter this here :) */

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-visual {
    position: relative;
    flex: 1;
    /* min-height: 350px; */
    margin-top: 20px;
}

/* Delay loading message initially (see GLB Viewer.js) */
.viewer-loading {
    position: absolute;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: #f8fafc;
    color: #64748b;

    font-size: 1rem;
    font-weight: 500;

    z-index: 10;
}

#homepage-canvas1 {
    display: block;
    width: 100%;
    /* Changed from 100% to give direct height */
    height: 350px;
    /* Round corners */
    border-radius: 16px; 
    overflow: hidden;
}

/* The hint to drag to rotate on the homepage, disappears (see scenesetup.js) */
.interaction-hint {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);

    padding: 6px 12px;
    border-radius: 20px;

    font-size: 1.0rem;
    white-space: nowrap;

    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);

    opacity: 0.80;
    transition: opacity 5s ease;
    
    pointer-events: none;
}

.interaction-hint.hidden {
    opacity: 0;
}


.hero h1 {
    font-size: 3.5rem;
    margin: 0 0 10px 0;

    color: #002554;
}

.hero h2 {
    font-size: 2rem;
    font-weight: normal;

    margin: 0 0 20px 0;
}

.hero p {
    max-width: 700px;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}


/* ========================================
   Buttons
   ======================================== */

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.homepage-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: #01a2e0;
    color: white;
    border: 2px solid #01a2e0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.homepage-button:hover {
    background-color: #002554;
    border-color: #002554;
    text-decoration: none;
}

.secondary-button {
    background-color: white;
    color: #002554;
    border-color: #002554;
}

.secondary-button:hover {
    background-color: #002554;
    color: white;
}


/* ========================================
   General Sections
   ======================================== */

.home-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 30px;
}

.home-section h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #002554;
}

.section-intro {
    max-width: 800px;
    margin-top: 0;
    margin-bottom: 35px;
    color: #666;
    line-height: 1.6;
    font-size: 1.05rem;
}


/* ========================================
   Services Preview
   ======================================== */
.services-preview {
    background-color: #f2f2f2;
}

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

.service-preview-card {
    padding: 25px;
    background-color: white;
    border: 2px solid black;
    border-radius: 10px;
}

.service-preview-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #002554;
}

.service-preview-card p {
    margin-bottom: 0;
    color: #555;
    line-height: 1.5;
    font-size: 1.05rem;
}


/* ========================================
   Project Preview
   ======================================== */

.projects-preview {
    background-color: white;
}

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

.home-project-card {
    padding: 25px;
    background-color: white;
    border: 2px solid black;
    border-radius: 10px;
    font-size: 1.05rem;
    color: #555;
}

.home-project-card h3 {
    margin-top: 0;
    color: #002554;
}


/* ========================================
   Text Links
   ======================================== */

.text-link {
    color: #002554;
    font-weight: bold;
    text-decoration: none;
}

.text-link:hover {
    color: #01a2e0;
    text-decoration: underline;
}


/* ========================================
   Contact 
   ======================================== */
.home-contact {
    background-color: #f2f2f2;
}

.home-contact {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 70px 30px;
}

.home-contact h2 {
    font-size: 2.3rem;
    color: #002554;
}

.home-contact p {
    max-width: 650px;
    margin: 0 auto 30px auto;
    color: #555;
    line-height: 1.6;
    font-size: 1.05rem;
}


/* ========================================
   Mobile
   ======================================== */

@media (max-width: 768px) {

     .hero {
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        gap: 30px;
    }

    .hero-content {
        max-width: 600px;
        width: 100%;
    }

    .hero-visual {
        width: 100%;
        margin-top: 0;
    }

    #homepage-canvas1 {
        height: 300px;
    }

    .hero h1 {
        font-size: 2.7rem;
    }

    .hero h2 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 1.05rem;
    }


    .home-section {
        padding: 55px 25px;
    }


    .service-preview-grid {
        grid-template-columns: 1fr;
    }


    .home-projects {
        grid-template-columns: 1fr;
    }


    .home-contact {
        padding: 70px 25px;
    }

}
