/* ======================================================
   ARCHIVOS EXTERNOS Y TIPOGRAFÍA
   ====================================================== */

/* Opción 1 de tipografía: Clásica y Elegante
   Puedes reemplazar por otra opción si quieres */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Roboto:wght@400;700&display=swap');

/* ======================================================
   ESTILOS BASE Y PALETA DE COLORES
   ====================================================== */
body {
    /* Paleta 1: Profesional y Elegante (Azules y Grises) */
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f4f8; /* Fondo gris azulado claro */
    color: #2c3e50; /* Texto gris oscuro */
}

/* ======================================================
   MENU DE NAVEGACIÓN RESPONSIVO
   ====================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #570303;
    padding: 1rem 2rem;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    order: 1;
    padding-left: 150px; /* Le da un espacio interno de 20px al lado izquierdo */
   
}

.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.2rem;
    order: 2;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: #ffd700;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Clases que el JavaScript usará para mostrar el menú en móvil */
.navbar-menu.active {
    max-height: 300px;
}

/* ======================================================
   SECCIÓN PRINCIPAL: HERO-SECTION
   ====================================================== */
.hero-section {
    display: flex;
    min-height: 80vh;
}

.hero-left {
    order: 2; /* Texto a la derecha en PC */
    flex: 1;
    background-color: #34495e; /* Fondo oscuro para el texto */
    color: #f3faf5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-right {
    order: 1; /* Imagen a la izquierda en PC */
    flex: 1;
    background-color: #01040a; /* Fondo claro para la imagen */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-text-container {
    max-width: 500px;
    text-align: center;
}

.hero-text-container h1 {
    font-size: 2em;
    font-family: 'Playfair Display', serif; /* Aplicación de tipografía */
    margin: 0 0 10px;
}

.hero-text-container .subtitle {
    font-size: 1em;
    margin: 0;
    font-weight: bold;
}

.hero-text-container h2 {
    font-size: 1.3em;
    margin-top: 30px;
    font-family: 'Playfair Display', serif; /* Aplicación de tipografía */
}

.hero-image-container {
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 400px;
}

.hero-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(113, 233, 159, 0.2);
}

/* ======================================================
   SECCIÓN DE PROYECTOS Y TRAYECTORIA
   ====================================================== */
.projects {
    max-width: 960px;
    margin: 5px auto;
    padding: 20px;
    text-align: center;
}

.project-link {
    text-decoration: none;
    color: inherit;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.project-card {
    background-color: #ffffff;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: left;
    overflow: hidden;
}

.project-card h3,
.project-card p {
    padding: 0 15px;
    text-align: justify;
}

.project-card h3 {
    padding-top: 12px;
    margin-top: 0;
    margin-bottom: 5px; /* Reducimos el espacio entre el título y el párrafo */
}

.project-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* ======================================================
   PIE DE PÁGINA (FOOTER)
   ====================================================== */
.footer {
    padding: 20px 0;
    background-color: #34495e;
    color: #ecf0f1;
    margin-top: 20px;
    text-align: center; /* Se ha añadido text-align para centrar el contenido */
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-icons {
    margin-top: 15px;
}

.social-icons a {
    color: #ecf0f1;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: #ffd700;
}


/* ======================================================
   RESPONSIVIDAD (MÓVIL)
   ====================================================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 1.2rem;
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .hero-section {
        flex-direction: column;
    }

    .hero-right {
        order: 1; /* La imagen aparece arriba */
        padding: 40px 20px 20px;
    }
    
    .hero-left {
        order: 2; /* El texto aparece debajo */
    }

    .hero-text-container {
        text-align: center;
    }

    .hero-text-container h1 {
        font-size: 2.5em;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   ESTILOS DE REDES SOCIALES
   ====================================================== */
.social-icons {
    margin-top: 15px;
}

.social-icons a {
    color: #ecf0f1;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: #ffd700; /* Color al pasar el mouse */
}


/* ======================================================
   ESTILOS PARA PÁGINAS DE PROYECTOS
   ====================================================== */
.project-page-content {
    max-width: 1560px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.project-page-container {
    padding: 10px;
}

.project-page-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 5px;
    text-align: left; /* Centrar el título de la página */
}

.project-page-container .subtitle {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 5px;
    text-align: center; /* Centrar el subtítulo */
}

.project-details {
    display: flex;
    flex-direction: row; /* Elementos en fila por defecto (PC) */
    gap: 30px;
    align-items: flex-start; /* Alinea el inicio del texto e imágenes */
}

.text-column {
    flex: 2; /* El texto ocupará más espacio (por ejemplo, 2/3) */
    text-align: justify;
}

.image-column {
    flex: 1; /* Las imágenes ocuparán menos espacio (por ejemplo, 1/3) */
    display: flex;
    flex-direction: column; /* Las imágenes se apilan verticalmente */
    gap: 10px; /* Espacio entre las dos imágenes */
}

.image-column img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    object-fit: cover; /* Asegura que la imagen llene su espacio sin distorsión */
}

.project-details p {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
}


/* ======================================================
   RESPONSIVIDAD PARA LAS PÁGINAS DE PROYECTOS
   ====================================================== */
@media (max-width: 768px) {
    .project-details {
        flex-direction: column; /* Apila el texto y las imágenes en móviles */
        align-items: center; /* Centra los elementos apilados */
    }

    .text-column {
        order: 2; /* El texto va después de las imágenes en móvil */
        text-align: justify;
    }

    .image-column {
        order: 1; /* Las imágenes van primero en móvil */
        width: 100%; /* Las imágenes ocupan todo el ancho disponible */
    }
}