* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #1a1a1a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}
/*mas comentarios*/
/* Header actualizado */
.header {
    max-width: 1200px;
    background-color: #252525;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0 auto;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* Sección izquierda: Avatar + Info */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background-color: #404040;
    background-image: url('https://godev.red5.cl/src/img/gogowar.jpg');
    background-size: cover;
    background-position: center;
    border: 3px solid #4a4a4a;
}

.name {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.page-title {
    font-size: 2rem;
    font-weight: 400;
    color: #b3b3b3;
}

/* Menú desktop (oculto en móvil) */
.super-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 600px;
}

.menu {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    width: 100%;
}

.menu-item {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.menu-item:hover,
.menu-item.active {
    color: white;
}

.menu-item i {
    font-size: 1.4rem;
}

/* Iconos sociales */
.action-area {
    width: 100%;
    padding: 10px 0;
    margin-top: -10px;
    margin-right: 18px;
}

.social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    width: 100%;
}

.social-icons a {
    color: #b3b3b3;
    transition: color 0.3s;
}
/*
.social-icons a:hover {
    color: white;
} */
.social-icons .fab.fa-github {
    font-size: 1.4rem;

}

.social-icons a:hover .fab.fa-github {
    color: #ffffff;
}

.social-icons .fa-facebook {
    width: 28px;
    font-size: 1.4rem;
    transition: filter 0.3s;
    /* transform: translateY(-2px); *//* Mueve el ícono 2px hacia arriba */
}

.social-icons a:hover .fa-facebook {
    color: #3358ff;
}


.social-icons .fab.fa-instagram {
    font-size: 1.5rem;
}

.social-icons a:hover .fab.fa-instagram {
    color: #d633ff;
}

.social-icons .fab.fa-tiktok{
    font-size: 1.3rem;
    margin-top: 2px;
}

.social-icons a:hover .fab.fa-tiktok{
    color: #f5f5f5;
}

.social-icons .fa-phone {
    font-size: 1.3rem;
    margin-top: 2px;
}

.social-icons a:hover .fa-phone {
    color: #ffdd48;
}

.social-icons .whatsapp-icon {
    width: 22px;
    height: auto;
    margin-top: 1px;
    filter: brightness(0.7) grayscale(1);
    transition: filter 0.3s;
}

.social-icons a:hover .whatsapp-icon {
    filter: brightness(1) grayscale(0);
}

.social-icons .telegram-icon {
    width: 22px;
    height: auto;
    margin-top: 1px;
    filter: brightness(0.7) hue-rotate(10deg) saturate(0.5);
    transition: filter 0.3s;
}

.social-icons a:hover .telegram-icon {
    filter: brightness(1) grayscale(0);
}

/* === Botón hamburguesa (solo en móvil) === */
.hamburger {
    display: none; /* Oculto por defecto */
    flex-direction: column;
    gap: 5px;
    width: 30px;
    cursor: pointer;
}

.hamburger-line {
    height: 3px;
    background: #b3b3b3;
    border-radius: 2px;
}

/* === Menú móvil desde la derecha === */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -330px; /* Oculto a la derecha */
    width: 290px;
    height: 100vh;
    background: #252525;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    padding: 80px 20px 40px;
    z-index: 100;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 30px;
}


.mobile-menu.open {
    right: 0; /* Se desliza desde la derecha */
}

.mobile-menu .menu {
    flex-direction: column;
    justify-content: flex-end;
    gap: 25px;
    width: 90%;  
}

.mobile-menu .menu-item {
    font-size: 1.2rem;
    align-items: flex-end;
    gap: 8px;
}

.mobile-menu .menu-item i {
    font-size: 1.2rem;
}

.mobile-menu .social-icons {
    justify-content: center;
    gap: 1.8rem;
    margin-top: 20px;
}

.mobile-menu .social-icons a {
    font-size: 1.6rem;
}

.mobile-menu .social-icons .whatsapp-icon {
    width: 30px;
    margin-top: 4px;
}

.mobile-menu .social-icons .telegram-icon {
    width: 30px;
    margin-top: 4px;
}
/* Overlay oscuro */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    transition: opacity 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.overlay.show {
    display: block;
    opacity: 1;
}

/* Responsive: Mostrar solo en móviles */
@media (max-width: 768px) {
    .header {
        padding: 15px;
    }

    .avatar {
        width: 70px;
        height: 70px;
    }

    .name {
        font-size: 1.3rem;
    }

    .page-title {
        font-size: 1.6rem;
    }

    /* Ocultar menú desktop */
    .super-menu {
        display: none;
    }

    /* Mostrar hamburguesa */
    .hamburger {
        display: flex;
    }
}


/* Main Content */  
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0px;
}  

/* Filter Categories */
.filter-container {
display: flex;
gap: 18px;
flex-wrap: wrap;
margin-top: 20px;
margin-bottom: 20px;
justify-content: center;
}

.filter-btn {
    background-color: #404040;
    color: #b3b3b3;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}
.filter-btn:hover {
    background-color: #5a5a5a;
    color: white;
}
.filter-btn.active {
    background-color: #ff7b00;
    color: white;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
}
.portfolio-item {
    aspect-ratio: 1;
    background-color: #404040;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    color: #ddd;
    font-size: 0.85rem;
    text-align: center;
    padding: 15px;
}

.portfolio-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    z-index: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-image {
    opacity: 0.8;
}

.portfolio-item span {
    position: relative;
    z-index: 1;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}
.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}
.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.portfolio-item:hover::before {
    opacity: 1;
}
.portfolio-item .category-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    text-transform: uppercase;
    z-index: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 20px;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
.modal-content {
    background: #252525;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    padding: 0;
    margin: 0;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5);
    border: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}
.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

/* Estilos para los botones de navegación */
.modal-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.nav-btn {
    background-color: rgba(51, 51, 51, 0.6);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
    backdrop-filter: blur(2px);
}

.nav-btn:hover {
    background-color: rgba(85, 85, 85, 0.8);
}

.prev-btn {
    padding-left: 12px;
}

.next-btn {
    padding-right: 12px;
}
.modal-image {
    width: 100%;
    height: 400px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
    background: #111;
    position: relative;
}
.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    padding: 0;
    margin: 0;
    display: block;

}
.modal-image h3 {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.6rem;
    color: #ffffff;
    z-index: 10;
    /* background: rgba(37, 37, 37, 0.9); */
    padding: 10px 15px;
    /* border-radius: 8px; 
    backdrop-filter: blur(5px); */
    margin: 0;
}

/* Estilos para los botones de navegación en la imagen */
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.25);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.image-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.prev-image-btn {
    left: 10px;
}

.next-image-btn {
    right: 10px;
}
.modal-text {
    width: 96%;
    display: flex;
    flex-direction: column;
    min-height: 0px;
    padding: 15px;
    margin: 0 auto 10px auto;
    /* justify-content: space-between; 
    margin-bottom: 0px; */
}
.modal-text p {
    line-height: 1.7;
    color: #cccccc;
    font-size: 1rem;
    margin-bottom: 0px;
}

/* Estilos para la sección inferior del modal */
.modal-bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px; 
    margin-top: 0px;
    margin-bottom: 20px;
    padding-top: 0px;
}

/* Estilos para la sección de tecnologías */
.technologies-section {
    flex: 1;
}

.technologies-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff4f4;
    font-weight: 600;
}

.technologies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.technology-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.technology-icon:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.1);
}

.technology-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Estilos para el botón de enlace del proyecto */
.project-link-section {
    flex-shrink: 0;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fdfcfc;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 400;
    transition: all 0.3s ease;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-link-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

.project-link-btn i {
    font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 769px) {
    .modal-content {
        max-width: 1200px;
        width: 92%;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }
    .modal-image {
        height: 600px;
    }
    .modal-text {
        padding: 15px;
        flex: 1;
        overflow: visible;
        /* min-height: 250px; */
    }
    .modal-image h3 {
        font-size: 2rem;
        /* top: 25px; */
        left: 25px;
        /* padding: 12px 18px; */
    }
    .modal-text p {
        font-size: 1.1rem;
        line-height: 1.8;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: row;
        text-align: left;
        gap: 15px;
        padding: 15px;
    }
    .avatar {
        width: 60px;
        height: 60px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 0 10px;
    }
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    /* Modal en móvil */
    .modal-content {
        flex-direction: column;
        max-width: 95%;
        max-height: 95vh;
        overflow-y: auto;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;;
    }
    .modal-image {
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-bottom-left-radius: 0px;
        border-bottom-right-radius: 0px;;
        height: auto;
        width: 100%;
        padding: 0;
        margin: 0;
        overflow: hidden;
        position: relative;
        left: 0;
    }
    
    .modal-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
        object-position: top left;
        padding: 0;
        margin: 0;
        display: block;
    }
    
    .modal-image h3 {
        position: absolute;
        top: 15px;
        left: 15px;
        font-size: 1.3rem;
        padding: 8px 12px;
    }
    
    /* Estilos para el acordeón en móvil */
    .modal-text-container {
        width: 100%;
        margin-top: 0;
        position: relative;
        z-index: 10;
        padding-bottom: 6px;
    }

    /* Botón de acordeón oculto por defecto */
    .accordion-toggle {
        display: none; /* Oculto por defecto en escritorio y tablet */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 6px 15px;
        background-color: #333;
        border: none;
        color: white;
        font-size: 1rem;
        text-align: left;
        cursor: pointer;
        border-top: 1px solid #444;
        position: sticky;
        top: 0;
    }
    
    /* Mostrar el botón en móvil */
    @media (max-width: 768px) {
        .accordion-toggle {
            display: flex;
        }
    }

    .accordion-toggle i {
        transition: transform 0.3s ease;
    }

    .accordion-toggle.active i {
        transform: rotate(180deg);
    }

    .modal-text {
        width: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        background-color: #252525;
    }

    .modal-text.active {
        max-height: 1000px;
        padding: 15px;
        overflow-y: auto;
    }
    
    /* Ajustes para la sección inferior en móvil */
    .modal-bottom-section {
        flex-direction: row;
        gap: 20px;
        margin-top: 20px;
        align-items: flex-end;
        justify-content: space-between;
    }
    
    .technologies-section {
        flex: 1;
        text-align: left;
    }
    
    .project-link-section {
        flex-shrink: 0;
        text-align: right;
    }
    
    /* Ajustes para tecnologías en móvil */
    .technologies-grid {
        gap: 8px;
    }
    
    .technology-icon {
        width: 35px;
        height: 35px;
    }
    
    .technologies-section h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    /* Ajustes para el botón de enlace en móvil */
    .project-link-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .project-link-btn i {
        font-size: 0.8rem;
    }
}
    /* Solo reorganización en 2 filas - sin modificar estilos visuales */
.mobile-social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: inherit; /* Mantiene el gap original */
}

/* Solo aplicar en móvil */
/* Ajustar tamaños específicos para móvil */
@media (max-width: 768px) {
.mobile-social-grid {
display: grid !important;
grid-template-columns: repeat(3, 1fr) !important;
grid-template-rows: repeat(2, 1fr) !important;
gap: 10px !important;
justify-items: right !important;
align-items: center !important;
}

.mobile-social-grid a {
display: flex !important;
justify-content: center !important;
align-items: center !important;
text-decoration: none !important;
}

/* Tamaño específico para iconos de font awesome */
.mobile-social-grid .fab,
.mobile-social-grid .fas {
font-size: 24px !important; /* Tamaño fijo para móvil */
}

/* Tamaño específico para WhatsApp */
.mobile-social-grid .whatsapp-icon {
width: 24px !important; /* Mismo tamaño que los otros iconos */
height: 24px !important;
}
}

/* En desktop mantener todo original */
@media (min-width: 769px) {
.mobile-social-grid {
display: flex !important;
flex-direction: row !important;
}
}

/* Visibilidad acordeón e icono ojo solo en móvil */
.accordion-toggle {
    display: none;
}

#toggleIcon {
    display: none;
}

@media (max-width: 768px) {
    .accordion-toggle {
        display: flex;
    }
    #toggleIcon {
        display: inline-block;
    }
}

@media (min-width: 769px) {
    .accordion-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 4px 12px;
        background-color: #333;
        border: none;
        color: white;
        font-size: 0.95rem;
        text-align: left;
        cursor: pointer;
        border-top: 1px solid #444;
        position: sticky;
        top: 0;
    }
    #toggleIcon {
        display: inline-block;
    }
    .modal-text-container {
        width: 100%;
        margin-top: 0;
        position: relative;
        z-index: 10;
        padding-bottom: 0;
    }
    .modal-text {
        width: 100%;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        background-color: #252525;
    }
    .modal-text.active {
        max-height: 1000px;
        padding: 15px;
        overflow-y: auto;
    }
}