/* Paleta de colores */
:root {
    --primary-color: #001F3F; /* Azul oscuro */
    --secondary-color: #3A6D8C; /* Azul medio */
    --accent-color: #6A9AB0; /* Azul claro */
    --highlight-color: #EAD8B1; /* Beige claro */
    --text-color: #333333; /* Texto principal */
}

/* Estilos generales */
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: #ffffff; /* Fondo blanco */
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--primary-color); /* Azul oscuro para títulos */
}

p, li {
    font-weight: 400;
    color: var(--text-color);
    font-size: 0.9rem; /* Texto ligeramente más pequeño */
}

a {
    color: var(--secondary-color); /* Azul medio */
}

a:hover {
    color: var(--accent-color); /* Azul claro */
    text-decoration: none;
}



/* Secciones */
section {
    padding: 50px 0;
}

section h2 {
    font-size: 1.6rem; /* Título más pequeño */
    color: var(--primary-color); /* Azul oscuro */
}

section p {
    font-size: 0.9rem; /* Texto reducido */
    color: var(--text-color);
    line-height: 1.5;
}

/* Sección destacada (con fondo beige claro) */
.highlight-section {
    background-color: var(--highlight-color); /* Fondo beige claro */
    padding: 50px 0;
}

/* Estilos para las tarjetas en la sección de habilidades */
#skills .card-title {
    color: var(--secondary-color); /* Azul medio */
    font-weight: 700;
    margin-bottom: 10px;
}

#skills .card-text {
    color: var(--text-color);
}

/* Estilos de la línea de tiempo vertical con tarjetas */
.timeline {
    position: relative;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--accent-color); /* Azul claro */
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.timeline-item .timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color); /* Azul oscuro */
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    z-index: 2;
}

.timeline-item .timeline-content {
    width: 45%;
    padding: 0 20px;
}

.timeline-item:nth-child(odd) .timeline-content {
    order: 1;
    text-align: right;
    padding-right: 25px;
}

.timeline-item:nth-child(even) .timeline-content {
    order: 1;
    text-align: left;
    padding-left: 25px;
}

.timeline-item .timeline-year {
    font-size: 1.2rem; /* Ajuste de tamaño para móviles */
    font-weight: bold;
    color: var(--primary-color); /* Azul oscuro */
    margin-bottom: 10px;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-item:nth-child(odd) .timeline-icon {
    left: calc(50% - 2px);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: calc(50% - 2px);
}

/* Ajustes para móviles */
@media (max-width: 767px) {
    .timeline::before {
        left: 20px;
    }
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 60px; /* Mayor margen para mejorar espaciado */
    }
    .timeline-item .timeline-icon {
        left: 20px;
        transform: none;
        margin-bottom: 25px; /* Mayor separación entre el icono y la tarjeta */
    }
    .timeline-item .timeline-year {
        margin-bottom: 25px; /* Mayor espacio entre el año y la tarjeta */
        font-size: 1rem; /* Tamaño del año ajustado para móviles */
        margin-left: 20px; /* Alineado con la línea de tiempo */
    }
    .timeline-item .timeline-content {
        width: 100%;
        padding: 10px 20px;
        text-align: left;
        margin-bottom: 25px; /* Separación entre la tarjeta y el siguiente elemento */
    }
}

/* Animación para los elementos de la línea de tiempo */
.timeline-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Ajustes de tamaño para móviles */
@media (max-width: 576px) {
    #header .display-4 {
        font-size: 1.6rem;
    }
    
    section h2 {
        font-size: 1.4rem;
    }

    section p {
        font-size: 0.8rem;
    }

    .timeline-item .timeline-year {
        font-size: 1rem;
    }

    .timeline-item .timeline-content {
        font-size: 0.8rem;
    }
}

 .flip-card {
        background-color: transparent;
        width: 100%;
        height: 250px;
        perspective: 1000px; /* Controla la profundidad del efecto 3D */
        margin-bottom: 20px;
    }

    .flip-card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        text-align: center;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }

    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }

    .flip-card-front, .flip-card-back {
        position: absolute;
        width: 100%;
        height: 100%;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
    }

    .flip-card-front {
        background-color: var(--highlight-color); /* Beige claro */
        color: var(--primary-color); /* Azul oscuro */
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        border: 2px solid var(--secondary-color); /* Azul medio */
    }

    .flip-card-back {
        background-color: var(--primary-color); /* Azul oscuro */
        color: white;
        transform: rotateY(180deg);
        font-size: 1rem;
        padding: 20px;
        border: 2px solid var(--secondary-color); /* Azul medio */
    }

    .flip-card-back h5 {
        color: var(--highlight-color); /* Beige claro */
    }


  @keyframes slideIn {
        from {
            transform: translateY(50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Animación solo para móviles */
    @media (max-width: 768px) {
        .animate-card {
            animation: slideIn 0.8s ease-out;
        }
    }
    


/* Animación del ancho de la barra de progreso */
.progress-bar.animated {
    transition: width 3.0s ease-in-out;
}


/* Estado inicial (invisible y desplazado) */
.animate-item {
    opacity: 0;
    transform: translateY(50px); /* Desplazamiento inicial */
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Estado visible */
.section-visible .animate-item {
    opacity: 1;
    transform: translateY(0);
}

/* Ajustes en dispositivos móviles */
@media (max-width: 576px) {
    .animate-item {
        transform: translateY(30px); /* Menor desplazamiento en móviles */
    }
}
