/* Variables de colores para facilitar la edición */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333;
    --text-light: #777;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezado y navegación */
header {
    background-color: var(--secondary-color);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Secciones principales */
main {
    padding-top: 100px;
}

section {
    padding: 80px 0;
    min-height: 100vh;
    display: none;
}

section.active {
    display: block;
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

h3 {
    font-size: 1.5rem;
    margin-top: 30px;
}

p {
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.btn:hover {
    background-color: #2980b9;
}

/* Sección Home */
#home {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    overflow: hidden; /* Evita que el video sobresalga */
    padding: 20px;
    margin-top: 1rem;
}

/* Video de fondo */
#background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Contenedor del contenido */
.content {
    background-color: rgba(0, 0, 0, 0.6); /* Fondo oscuro semitransparente */
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    color: white;
    display: inline-block;
    max-width: 800px;
    display: inline-block;
    margin-top: 250px; 
  }
  

/* Estilos del título */
#home h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

/* Estilos del párrafo */
#home p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 20px;
}


/* Sección Sobre Mí */
.about-container {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.about-img {
    flex: 1;
    min-width: 300px;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.skills {
    margin-top: 30px;
}

.skills ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.skills li {
    background-color: #f3f3f3;
    padding: 10px 15px;
    border-left: 5px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.skills li:hover {
    transform: scale(1.02);
    background-color: #eaeaea;
}


/* Sección Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-top: 0;
}

/* Sección Curriculum */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    margin-top: 0;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -12px;
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.year {
    color: var(--primary-color);
    font-weight: bold;
}

/* Sección Contacto */
.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-right: 15px;
    font-size: 1.2rem;
}

form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    height: 150px;
    resize: vertical;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* Pie de página */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 20px 0;
}

.social-links li {
    margin: 0 15px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.email-link {
    color: #5ea4f5;
    text-decoration: none;
    transition: color 0.3s;
}

.email-link:hover {
    color: #2a6496;
    text-decoration: underline;
}

.telefono-link {
    color: #5ea4f5;
    text-decoration: none;
    transition: color 0.3s;
}

.telefono-link:hover {
    color: #2a6496;
    text-decoration: underline;
}

.derecho-text {
    margin-top: 15px;
    line-height: 1.6;
}

.social-networks-title {
    font-weight: bold;
    font-size: 1.2em;
}

/* Añade estas reglas a tu archivo CSS (styles.css) */

/* Estilos generales para las secciones */
section {
    padding: 80px 0;
    min-height: 100vh;
    display: none;
}

section.active {
    display: block;
}

/* Animaciones de transición para SPA */
main {
    transition: opacity 0.3s ease;
}

/* Estilos para la "página" activa */
.nav-item.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 3px;
}

/* Asegurarse que todas las "páginas" tengan altura completa */
section {
    min-height: calc(100vh - 100px);
}

/* Hacer que el contenido principal tenga un padding-top más específico */
main {
    padding-top: 80px; /* Ajustar según la altura de tu encabezado */
}


/* Estilos para los mensajes del formulario */
#form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 5px;
    text-align: center;
}

#form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#form-message.hidden {
    display: none;
}


/* Responsive */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        background-color: var(--secondary-color);
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transition: left 0.3s;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 20px;
    }
}