@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&display=swap");

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-focus-ring-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter"; /* font-family is inherited */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.main-container {
    box-sizing: border-box;
    margin: 0 auto 100px;
    padding: 0 0 150px;
    width: 100%;
}

.banner {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: rgba(217, 217, 217, 0.2);
}

.banner-container {
    box-sizing: border-box;
    width: 90%;
    max-width: 1350px;
    margin: 0 auto;
    padding: 40px 0 0;
    display: flex;
    justify-content: space-between;
}

.project-numbers {
    box-sizing: border-box;
    margin: auto 0;
    /* padding: 80px 0; */
    padding: 0;
    width: 45%;
}

.project-numbers > h1 {
    box-sizing: border-box;
    margin: 0;
    padding: 0 15px;
    font-size: 40px;
    font-weight: 400;
    text-align: center;
}

.projects-cities {
    box-sizing: border-box;
    margin: 0;
    padding: 30px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.projects-count, .cities-count {
    box-sizing: border-box;
    margin: 0;
    padding: 10px 0 10px;
    width: 50%;
}

.p-count, .c-count {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.projects-cities h2 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    position: relative;
    font-size: 48px;
    font-weight: 500;
    color: rgba(11, 64, 8, 1);
}

.projects-cities h3 {
    box-sizing: border-box;
    margin: 10px 0 0;
    padding: 0;
    font-size: 24px;
    font-weight: 400;
}

.projects-count {
    border-right: 3px solid black;
    padding-right: 55px;
    align-items: flex-end;
}

.p-count {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    align-items: flex-end;
}

.p-count > h3 {
    padding-right: 5px;
}

.cities-count {
    border-left: 2px solid black;
    padding-left: 25px;
}

.c-count {
    position: relative;
    display: inline-flex;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    align-items: flex-end;
}

.c-count > h3 {
    padding-right: 5px;
}

.plus-count {
    position: absolute;
    left: 100%;
    top: 40%;
    transform: translateY(-45%);
    box-sizing: border-box;
    padding: 0;
    font-size: 48px;
    font-weight: 500;
    color: rgba(11, 64, 8, 1);
}

.random-proj-photos {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 50%;
    display: flex;
    flex-direction: column;
    /* row-gap: 4%; */
}

.proj-photos {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    /* height: 48%;  */
    /* Set this to auto to use aspect-ratio in smaller screens */
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 13.5px;
    /* column-gap: 2%; */
}

.photo-container {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 49%;
    aspect-ratio: 330.75 / 183.75;
}

.photo-container > img {
    display: block;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-container {
    box-sizing: border-box;
    width: 90%;
    max-width: 952.32px;
    margin: 0 auto;
    padding: 120px 0 0;
}

.project-container > h1 {
    box-sizing: border-box;
    margin: 0;
    padding: 0 15px;
    font-size: 40px;
    font-weight: 500;
    text-align: center;
}

.company-projects {
    box-sizing: border-box;
    margin: 28px 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.project {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.image-frame {
    box-sizing: border-box;
    padding: 0;
    margin: 30px auto 0;
    position: relative;
    width: 920px;
    /* height: 443px; */
    aspect-ratio: 920/443;
    background-color: rgba(217, 217, 217, 0.7);
    border-radius: 10px;
}

.carousel-button {
    box-sizing: border-box;
    height: 45px;
    aspect-ratio: 45/45;
    position: absolute;
    z-index: 2;
    background: none;
    border: none;
    /* top: 50%; */
    top: 0;
    bottom: 0;
    margin: auto 0;
    cursor: pointer;
    border-radius: 100%;
    padding: 10px;
    background-color: rgba(11, 64, 8, 0.9);
}

.carousel-button i {
    box-sizing: border-box; 
    color: white;
    font-size: 24px;
    transform: rotate(90deg);
}

.carousel-button:hover {
    background-color: rgba(11, 64, 8, 0.7);
}

.carousel-button.prev {
    left: 1rem;
    transform: rotate(360deg);
}

.carousel-button.next {
    right: 1rem;
    transform: rotate(180deg);
}

.image-frame > ul {
    box-sizing: border-box;
    padding: 0;
    margin: 0 auto;
    width: 85%;
    height: 100%;
    position: relative;
    list-style: none;
}

.slide {
    position: absolute;
    display: flex;
    flex-direction: column;
    inset: 0;
    opacity: 0;
    transition: 180ms opacity ease-in-out;
}

.slide > img {
    box-sizing: border-box;
    padding: 0;
    margin: auto;
    display: block;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

.slide[data-active] {
    opacity: 1;
    z-index: 1;
    transition-delay: 0ms;
}

.bars {
    box-sizing: border-box;
    min-width: 20px;
    align-self: center;
    display: flex;
    position: absolute;
    top: 100%;
    margin: 5px auto 0;
    justify-content: space-between;
    gap: 5px;
}

.bars > .bar {
    box-sizing: border-box;
    min-width: 20px;
    aspect-ratio: 20 / 8;
    border: 1px solid rgba(11, 64, 8, 0.9);
}

.bar[active-bar] {
    border: none;
    background-color: rgba(11, 64, 8, 0.9);
}

.project-labels {
    box-sizing: border-box;
    width: 920px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.project-labels > h2 {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.5em;
}

.project-labels > p {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

.summary-projects-container {
    box-sizing: border-box;
    margin: 0 auto;
    padding: 90px 0 0;
    width: 90%;
    max-width: 1400px;
}

.summary-projects-container > h1 {
    box-sizing: border-box;
    margin: 0;
    padding: 0 15px;
    font-size: 40px;
    font-weight: 500;
    text-align: center;
}

.accordion-container {
    box-sizing: border-box;
    margin: 30px 0 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    row-gap: 25px;
}

.accordion-item {
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(217, 217, 217, 0.75);
}

.accordion-header {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    line-height: 1.50em;
    cursor: pointer;
    gap: 20px;
}

.accordion-header i {
    color: rgba(11, 64, 8, 1);
}

/* Display content when active/open */
.accordion-content {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.50em;
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    opacity: 0;
    transition: max-height 500ms ease, opacity 500ms ease, padding 500ms ease;
}
.accordion-header.active + .accordion-content {
    max-height: none; /* Increased to accommodate more content and ensure hiding */
    opacity: 1;
    padding: 15px 0 0;
}

/* Rotate arrow when active/open */
.accordion-arrow {
    transition: transform 500ms ease;
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg); /* Arrow points up when open */
}

.table-responsive {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: auto;     /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.table-responsive table {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;     /* Force scroll if table is wide */
}

.table-responsive th,
.table-responsive td {
    box-sizing: border-box;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-responsive td {
    font-size: 16px;
}

.table-responsive tr:nth-child(even) {
    background-color: rgba(11, 64, 8, 0.5);
}

@media (max-width: 1345px) {
    .proj-photos {
        gap: 10px;
    }
}

@media (max-width: 1248px) {
    .project-numbers > h1 {
        font-size: 35px;
    }
    .projects-cities h2 {
        font-size: 43px;
    }
    .projects-cities h3 {
        font-size: 20px;
    }
    .plus-count {
        font-size: 43px;
    }
}

@media (max-width: 1128px) {
    .banner-container {
        width: 95%;
        max-width: 1071.6px;
    }
    .project-numbers > h1 {
        font-size: 28px;
        padding: 0 10px;
    }
    .projects-cities h2 {
        font-size: 28px;
    }
    .projects-cities h3 {
        font-size: 18px;
    }
    .plus-count {
        font-size: 28px;
    }
    .projects-count {
        padding-right: 43px;
    }
    .p-count > h3, .c-count > h3 {
        padding-right: 0;
    }

    .project-container > h1 {
        font-size: 30px;
    }
    .project-labels > h2 {
        font-size: 16px;
    }
    .project-labels > p {
        font-size: 16px;
    }

    .project-container {
        width: 90%;
        max-width: 1015.2px;
        padding-top: 80px;
    }
    .company-projects {
        margin-top: 15px;
        gap: 10px;
    }
    .image-frame {
        width: 100%;
        aspect-ratio: 789.35 / 443;
    }
    .image-frame > ul {
        margin: auto;
        width: 100%;
    }
    .main-container img {
        border-radius: 10px;
    }
    .slide > img {
        margin: 0;
        width: 100%;
    }
    .project-labels {
        width: 100%;
    }

    .accordion-item {
        padding: 8px 0;
    }
    .accordion-header {
        font-size: 16px;
    }
    .accordion-content {
        font-size: 16px;
    }
}

@media (max-width: 1049px) {
    .banner-container {
        flex-direction: column;
        align-items: center;
    }
    .project-numbers {
        width: 100%;
    }
    .random-proj-photos {
        width: 100%;
        max-width: 700px;
    }
    .proj-photos {
        gap: 13px;
    }
}

@media (max-width: 900px) {
    .project-labels {
        top: 108%;
        gap: 8px;
    }
}

@media (max-width: 682px) {
    .proj-photos {
        gap: 10px;
    }
}

@media (max-width: 620px) {
    .project-labels {
        top: 110%;
        gap: 8px;
    }
}

@media (max-width: 524px) {
    .proj-photos {
        flex-direction: column;
    }
    .photo-container {
        width: 100%;
    }
    .photo-container > img {
        border-radius: 10px;
    }
    .projects-count {
        border-right: 2px solid black;
        padding-right: 40px;
    }
    .cities-count {
        border-left: 1px solid black;
        padding-left: 20px;
    }
}

/* img slider mobile responsiveness */
@media (max-width: 1629px) {
    .carousel-button i {
        font-size: 18px;
    }
    .carousel-button {
        height: 39px;
        aspect-ratio: 39/39;
        padding: 8px;
    }
    .carousel-button.prev {
        left: 0.5rem;
    }
    .carousel-button.next {
        right: 0.5rem;
    }
}

@media (max-width: 1128px) {
    .carousel-button {
        background-color: rgba(11, 64, 8, 0.5);
    }
    .carousel-button i {
        color: rgba(255, 255, 255, 1);
    }
}

@media (max-width: 920px) {
    .carousel-button i {
        font-size: 18px;
    }
    .carousel-button {
        padding: 8px;
    }
}

@media (max-width: 742px) {
    .carousel-button {
        background-color: rgba(11, 64, 8, 0.3);
        top: 0;
        bottom: 0;
        margin: auto 0;
    }
    .carousel-button {
        height: 36px;
        aspect-ratio: 36/36;
        padding: 4px;
    }
    .carousel-button i {
        font-size: 16px;
        color: white;
    }
}

@media (max-width: 552px) {
    /* .bars {
        min-width: 71.77056px;
    } */
    .bars > .bar {
        min-width: 14.19264px;
        aspect-ratio: 14.19264 / 6;
    }
}