/* ======== RESET GENERAL ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    scroll-behavior: smooth;
    background-color: #f5f5f5;
}

/* ======== HEADER ======== */
header {
    background-color: #423834;
    color: #A9A4C9;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

header h1 {
    font-size: 26px;
    letter-spacing: 1px;
    animation: fadeInDown 1.3s ease;
}

/* ======== MENÚ ======== */
nav ul {
    list-style: none;
    display: flex;
    position: relative;
}

nav > ul > li > a {
    text-decoration: none;
    color: #A9A4C9;
    padding: 12px 18px;
    display: block;
    font-size: 16px;
    transition: 0.3s ease;
}

nav > ul > li > a:hover {
    color: white;
    transform: scale(1.05);
}

/* Submenú */
.submenu {
    position: absolute;
    background: #333;
    display: none;
    flex-direction: column;
    min-width: 150px;
    margin-top: 5px;
    border-radius: 5px;
    overflow: hidden;
    animation: fadeIn 0.4s ease forwards;
}

.submenu li a {
    color: white;
    padding: 12px;
    transition: 0.3s ease;
}

.submenu li a:hover {
    background-color: #A9A4C9;
    color: black;
}

nav ul li:hover .submenu {
    display: flex;
}

/* ======== SECCIONES ======== */
section {
    padding: 90px 40px;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    margin-bottom: 15px;
    font-size: 32px;
    color: #A9A4C9;
    position: relative;
    display: inline-block;
    animation: fadeInDown 1s ease;
}

h2::after {
    content: "";
    width: 60px;
    height: 4px;
    background: #423834;
    position: absolute;
    left: 0;
    bottom: -8px;
    border-radius: 1px;
    animation: slideIn 1s ease;
}

p, li {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
}

/* ======== FONDOS DE SECCIONES ======== */
#inicio { background: linear-gradient(to bottom right, #f9f9f9, #ececec); }
#servicios { background: linear-gradient(to bottom right, #e8e8e8, #dcdcdc); }
#proyectos { background: linear-gradient(to bottom right, #d4d4d4, #c8c8c8); }
#contacto { background: linear-gradient(to bottom right, #c2c2c2, #b6b6b6); }

/* PARALLAX */
.parallax {
    background-image: url('https://images.unsplash.com/photo-1581091226825-c3e89cd3a8ea?auto=format&fit=crop&w=1350&q=80');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    height: 350px;
    margin-bottom: 40px;
    box-shadow: inset 0 0 80px rgba(0,0,0,0.5);
    animation: fadeIn 2s ease;
}

/* ======== ANIMACIONES ======== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-25px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 60px; }
}
