/* Estilo Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: "Arial", sans-serif;
    background-color: #121212;
    color: #f4f4f9;
    line-height: 1.6;
}

a {
    color: #1da1f2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Barra de Navegación */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #1f1f1f;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}


nav .logo {
    margin-left: 25%;
    color: #f4f4f9;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    font-weight: bold;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  }
  
  nav .logo span {
    line-height: 1.2;
  }

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #f4f4f9;
    font-size: 1em;
    text-transform: uppercase;
}

nav ul li a:hover {
    color: #1da1f2;
}

/* Menú de navegación para dispositivos móviles */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .bar {
    background-color: #f4f4f9;
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        background: #1f1f1f;
        width: 100%;
        flex-direction: column;
        padding: 10px 0;
    }

    nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    nav .logo {
        margin-left: 10%;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul.active {
        display: flex;
    }
}

/* Cabecera */
header {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: url("images/HeaderBackground.jpg") no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0) 25%,
            rgba(0, 0, 0, 0) 75%,
            rgba(0, 0, 0, 0.8)
        ),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    z-index: 1;
    pointer-events: none;
}

header .content {
    position: relative;
    z-index: 2;
    text-align: center;
}

header h1 {
    font-size: 3em;
    color: #f4f4f9;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

header p {
    font-size: 1.2em;
    color: #ddd;
}

/* Contenedor Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

section {
    margin: 40px 0;
    text-align: justify;
}

section h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #f4f4f9;
}

section p {
    color: #aaa;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Proyectos */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.project-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* Pie de Página */
footer {
    background: #121212;
    color: #f4f4f9;
    padding: 20px 0;
    text-align: center;
}

footer a {
    color: #1da1f2;
}

footer a:hover {
    color: #f4f4f9;
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

footer .social-links a {
    width: 40px;
    height: 40px;
}

footer .social-links img {
    width: 100%;
    height: 100%;
    filter: invert(1);
    transition: transform 0.3s ease, filter 0.3s ease;
}

footer .social-links a:hover img {
    transform: scale(1.1);
    filter: invert(1) brightness(1.2);
}

/* Selector de idioma */
#language-selector {
    display: flex;
    gap: 10px;
    cursor: pointer;
}

#language-selector .flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

#language-selector .flag:hover {
    transform: scale(1.1);
}

/* Estilos para la sección de Contacto */
#contact {
    text-align: center;
}

#contact form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #1f1f1f;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#contact form input, 
#contact form textarea {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #f4f4f9;
    color: #333;
    font-size: 1em;
}

#contact form button {
    padding: 12px 20px;
    border: none;
    background: #1da1f2;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 5px;
}

#contact form button:hover {
    background: #0d89bf;
}

/* Mensaje de éxito */
#success-message {
    display: none;
    text-align: center;
    font-size: 1.5em;
    color: #fff;
    background-color: #28a745;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    animation: fadeIn 2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
