* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

header.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-bottom: none;
    overflow: hidden;
    color: white;
    /* El parámetro ?v= fuerza al navegador a pedir la imagen de nuevo cuando cambie */
    background-image: url('../img/hero.jpg?v=1'), linear-gradient(135deg, #4a4a4a, #1a1a1a);
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

header.hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-subtitulo {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

header.hero nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

header.hero nav a {
    color: white;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

header.hero nav a:hover {
    border-color: white;
    opacity: 1;
}

header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    margin-bottom: 1rem;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
}

nav a:hover {
    opacity: 0.7;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

#filtros {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filtro {
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filtro.activo {
    background: #333;
    color: white;
    border-color: #333;
}

.proyecto {
    display: block;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: white;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.proyecto:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.proyecto h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.proyecto p {
    font-size: 0.9rem;
    color: #666;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 4rem;
    color: #888;
    font-size: 0.9rem;
}

article {
    max-width: 800px;
    margin: 0 auto;
}

article h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

article img {
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
}

article section {
    margin-bottom: 2rem;
}

article section h2 {
    font-size: 1.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: #888;
}

.breadcrumb a {
    color: #333;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}