/* ESTRUCTURA GLOBAL */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

footer a:hover {
    color: #0d6efd;
    transition: color 0.3s ease;
}

/* SECTION PRINCIPAL (HERO) */
#myname {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/fondo/one.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 80vh;
    padding: 100px 0;
}

.hero-content h1 {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

#btn-translate {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

#btn-translate:hover {
    transform: scale(1.05);
}

/* NUEVA SECCIÓN: TECH STACK (TARJETAS MODERNAS) */
.skill-category-card {
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 15px;
    padding: 20px;
    height: 100%;
    transition: all 0.3s ease;
}

.skill-category-card:hover {
    border-color: #0d6efd; 
    background: rgba(13, 110, 253, 0.05);
}

.category-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 20px;
    border-left: 4px solid #0d6efd;
    padding-left: 10px;
}

.skills-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 65px; 
    transition: transform 0.3s ease;
    margin: 0; /* Limpia márgenes de figure */
}

.skill-card:hover {
    transform: translateY(-5px);
}

.icon-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.icon-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.skill-card figcaption {
    font-size: 0.7rem;
    color: #adb5bd; 
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
}

/* SECTION CONTACT (PANNING ANIMATION) */
#contact {
    position: relative;
    overflow: hidden;
    padding: 100px 0 !important;
    color: white !important;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10%; 
    width: 120%; 
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/fondo/three.jpg');
    background-size: cover;
    background-position: center;
    animation: sidePan 30s infinite alternate ease-in-out;
}

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

/* FAQ SECTION - Estilo Moderno */
#faq .accordion-item {
    background-color: rgba(255, 255, 255, 0.03); /* Fondo sutil */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

#faq .accordion-item:hover {
    border-color: #0d6efd;
    transform: translateY(-3px); /* Pequeño salto al pasar el mouse */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* El botón de la pregunta */
#faq .accordion-button {
    background-color: transparent;
    color: #ffffff;
    font-weight: 600;
    padding: 1.2rem;
    box-shadow: none; /* Quitamos la sombra azul por defecto de Bootstrap */
}

/* Cuando el acordeón está abierto */
#faq .accordion-button:not(.collapsed) {
    color: #0d6efd; /* Cambia el texto a azul */
    background-color: rgba(13, 110, 253, 0.05);
}

/* Personalizar la flecha (icono) */
#faq .accordion-button::after {
    filter: invert(1); /* Hace que la flecha sea blanca */
}

/* El cuerpo de la respuesta */
.accordion-body {
    color: #adb5bd; /* Gris claro para la respuesta */
    line-height: 1.6;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Ajuste para las tarjetas de proyectos dinámicas */
#github-projects-container .card {
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

#github-projects-container .card:hover {
    transform: translateY(-10px);
    border-color: #0d6efd !important;
}

.card-title {
    text-transform: capitalize;
}

/* Fuerza a que todas las imágenes de la galería tengan el mismo tamaño */
.custom-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Esto las hace cuadradas y simétricas */
    object-fit: cover;   /* Evita que se estiren, cortando los bordes sobrantes */
    border-radius: 12px;
}

.gallery-item {
    overflow: hidden; /* Evita que la imagen se salga del cuadro al hacer zoom */
    background-color: #1a1a1a; /* Fondo oscuro por si la imagen tarda en cargar */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Efecto opcional para que se vea "bonito" al pasar el mouse */
.gallery-item:hover .custom-img {
    transform: scale(1.08);
}

