/* =====================================================================
   base.css — Estilos Para Header, Body, Main, Footer, Layout de cajas. 
   ===================================================================== */
*, *::before, *::after{
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Evita el scroll horizontal innecesario */
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header ---*/
header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
}

header nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

header nav a:hover {
    text-decoration: underline;
}

/* --- Main --- */

main {
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    width: 95%;
}

/* --- Footer  --- */
footer {
    text-align: center;
    padding: 1rem;
    background: #2c3e50;
    color: white;
}

.footer-content {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}
.footer-content span{
    display: inline-flex;
    align-items: center;
    height: 24px;
    margin: 0;
}
.footer-content img {
    height: 24px;
    width: 24px;
    display: block;
    position: relative;
    top: 0px;
}


/* --- Indentaciones --- */

.ident_1 {
    margin-left: 2rem;
}
.ident_2{
    margin-left: 4rem;
}

/* --- Layouts de página --- */


/* Contenedor principal que pone el texto y la cajita lado a lado en home */
.home-layout {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Lo mismo en cv pero con difrencias (columns a la misma altura)*/

.cv-layout{
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
}

/* El bloque de texto ocupa casi el triple de espacio */
.main-text {
    flex: 2.8;
    background: white;
    border-radius: 8px;
    padding: 25px;
    min-height: 640px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
}

.main-text h1,
.main-text h2,
.main-text h3{
    font-size: 3em;
    margin-bottom: 1rem;
    color: #1e293b;
}

.main-text p {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #333;
}

/* La cajita lateral derecha en Home y la izquierda de CV */
.server-info-card,.cv-info-card {
    flex: 1.2;
    background: #34495e;
    color: #f8fafc;
    border : 2px solid #475569;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.sub-section-title {
    font-size: 1rem;
    font-weight: bold;
    color: #f8fafc;
    border-bottom: 1px solid #475569;
    padding-bottom: 6px;
    margin: 20px 0 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 0.9rem;
}

.info-label {
    font-weight: 650;
    color: #75b3ff;
}

.info-value {
    font-weight: 900;
    color: #1168d3;
    font-family: monospace;
}

/*Email link*/
.email-link {
    color: inherit;
    text-decoration: none;
}

.email-link:hover {
    color: inherit;
    text-decoration: underline;
}


/* --- Diseño Responsivo para Móviles --- */
@media (max-width: 768px) {
    main{
        padding: 1rem 0.5rem;
        width: 100%;
    }

    .home-layout {
        flex-direction: column !important;
        gap: 20px;
    }
    .cv-layout{
        flex-direction: column !important;
        gap: 20px;
    }
    .main-text,
    .server-info-card, .cv-info-card {
        width: 100% !important;
    }
}
