/* Portfolio specific styles extracted from style.css */

.portfolio-section .container {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 0rem;
}

.portfolio-section {
    background: transparent;
    padding: 0px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.portfolio-title {
    font-family: 'Sansation', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    color: #4aa921;
    margin-bottom: 1rem;
    text-align: center;
}

.portfolio-subtitle {
    font-size: 1.2rem;
    color: #183049;
    text-align: center;
    margin-bottom: 7rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 30px;
    margin-bottom: 0px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
}

.portfolio-card {
    background: transparent;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: none;
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    height: 500px;
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.portfolio-card:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: none;
}

.portfolio-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
    transform: translateZ(0);
    will-change: auto;
    backface-visibility: hidden;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.02) translateZ(0);
}

.portfolio-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%) translateZ(0);
    padding: 25px;
    text-align: center;
    z-index: 2;
    background: rgba(74, 169, 33, 0.881);
    will-change: auto;
    backface-visibility: hidden;
}

.portfolio-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 10px;
    text-shadow: none;
}

.portfolio-card-desc {
    font-size: 1rem;
    color: #183049;
    margin: 0;
    font-weight: 400;
    text-shadow: none;
}

.portfolio-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    transition: all 0.3s ease;
}

.portfolio-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.portfolio-arrow:hover {
    transform: scale(1.1);
}

.portfolio-arrow:hover img {
    filter: brightness(1.2);
}

.portfolio-card-no-bg .portfolio-content {
    background: transparent;
}

.portfolio-card-no-bg .portfolio-card-title {
    color: #ffffff;
    text-shadow: none;
}

.portfolio-card-no-bg .portfolio-card-desc {
    color: #183049;
    text-shadow: none;
}

.portfolio-cta {
    text-align: center;
}

.btn-portfolio {
    display: inline-block;
    transition: all 0.3s ease;
    color: #ffffff;
    padding: 0.7em 1.7em;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 2em;
    background: linear-gradient(135deg, #92d348, #4aa921);
    border: 1px solid #4aa921;
}

.btn-portfolio:hover {
    color: #183049;
}

/* Responsive Typography para portfolio-title */
@media (max-width: 768px) {
    .portfolio-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .portfolio-title {
        font-size: 1rem;
    }
}

/* Responsive Design for Portfolio */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr auto 1fr;
        gap: 25px;
    }
    .portfolio-arrow:last-child {
        display: none;
    }
    .portfolio-title {
        font-size: 2.5rem;
        color: #4aa921 !important;
    }
    .portfolio-card {
        aspect-ratio: 3/4;
    }
}

/* Large Screen Optimizations for 3000px+ */
@media (min-width: 3000px) {
    .portfolio-section {
        min-height: 80vh !important;
    }
}

/* Ultra Large Screen Optimizations for 4K+ (3840px+) */
@media (min-width: 3840px) {
    .portfolio-section {
        min-height: 80vh !important;
    }
    
    /* Force override for 4K screens */
    body .portfolio-section {
        min-height: 80vh !important;
    }
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 60px 0;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }
    .portfolio-arrow {
        display: none;
    }
    .portfolio-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
        color: #ffffff !important;
    }
    .portfolio-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    .portfolio-card {
        aspect-ratio: 3/4;
        max-width: 400px;
        margin: 0 auto;
    }
    .portfolio-content {
        padding: 20px;
    }
    .portfolio-card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .portfolio-title {
        font-size: 2rem;
        color: #ffffff !important;
    }
    .portfolio-subtitle {
        font-size: 1rem;
    }
    .btn-portfolio {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Portfolio Slider Animations and states */
.portfolio-card.sliding {
    opacity: 0.5;
    transform: scale(0.95);
}

.portfolio-card.active {
    opacity: 1;
    transform: scale(1);
}

.portfolio-arrow {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.portfolio-arrow:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.portfolio-arrow:active {
    transform: scale(0.95);
}

/* Smooth transitions for portfolio content */
.portfolio-image img {
    transition: opacity 0.3s ease;
}

.portfolio-card-title,
.portfolio-card-desc {
    transition: opacity 0.2s ease, transform 0.3s ease;
}

/* Loading state for portfolio slider */
.portfolio-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Enhanced focus styles for accessibility */
.portfolio-arrow:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Hide text content for side portfolio cards */
.portfolio-card .portfolio-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show text content only for center card */
.portfolio-card.center-card .portfolio-content {
    opacity: 1;
    transform: translateY(-50%) translateZ(0);
}

/* Enhanced visual effects for center card */
.portfolio-card.center-card {
    z-index: 2;
}

/* Ensure side cards remain visually distinct */
.portfolio-card:not(.center-card) {
    filter: brightness(0.8);
}

.portfolio-card.center-card {
    filter: brightness(1);
}

/* Portfolio card with green stripe background */
.portfolio-card-with-bg .portfolio-content {
    background: rgba(74, 169, 33, 0.799);
}

.portfolio-card-with-bg .portfolio-card-title {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.portfolio-card-with-bg .portfolio-card-desc {
    color: #183049;
}



 
/* Grid demo (re-added) */
:root {
   
    --verde-gradient: radial-gradient(circle, rgba(146, 211, 72, 0.735) 0%, rgba(74, 169, 33, 0.815) 60%, rgb(74, 169, 33) 100%);
}
.grid {
    display: grid;
    grid-auto-columns: auto;
    grid-auto-rows: 300px;
    grid-gap: 10px;
    padding-left: 20px;
    padding-right: 20px;
    margin-top: -50px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: -25px;
    max-width: 1200px;
}
.grid .box-cont {
    box-sizing: border-box;
    position: relative;
    background: rgb(0, 0, 0);
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Imágenes individuales para cada proyecto */
.grid .box-cont[data-image="GraffRoute1.png"] {
    background: url('../assets/images/portafolios/GraffRoute1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute2.png"] {
    background: url('../assets/images/portafolios/Project\ Manager1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute3.png"] {
    background: url('../assets/images/portafolios/JumpFlop1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute4.png"] {
    background: url('../assets/images/portafolios/Parking\ Calanda1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute5.png"] {
    background: url('../assets/images/portafolios/Graffroute\ Social1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute6.png"] {
    background: url('../assets/images/portafolios/Portal\ del\ Empleado1.png') center center / cover no-repeat rgb(0, 0, 0);
}

/* Nuevas rutas para proyectos 7-18 */
.grid .box-cont[data-image="GraffRoute7.png"] {
    background: url('../assets/images/portafolios/Suite\ of\ Art1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute8.png"] {
    background: url('../assets/images/portafolios/creamostumascota.com1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute9.png"] {
    background: url('../assets/images/portafolios/Galeria\ de\ videos\ AR1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute10.png"] {
    background: url('../assets/images/portafolios/Chatbot\ 3D\ Interactivo1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute11.png"] {
    background: url('../assets/images/portafolios/Plataforma\ Web\ para\ Visualización\ de\ Modelos\ 3D1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute12.png"] {
    background: url('../assets/images/portafolios/Crea\,\ personaliza\ y\ da\ vida\ a\ tus\ mascotas1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute13.png"] {
    background: url('../assets/images/portafolios/Hospitales\ Mágicos1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute14.png"] {
    background: url('../assets/images/portafolios/SUVIRTUAL\ EXPERIENCE\ BY\ CITROËN1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute15.png"] {
    background: url('../assets/images/portafolios/treebytree1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute16.png"] {
    background: url('../assets/images/portafolios/Parlante-digital1.png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute17.png"] {
    background: url('../assets/images/portafolios/El-parlante-latino1png') center center / cover no-repeat rgb(0, 0, 0);
}

.grid .box-cont[data-image="GraffRoute18.png"] {
    background: url('../assets/images/portafolios/TexTuAR\ -\ Diseño\ de\ interiores1.png') center center / cover no-repeat rgb(0, 0, 0);
}

/* Portafolio Servicios 2 - nuevas imágenes */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/ipuc1.png"] {
    background: url('../assets/images/portafolios-servicios2/ipuc1.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* IPUC portada */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/ipuc.png"] {
    background: url('../assets/images/portafolios-servicios2/ipuc.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* 3G Zorg */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/3G-zorg.png"] {
    background: url('../assets/images/portafolios-servicios2/3G-zorg.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* Dutch Green Solutions */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/dutch-green.png"] {
    background: url('../assets/images/portafolios-servicios2/dutch-green.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* SIS-CAT */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/sis-cat.png"] {
    background: url('../assets/images/portafolios-servicios2/sis-cat.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* Kunga */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/kunga.png"] {
    background: url('../assets/images/portafolios-servicios2/kunga.png') center center / cover no-repeat rgb(0, 0, 0);
}
/* Parlante Digital */
.grid .box-cont[data-image="assets/images/portafolios-servicios2/parlante-digital.png"] {
    background: url('../assets/images/portafolios-servicios2/parlante-digital.png') center center / cover no-repeat rgb(0, 0, 0);
}

/* Plataformas Digitales — covers nuevos */
.grid .box-cont[data-image="assets/img/Brochure - Productos/Plataformas Digitales/Cover/YIT_Yadaisa_Cover.jpg"] {
    background: url('../img/Brochure%20-%20Productos/Plataformas%20Digitales/Cover/YIT_Yadaisa_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/Plataformas Digitales/Cover/YIT_3G-Zorg_Cover.jpg"] {
    background: url('../img/Brochure%20-%20Productos/Plataformas%20Digitales/Cover/YIT_3G-Zorg_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/Plataformas Digitales/Cover/YIT_IPUC_Cover.jpg"] {
    background: url('../img/Brochure%20-%20Productos/Plataformas%20Digitales/Cover/YIT_IPUC_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/Plataformas Digitales/Cover/YIT_Siscat_Cover.jpg"] {
    background: url('../img/Brochure%20-%20Productos/Plataformas%20Digitales/Cover/YIT_Siscat_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}

/* Nuevas rutas corregidas */
.grid .box-cont[data-image="assets/img/products/VPGE_Cover.jpg"] {
    background: url('../img/products/VPGE_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/products/3GZorg_Cover.jpg"] {
    background: url('../img/products/3GZorg_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/products/Yadaisa_Cover.jpg"] {
    background: url('../img/products/Yadaisa_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/products/Sis-Cat_Cover.jpg"] {
    background: url('../img/products/Sis-Cat_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/products/Kunga_Cover.jpg"] {
    background: url('../img/products/Kunga_Cover.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/YIT_Portada_Parlante-Digital.jpg"] {
    background: url('../img/Brochure%20-%20Productos/YIT_Portada_Parlante-Digital.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/YIT_Portada_Parking Calanda.jpg"] {
    background: url('../img/Brochure%20-%20Productos/YIT_Portada_Parking%20Calanda.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/YIT_Portada_Directorio Nacional Pentecostal.jpg"] {
    background: url('../img/Brochure%20-%20Productos/YIT_Portada_Directorio%20Nacional%20Pentecostal.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-cont[data-image="assets/img/Brochure - Productos/YIT_Portada_Algo-grafico.jpg"] {
    background: url('../img/Brochure - Productos/YIT_Portada_Algo-grafico.jpg') center center / cover no-repeat rgb(0, 0, 0);
}
.grid .box-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}
.grid .box-text h2 {
    font-family: 'Sansation', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 30px;
    color: #ffffff;
    margin: 0 0 16px 0;
}
.grid .box-text p {
    font-family: 'Sansation', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: #ffffff;
    margin: 0;
}
.grid .box-cont:hover .box-text {
    opacity: 1;
}

/* Overlay verde transparente en hover */
.grid .box-cont:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(24, 48, 73, 0.8); /* azul transparente */
    z-index: 1;
    border-radius: inherit;
}
.box {
    transform: scale(0);
    position: absolute;
    background: var(--verde-gradient) !important;
    border-radius: 100%;
    will-change: transform;
    z-index: 1;
}
.multiple-col {
    grid-column: 3 / 5;
}
.multiple-row {
    grid-row: 1 / 3;
}

/* Estilos para enlaces de portafolio */
.grid a.box-cont {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.grid a.box-cont:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Segundo grid separado */
.grid-second {
    margin-top: 40px;
    margin-bottom: 80px;
}
/* Segundo grid separado */
.grid-third {
    margin-top: -65px;
    margin-bottom: 80px;
}

/* ===========================================
   MOBILE STYLES FOR PORTFOLIO GRID
   =========================================== */

/* Mobile layout: 2x3 grid (170x300px cards) */
@media (max-width: 768px) {
    .grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 300px 300px 300px !important;
        grid-gap: 15px !important;
        padding: 20px !important;
        margin-top: -60px !important;
        margin-bottom: 40px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Reset all grid positioning for mobile - Force exact size */
    .grid .box-cont {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 170px !important;
        height: 300px !important;
        max-width: 170px !important;
        min-width: 170px !important;
        margin: 0 auto !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    /* Override multiple-col and multiple-row for mobile - Force exact size */
    .grid .box-cont.multiple-col,
    .grid .box-cont.multiple-row {
        grid-column: auto !important;
        grid-row: auto !important;
        width: 170px !important;
        height: 300px !important;
        max-width: 170px !important;
        min-width: 170px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    /* Additional override for any remaining size issues */
    .grid .box-cont[data-image] {
        width: 170px !important;
        height: 300px !important;
        max-width: 170px !important;
        min-width: 170px !important;
    }
    
    /* Adjust text sizing for mobile cards */
    .grid .box-text h2 {
        font-size: 18px !important;
        margin: 0 0 8px 0 !important;
    }
    
    .grid .box-text p {
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    /* Ensure proper spacing between cards */
    .grid .box-cont:nth-child(1),
    .grid .box-cont:nth-child(2) {
        grid-row: 1 !important;
    }
    
    .grid .box-cont:nth-child(3),
    .grid .box-cont:nth-child(4) {
        grid-row: 2 !important;
    }
    
    .grid .box-cont:nth-child(5),
    .grid .box-cont:nth-child(6) {
        grid-row: 3 !important;
    }
    
    /* Column positioning */
    .grid .box-cont:nth-child(odd) {
        grid-column: 1 !important;
    }
    
    .grid .box-cont:nth-child(even) {
        grid-column: 2 !important;
    }
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    .grid {
        grid-gap: 1px !important;
        padding: 30px !important;
        margin-top: -60px !important;
    }
    
    .grid .box-cont {
        width: 150px !important;
        height: 280px !important;
        max-width: 150px !important;
        min-width: 150px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
    
    .grid .box-cont.multiple-col,
    .grid .box-cont.multiple-row {
        width: 150px !important;
        height: 280px !important;
        max-width: 150px !important;
        min-width: 150px !important;
    }
    
    .grid .box-cont[data-image] {
        width: 150px !important;
        height: 280px !important;
        max-width: 150px !important;
        min-width: 150px !important;
    }
    
    .grid .box-text h2 {
        font-size: 16px !important;
    }
    
    .grid .box-text p {
        font-size: 11px !important;
    }
}