/* Basic reset & sensible defaults */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --gap: 12px;            /* tweak if you want a gutter (e.g., 12px) */
    --font: ui-sans-serif, Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    --font-color: #0D161C;
    --sub-color: #6e7880;
    --radius: 16px;
    --gold-border: linear-gradient(to bottom, #ffd700, #ffa07a);
    --shadow-border: 0 0 10px rgba(255, 215, 0, 0.5);
}

html, body {    
    height: 100%;
    width: 100%;
    margin: 0;
    font-family: var(--font);
    background: radial-gradient(1200px 600px at 70% -10%, rgba(217,180,93,.08), transparent 60%),
    var(--bg);
    background-position-x: initial, initial;
    background-position-y: initial, initial;
    color: var(--text);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Project Card Full */
.project-card-full {
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.project-card-full:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px #0000008c;
}

.project-card-full img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 3px solid #5DC0F9;
    transition: transform 0.3s ease;
}

.project-card-full:hover img {
    transform: scale(1.05);
}

.project-images {
    position: relative;
    overflow: hidden;
    max-height: 40vh;
    min-height: 40vh;
}

.project-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-images img.active {
    opacity: 1;
    position: relative;
}

.project-details {
    padding: 1.5rem;
    overflow-y: scroll;
    max-height: 40vh;
    min-height: 40vh;
}

.project-details h3 {
    margin: 0 0 1rem;
    color: var(--font-color);
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.project-card-full:hover h3 {
    color: #5DC0F9;
}

.project-description {
    color: var(--sub-color);
    line-height: 1.6;
}

.project-description p {
    margin: 0 0 1rem;
    transition: color 0.3s ease;
    white-space: normal; /* Ensure normal whitespace handling since we're using HTML formatting */
}

.project-card-full:hover .project-description p {
    color: var(--font-color);
}

/* Loading and error states */
.loading, .error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--sub-color);
}

/* Staggered animation delays */
.project-card-full:nth-child(1) { animation-delay: 0.1s; }
.project-card-full:nth-child(2) { animation-delay: 0.2s; }
.project-card-full:nth-child(3) { animation-delay: 0.3s; }
.project-card-full:nth-child(4) { animation-delay: 0.4s; }
.project-card-full:nth-child(5) { animation-delay: 0.5s; }
.project-card-full:nth-child(6) { animation-delay: 0.6s; }
.project-card-full:nth-child(7) { animation-delay: 0.7s; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section styles */
section {
    margin: 3rem 0;
    animation: fadeIn 0.8s ease;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--font-color);
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #5DC0F9;
}

/* Contact info cards */
.contact-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
    margin-top: 0;
    color: var(--font-color);
}

/* Services section */
.services-section {
    margin-bottom: 3rem;
}

.service-category {
    margin-bottom: 2rem;
}

.service-category h3 {
    color: var(--font-color);
    margin-bottom: 0.5rem;
}

.service-category ul {
    list-style-type: none;
    padding: 0;
}

.service-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    color: var(--sub-color);
}

.service-category li:last-child {
    border-bottom: none;
}

.service-category p {
    color: var(--sub-color);
    line-height: 1.6;
}

/* About section */
.about-section {
    margin-bottom: 2rem;
}

.about-section h2, .about-section h3 {
    color: var(--font-color);
}

.about-section p {
    color: var(--sub-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    border-top: 1px solid #eee;
}

.footer-content p {
    margin: 0;
    color: var(--sub-color);
}

/* Contact map styling */
.contact-map iframe {
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
  width: 100%;
  border: none;
}

.contact-map h2 {
  margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .project-card-full img {
        height: 200px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
}

a{
    color: #000000;
    font-weight: 600;
    text-decoration: none;
    transition: border 0.1s ease-in-out;
}

a:hover{
    border-bottom: #0D161C 2px solid;
    }

/* Header */
.header-bar{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 2vw;
    height: auto;
}

.logo{
    display: flex;
    flex-direction: row;
    align-items: center
}

.aimvest-logo{
    width: 80px;
    height: auto;
}

.nav{
    gap: 20px;
    display: flex;
    flex-direction: row;
    align-items: center
}

.hamburger-menu {
    display: none;
}

.hide{
    opacity: 0;
}

/* main */
.main{
    display: flex;
    flex-direction: column;
    padding: 0 9vw;
    gap: 4vh;
}


/* hero */

.hero,.hero1{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: center;
    padding: 0 4vw;
    width: 80vw;
    height: 40vh;
    background-color: #000000;
    color: #6e7880;
    border-radius: 20px;
}

.hero1{
    height: 25vh;
    flex-direction: row;
    justify-content: left;
    gap: 2vw;
    background-color: #ffe3e3;
    box-shadow: 0 1px 2px #0D161C, -1px 0 2px #0D161C;
}

.hero::after{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 80vw;
    height: 40vh;
    border-radius: 20px;
    background-image: url('../resources/building.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
    filter: blur(2px) brightness(0.5);
}

.hero1 h1{
    font-size: 40px;
    margin-bottom: 0;
}

.hero-text{
    color: #ecc1c1;
    z-index: 1;
    margin-bottom: 30px;
}

.hero-text h1{
    font-family: 'Work Sans', 'Noto Sans', sans-serif;
    font-weight: bolder;
    font-size: 5vw;
}

.other{
    color:#0D161C
}

.hero p{
    font-family: 'Work Sans', 'Noto Sans', sans-serif;
    font-weight: 100;
    font-size: 1rem;
}

.button{
    background-color:#5DC0F9;
    color:  #0D161C;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 800;
}

.button:hover{
    background-color: #48ace6;
    border: none;
    transform: scale(1.05);
}   

/* Services */
.svg-icons{
    fill: var(--font-color);
    width: 25px;
    height: 23px;
    margin-bottom: 3px;
}
.svg-icons path{
    scale: 0.1;
}

.services{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    gap: 20px;
}

.services h2{
    font-size: 1.5rem;
    color: var(--font-color);
    margin: 0;
}

.service-cards{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    grid-gap: 60px;
    max-width: 70vw;
    margin: 0 auto;
}

.service-card{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 125px;
    gap: 5px;
    padding: 10px;
    border-radius: var(--radius);
    background: #dbd9d9;
}

.service-card:hover{
    background-color: #bdbdbc;
    cursor: pointer;
    transform: scale(1.05);
}

h3{
    font-size: 1rem;
    color: var(--font-color);
    margin: 0;
}

.service-card p{
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--sub-color);
    margin: 0;
    text-align: left;
}

/* Project Container Styles */
.past-projects {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.project-container {
    display: flex;
    overflow-x: scroll;
    gap: 2rem;
    padding: 1rem 0;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    scrollbar-width: thin;
}

.project-card {
    flex: 0 0 300px;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    padding: 1rem;
    margin: 0;
    font-size: 1.2rem;
    color: var(--font-color);
}

.project-card p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: var(--sub-color);
}

.view-all-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 12px 24px;
    background: #5DC0F9;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 180px;
}

.view-all-btn:hover {
    background: #48ace6;
    transform: scale(1.05);
}

/* Mobile devices (max-width: 768px) */
@media only screen and (max-width: 768px) {
    .header-bar {
        position: relative;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100%;
        background-color: #fff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        z-index: 1000;
        transition: right 0.3s ease;
    }
    
    .nav.active {
        display: flex;
        right: 0;
    }
    
    .nav a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        font-size: 1.1rem;
    }
    
    .hamburger-menu {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }
    
    .hamburger-menu span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #0D161C;
        margin: 5px 0;
        transition: 0.3s;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 0.8rem;
    }
    .services h2 {
        font-size: 1rem;
    }
    .service-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        grid-gap: 20px;
    }
    
    /* About page responsive styles */
    .hero1 {
        width: 90vw;
        height: auto;
        padding: 2rem 1rem;
        text-align: center;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    .hero1 h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero1 p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .about-section {
        padding: 0 1rem;
    }
    
    .about-section h2 {
        font-size: 1.3rem;
    }
    
    .about-section h3 {
        font-size: 1.1rem;
    }
    
    .about-section p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Contact page responsive styles */
    .contact-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .contact-card h3 {
        font-size: 1.1rem;
    }
    
    .contact-card p {
        font-size: 0.9rem;
    }
    
    .contact-map iframe {
        height: 300px;
    }
    
    /* Services page responsive styles */
    .service-category h3 {
        font-size: 1.1rem;
    }
    
    .service-category p {
        font-size: 0.9rem;
    }
    
    .service-category li {
        font-size: 0.9rem;
    }
    
    /* Projects page responsive styles */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Desktop devices (min-width: 769px) */
@media only screen and (min-width: 769px) {
    .hero, .hero::after {
        max-width: 1000px;
        min-height: 400px;
    }
    .hero-text h1 {
        font-size: 3vw;
    }
    .hero p{
        font-size: 1rem;
    }
    
    /* About page desktop styles */
    .hero1 {
        width: 80vw;
        margin: 0 auto;
    }
    
    .hero1 h1 {
        font-size: 2.5rem;
    }
    
    .hero1 p {
        font-size: 1.1rem;
    }
    
    .about-section {
        padding: 0;
    }
    
    .about-section h2 {
        font-size: 2rem;
    }
    
    .about-section h3 {
        font-size: 1.5rem;
    }
    
    .about-section p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Contact page desktop styles */
    .contact-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-card h3 {
        font-size: 1.3rem;
    }
    
    .contact-card p {
        font-size: 1rem;
    }
    
    .contact-map iframe {
        height: 450px;
    }
    
    /* Services page desktop styles */
    .service-category h3 {
        font-size: 1.3rem;
    }
    
    .service-category p {
        font-size: 1rem;
    }
    
    .service-category li {
        font-size: 1rem;
    }
    
    /* Projects page desktop styles */
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
}