/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-margin-top: 80px;
    font-size: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: #333;
}

ul {
    padding-inline-start: 20px;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

h2 {
    margin-bottom: 30px;
    font-family: 'Fraunces', sans-serif;
    border-bottom: 1px solid black;
    font-weight: 600;
    font-size: 28px;
}

h3 {
    margin-bottom: 30px;
    font-family: 'Fraunces', sans-serif;
    font-weight: 600;
    font-size: 30px;
}

h4 {
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 18px;
    border-bottom: 1px solid black;
    padding-bottom: 6px;
}


/* =========================================================
   LAYOUT
========================================================= */

.container {
    max-width: 1280px;
    margin: auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.projects,
.about,
.contact,
.hero-project,
.bento {
    margin-bottom: 40px;
}


/* =========================================================
   HEADER
========================================================= */

header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80vh;
}

.hero-img {
    flex: 1;
}

.hero-img img {
    float: right;
    width: 100%;
    border-radius: 10px;
}

.hero-text {
    flex: 2;
    position: relative;
    left: 113px;
    max-width: 776px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.hero-text h1 {
    font-size: 40px;
    margin-bottom: 20px;
    font-family: 'Fraunces';
    font-weight: 300;
}


/* =========================================================
   HERO PROJECT
========================================================= */

.hero-project {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50vh;
}

.hero-project-img {
    flex: 1;
}

.hero-project-img img {
    float: right;
    width: 100%;
    border-radius: 10px;
}

.hero-project-text {
    flex: 2;
    position: relative;
    left: 113px;
    max-width: 776px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    /* box-shadow: 0 10px 30px rgba(0,0,0,0.1); */
}

.hero-project-text h1 {
    font-size: 40px;
    margin-bottom: 20px;
    font-family: 'Fraunces';
    font-weight: 300;
    line-height: 1.4;
}


/* =========================================================
   PROJECTS
========================================================= */

.projects .filter {
    justify-content: space-evenly;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.projects .filter a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}


/* =========================================================
   CAROUSEL
========================================================= */

.carousel-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.carousel {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.card {
    min-width: calc(33.333% - 13px);
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    aspect-ratio: 3/2;
    align-content: center;
    text-align: center;
}

.carousel-btn {
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}


/* =========================================================
   ABOUT
========================================================= */

.about .content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;


    div.accordion {
        flex: 1;
    }

    .about-content {
        display: flex;
        flex:3;
        div{
            flex:1;
        }
        div:last-child{
            flex:2;
        }
    }

    .about-text {
        left: -50px;
        position: relative;
        top: 50px;
        border-radius: 10px;
        padding: 10px;
        background-color: rgba(255, 255, 255, 0.8);
    }
}


/* =========================================================
   ACCORDION
========================================================= */

.accordion-item {
    border-bottom: 1px solid #ddd;
}

.accordion-header {
    cursor: pointer;
    padding: 15px;
    background: #fafafa;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;

    i {
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &.open i {
        transform: rotate(-180deg);
    }
}

.accordion-content {
    height: 0px;
    overflow: hidden;
    transition: height 0.3s ease;

    div {
        padding: 10px 15px;
    }
}


/* =========================================================
   BUTTONS
========================================================= */

.btn-primary {
    background-color: #6B0300;
    color: #fff !important;
    border-radius: 8px;
    padding: 2px 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

button {
    padding: 10px 20px;
    border: 1px solid #999;
    background: #f5f5f5;
    cursor: pointer;
}

button:hover {
    background: #eaeaea;
}


/* =========================================================
   CONTACT
========================================================= */

.contact .content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;

    div.text {
        gap: var(--gap);
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .text .btn-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--gap);
    }

    .btn-container .contact-btn {
        display: flex;
        border: 1px solid #999;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        border-radius: 10px;
        text-decoration: none;
        color: black;
        padding: 10px;
        gap: var(--gap);

        i {
            font-size: 24px;
        }

        .hide {
            display: none;
        }
    }

    .btn-container .contact-btn.contact-btn-large {
        grid-column: span 2;
        flex-direction: row;
    }

    div.form {
        flex: 1;
    }
}


/* =========================================================
   FORM
========================================================= */

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.full {
    grid-column: 1 / -1;
}

label {
    margin-bottom: 5px;
    display: block;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #999;
    outline: none;
    border-radius: 10px;
}

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


/* =========================================================
   FOOTER
========================================================= */

.footer {
    display: flex;
    gap: 10px;
    padding: 10px 0px;
    border-top: 1px solid;
    align-items: center;

    p {
        font-size: 10px;
    }
}

#cgu-year {
    font-size: 10px;
}


/* =========================================================
   BENTO
========================================================= */

:root {
    --cols: 4;
    --row: 200px;
    --gap: 16px;
}

.bento {
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    grid-auto-rows: var(--row);
    gap: var(--gap);
}

.item {
    cursor: pointer;
    border-radius: 10px;
    background-color: #bdbdbd;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    opacity: 1;
    will-change: transform, opacity;
}

.item-img-background {
    background-image: var(--bg-url);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.item.item-img-background img {
    max-width: 80%;
    height: auto;
    max-height: 60%;
}

.hidden {
    display: none;
    opacity: 0;
}

.item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 150, 255, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.item:hover {
    transform: scale(1.01);
}

.item:hover::after {
    background: var(--overlay, rgba(0, 150, 255, 0.35));
}

.item--wide {
    grid-column: span 2;
}

.item--tall {
    grid-row: span 2;
}

.item--one-row {
    grid-column: span var(--cols);
    grid-row: span 2;
}

.item--big {
    grid-column: span 2;
    grid-row: span 2;
}

.item--default-size {
    grid-column: span 1;
    grid-row: span 1;
}

.item img {
    width: auto;
    object-fit: cover;
    display: block;
}

.filter-btn {
    cursor: pointer;
}


/* =========================================================
   POPUP
========================================================= */

body.no-scroll {
    overflow: hidden;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);

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

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;

    z-index: 9999;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    width: 100%;
    height: 100%;

    background: white;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    transform: scale(0.85);
    opacity: 0;

    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
    opacity: 1;
}

.popup-overlay.hide .popup-content {
    transform: scale(0.85);
    opacity: 0;
}
#contact-popup .popup-content {
    width: auto;
    height: auto;
    border-radius: 10px;
    .popup-header{
            padding: 0px 10px;
            border-bottom : 1px solid #999;
    }
    .contact-popup-body{
        padding: 20px;
        margin: 0px 30px;
    }
}



/* =========================================================
   POPUP HEADER
========================================================= */

.popup-header {
    position: sticky;
    top: 0;

    background: white;

    padding: 15px 20px;

    display: flex;
    justify-content: flex-end;

    z-index: 10;

    flex-shrink: 0;
}

.close-popup {
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}


/* =========================================================
   POPUP BODY
========================================================= */

.popup-body {
    flex: 1;
    overflow-y: auto;

    padding: 20px;

    display: flex;
    gap: 40px;
}

.popup-body section {
    padding: 10px;
}

.popup-body .content {
    flex: 3;
}

.popup-body .content-description {
    flex: 1;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.popup-body .content-description .description {
    overflow: auto;

    padding-bottom: 20px;

    p,
    li,
    strong {
        font-size: 15px !important;
        line-height: 1.3;
    }
}

#result-message.success {
    color: green;
}

#result-message.error {
    color: red;
}

/* =========================================================
   RESPONSIVE - 768px
========================================================= */

@media (max-width: 768px) {

    .menu {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background: white;
        flex-direction: column;
        width: 200px;
        border: 1px solid #ddd;
        padding: 10px;
    }

    .menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        flex-direction: column;
    }

    .hero-text {
        position: static;
        margin-bottom: 20px;
    }

    .hero-img {
        width: 100%;
    }

    .card {
        min-width: 100%;
    }

    .carousel-btn {
        display: none;
    }

    .hero-project {
        flex-direction: column;
    }

    .hero-project-text {
        left: 0;
    }

    .hero-project-text h1 {
        font-size: 40px;
    }

    .projects .filter {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .item--wide {
        grid-column: span 1;
    }

    .item--tall {
        grid-row: span 1;
    }

    .item--one-row {
        grid-column: span 1;
        grid-row: span 1;
    }

    .item--big {
        grid-column: span 1;
        grid-row: span 1;
    }

    .popup-body {
        flex-direction: column;
    }

    .popup-body .content-description {
        position: relative;
    }

    .content-flex .flex-item,
    .masonry .column {
        width: 100%;
    }

    .btn-container {
        grid-template-columns: 1fr !important;
    }

    .contact-btn.contact-btn.contact-btn-large {
        grid-column: span 1 !important;
    }
    
    .about .content, .about-content {
        flex-direction: column;
    }

    .about-text {
        left: 0px !important;
        top: 0px !important;
    }
}


/* =========================================================
   RESPONSIVE - 600px
========================================================= */

@media (max-width: 600px) {

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


/* =========================================================
   RESPONSIVE - 480px
========================================================= */

@media (max-width: 480px) {

    .about .content,
    .contact .content {
        flex-direction: column;
    }

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

    .popup-body {
        flex-direction: column;
    }

    .popup-body .content-description {
        position: relative;
    }

    .content-bento {
        grid-template-columns: 1fr !important;
    }

    .bento-item {
        grid-column: span 1 !important;
    }

    .bento-item--one-row {
        grid-column: span 1 !important;
    }

    .bento-item--tall {
        grid-row: span 1 !important;
    }

    .bento-item--tall-3 {
        grid-row: span 1 !important;
    }

    .bento-item-2 {
        grid-column: span 1 !important;
    }

    .content-flex-row {
        flex-direction: column !important;
    }
}