/* ============================================
   PORTAFOLIO WEB PAGE
   ============================================ */

.portafolio-web-page {
    box-sizing: border-box;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 0;
    min-height: 100vh;
    padding: 0;
    position: relative;
    display: flex;
    align-items: stretch;
}

/* Back Button - Top Left */
.btn-back-portfolio {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(70, 130, 255, 0.15);
    border: 2px solid rgba(70, 130, 255, 0.5);
    color: #4682ff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    backdrop-filter: blur(10px) saturate(150%);
}

.btn-back-portfolio:hover {
    background: rgba(70, 130, 255, 0.25);
    border-color: rgba(70, 130, 255, 0.8);
    transform: translateX(-5px) scale(1.1);
    box-shadow: 0 0 30px rgba(70, 130, 255, 0.4);
}

/* ============================================
   CONTENT DESCRIPTION WEB
   ============================================ */

.content-description-web {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(3rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem);
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.15) 0%, rgba(42, 82, 152, 0.12) 50%, rgba(255, 255, 255, 0.06) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-right: 1px solid rgba(70, 130, 255, 0.25);
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow-y: auto;
    box-sizing: border-box;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
    z-index: 10;
}

.content-description-web h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-primary);
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    max-width: 100%;
    word-wrap: break-word;
}

.content-description-web span {
    background: linear-gradient(135deg, #4682ff 0%, #2a5298 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-description-web p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 40ch;
    margin: 0;
}

/* Buttons Container */
.content-description-web .btnsportfolio {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.content-description-web .btn-portfolio {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.content-description-web .btn-portfolio:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(70, 130, 255, 0.3);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(70, 130, 255, 0.5);
}

.content-description-web .btn-portfolio.verde {
    background: #25D366;
    border-color: rgba(37, 211, 102, 0.7);
    color: #0C1127;
}

.content-description-web .btn-portfolio.verde:hover {
    background: #1fb85a;
    border-color: rgba(37, 211, 102, 0.9);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

/* ============================================
   PROYECTOS WEB GRID
   ============================================ */

.proyectos-web-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: clamp(0.5rem, 1vw, 1rem) clamp(2rem, 5vw, 3vw);
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    box-sizing: border-box;
    scroll-behavior: smooth;
    min-height: 90vh;
    flex: 1;
}

.proyectos-web-grid::before {
    content: '';
    display: block;
    width: 600px;
    height: 1px;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

/* ============================================
   PROYECTO WEB ITEM
   ============================================ */

.proyecto-web {
    flex: 0 0 clamp(250px, 30vw, 600px);
    aspect-ratio: 16 / 10;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    text-decoration: none;
}

.proyecto-web:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 
        0 15px 35px rgba(70, 130, 255, 0.25),
        0 0 25px rgba(70, 130, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    border-color: rgba(70, 130, 255, 0.4);
}

.proyecto-web img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.proyecto-web:hover img {
    transform: scale(1.08);
}

.proyecto-web h2 {
    position: absolute;
    inset: 0;
    padding: 0;
    margin: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: var(--text-primary);
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    z-index: 2;
    padding-bottom: 1.5rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE - TABLET (≤1023px)
   ============================================ */

@media screen and (max-width: 1023px) {
    .portafolio-web-page {
        display: block;
        width: 100%;
        margin: 0;
    }

    .content-description-web {
        position: static;
        width: auto;
        height: auto;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(70, 130, 255, 0.25);
        padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
        justify-content: flex-start;
    }

    .proyectos-web-grid {
        min-height: auto;
        flex: none;
    }

    .proyectos-web-grid::before {
        display: none;
    }

    .proyecto-web {
        flex: 0 0 clamp(250px, 45vw, 350px);
    }
}

/* ============================================
   RESPONSIVE - MOBILE (≤768px)
   ============================================ */

@media screen and (max-width: 768px) {
    .portafolio-web-page {
        width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    .content-description-web {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(70, 130, 255, 0.25);
        padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
        align-items: center;
        text-align: center;
        z-index: 10;
        clip-path: none;
    }

    .content-description-web h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .content-description-web p {
        font-size: clamp(0.85rem, 1.5vw, 1rem);
        max-width: 100%;
    }

    .content-description-web .btnsportfolio {
        justify-content: center;
    }

    .content-description-web .btn-portfolio {
        padding: 10px 18px;
        font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    }

    .proyectos-web-grid {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        padding: clamp(1.5rem, 3vw, 2rem);
        overflow-x: visible;
        overflow-y: auto;
        min-height: auto;
        margin-top: 50vh;
        gap: 1rem;
    }

    .proyectos-web-grid::before {
        display: none;
    }

    .proyecto-web {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
        aspect-ratio: 16 / 10;
    }

    .btn-back-portfolio {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        top: 1rem;
        left: 1rem;
    }
}
