/* General */

::selection {
    background-color: #A1D9F5; /* Color del fondo de la selección */
    color: #302E87; /* Color del texto al seleccionar */
  }

body {
    font-family: 'SpaceGrotesk', sans-serif;
    margin: 0px;
    color: #302E87;
    display: grid;
    grid-template-columns: 8% repeat(12, 1fr) 8%;
    column-gap: 16px;
    row-gap: 5%;
    overflow-x: hidden;
}

p, li {
    font-family: 'DMSans', sans-serif;
    margin-bottom: 8px; 
}

h1 {
    margin: 0;
}

h3 {
    font-size: 1.3em;
}

.main-title {
    font-size: 2.3em;
    font-weight: 400;
}

.main-subtitle {
    font-size: 1.25em;
}

/* header */
header {
    grid-column: 1 / span 14;
    display: flex;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: column;
}

.header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 9%;
    background-color: #302E87;
}

.btn-header {
    font-family: 'DMSans', sans-serif;
    background-color: #A1D9F5;
    color: #302E87;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 24px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-header:hover {
    background-color: #bce6f9;
    color: #302E87;
}

.logo img {
    height: 40px;
    width: auto;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 80px;
}

.navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 80px;
}

.navigation li {
    margin: 0;
}

.navigation a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navigation a:hover {
    text-decoration: underline;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 2; /* Below navigation */
}

.overlay.active {
    display: block;
}

/* Carousel */
.carousel-section {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 5%;
    margin-bottom: 5%;
}

.carousel {
    position: relative;
    display: flex;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #fff 5%, #fff 95%, transparent);
}

.carousel div {
    white-space: nowrap;
    animation: animate 25s linear infinite;
}

.carousel div img {
    margin: 0 7px;
    transition: .5s;
    height: 86px;
}


@keyframes animate {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* main */
main {
    grid-column: 2 / span 12;
}

/* footer */
footer {
    position: relative;
    bottom: 0;
    grid-column: 1 / span 14;
    background-color: #A1D9F5;
    padding-top: 50px;
    padding-bottom: 50px;
    display: grid;
    grid-template-columns: 8% repeat(12, 1fr) 8%;
    column-gap: 16px;
    align-items: end;
}

footer ::selection {
    background-color: #ffffff; /* Color del fondo de la selección */
    color: #302E87; /* Color del texto al seleccionar */
  }

.footer-content {
    grid-column: 2 / span 7;
}

.footer-content h1 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    flex-basis: 100%;
}

.footer-content a {
    text-decoration: none;
    color: #302E87;
    transition: color 0.3s ease;
    font-size: 1.3em;
    font-family: 'SpaceGrotesk', sans-serif;
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.footer-content a:hover {
    text-decoration: underline;
    color: #302E87;
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    line-height: 1.6;
    flex-basis: 100%;
}

.footer-social-media {
    grid-column: 2 / span 3;
    display: flex;
    justify-content: left;
    align-items: flex-end;
    width: 200%;
    gap: 48px;
    margin-bottom: 0px;
    margin-top: 2em;
    font-size: 1rem;
    font-family: 'DMSans', sans-serif;
}

.footer-social-media a {
    text-decoration: none;
    color: #302E87;
    transition: color 0.3s ease;
    margin-bottom: 0px;
}

.footer-social-media a:hover {
    text-decoration: underline;
    color: #302E87;
}

.footer-extra-info {
    grid-column: 11 / span 3;
    display: flex;
    justify-content: right;
    align-items: flex-end;
    width: 100%;
    gap: 48px;
    margin-bottom: 0px;
    font-size: 1rem;
    font-family: 'DMSans', sans-serif;
}

.footer-extra-info a {
    text-decoration: none;
    color: #302E87;
    transition: color 0.3s ease;
    margin-bottom: 0px;
}

.footer-extra-info a:hover {
    text-decoration: underline;
    color: #302E87;
}

.footer-extra-info p {
    margin-bottom: 0px;
}


/* Featured work */
.featured-work {
    text-align: left;
    
  }
  
  .work-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .work-card {
    background: #ffffff;
    color: #302E87;
    border-radius: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
  
  }
  
  .work-card:hover {
    transform: scale(1.01);
  }
  
  .work-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  
  .work-card-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
  }
  
  .work-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  
  .work-card-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0;
  }
  
  .work-card-extra-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .work-card-tags {
    display: flex;
    column-gap: 0.6rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    row-gap: 0.6rem;
  }

  @media (max-width: 2000px) {
    .work-card-image {
        height: 210px;
    }
  }
  
  .tag {
    background: #ff8a88;
    color: white;
    font-family: 'DMSans', sans-serif;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }

  .tag-lighter {
    background: #FFE8D6;
    color: #302E87;
    font-family: 'DMSans', sans-serif;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
  }
  
  .work-card-view-work {
    margin-top: 0.5em;
    font-weight: bold;
    text-decoration: none;
  }

  .work-card:hover .work-card-view-work {
  text-decoration: underline;
}


/* Responsive */
@media screen and (min-width: 1440px) {
  .work-card-image {
    height: 260px;
  }
}

@media (max-width: 1375px) {
    .view-project-text {
        display: none;
    }
}

@media (max-width: 1024px) {
    .work-container {
        grid-template-columns: repeat(6, 1fr);
    }

    .work-card {
        grid-column: span 3;
    }
}

@media (max-width: 700px) {
    /* General */
    body {
        row-gap: 2%;
        grid-template-columns: 0% repeat(12, 1fr) 0%;
    }


    /* main */
    .main-title {
        font-size: 2em;
    }

    .main-subtitle {
        font-size: 1em;
    }

    /* Header */
    .menu-toggle {
        display: block; /* Ensure the toggle is visible */
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        position: relative;
        z-index: 4; /* Ensure it is above the menu */
    }

    .header-item {
        flex-direction: row-reverse;
        align-items: center;
        padding: 18px 3%;
        padding-right: 1.7%;
    }

    .navigation {
        position: fixed;
        top: -110%; /* El menú comienza oculto, fuera de la vista en la parte superior */
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #302E87;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 3;
        transition: top 0.3s ease; /* Transición suave al cambiar el valor de top */
    }
    
    .navigation.active {
        top: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    

    .navigation ul {
        list-style: none;
        padding: 0;
        margin-top: 12%;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .navigation li {
        margin-bottom: 20px;
        font-size: 1.5em;
    }

    /* Work card */
    .work-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .work-card {
        grid-column: span 4;
    }

    /* Footer */
    footer {
        grid-template-columns: 0% repeat(12, 1fr) 0%;
    }

    .footer-content {
        align-items: baseline;
        grid-column: 2 span 12;
    }

    .footer-content h1, .footer-content p {
        text-align: left;
        width: 180%;
    }

    .footer-content h1 {
        font-size: 1.5rem;
    }

    .footer-content p {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 1em;
    }

    .footer-social-media {
        grid-column: 2 / span 4;
        margin-top: 2em;
    }

    .footer-extra-info {
        align-items: baseline;
        grid-column: 2 / span 12;
        display: flex;
        justify-content: left;
        align-items: flex-end;
        width: 100%;
        gap: 16px;
        margin-bottom: 0px;
        font-size: 0.9rem;
        font-family: 'DMSans', sans-serif;
        margin-top: 1em;
    }
}


/* For very small screens */
@media (max-width: 480px) {
    .logo img {
        height: 30px;
    }
}