/* ====================== Reset básico ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================== Fondo global ====================== */
body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a; /* fondo oscuro elegante */
    color: #f4f4f4;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ====================== Encabezado ====================== */
header {
    background: linear-gradient(135deg, #900f0f, #c41313); /* estilo rústico/casino */
    color: #f4f4f4;
    text-align: center;
    padding: 25px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); 
    position: relative;
    z-index: 900;
}

header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #191406; /* dorado */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    font-family: 'Georgia', serif;
}

/* ====================== Navegación ====================== */
nav {
    background: #2a2a2a;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #c49b3d;
}

nav a {
    color: #f5d77d;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.4s ease;
}

nav a:hover,
nav a.active {
    background: #c49b3d;
    color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ====================== Logo circular fijo ====================== */
.imagen-circular {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    position: fixed;
    top: 15px;
    right: 15px;
    border: 3px solid #c49b3d;
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
    background: #fff;
    z-index: 2000;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.imagen-circular:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 22px rgba(0,0,0,0.8);
}

/* ====================== Imagen principal debajo del encabezado ====================== */
.imagen-debajo-header {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.imagen-principal {
    width: 85%;
    max-width: 1000px;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.6);
    transition: transform 0.5s ease;
}

.imagen-principal:hover {
    transform: scale(1.05);
}

/* ====================== Secciones ====================== */
section {
    padding: 70px 25px;
    background: #262626;
    margin: 70px auto;
    border-radius: 14px;
    border: 2px solid #c49b3d;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
    max-width: 1200px;
    animation: fadeIn 1s ease;
}

section h2 {
    font-size: 2.4rem;
    color: #f5d77d;
    margin-bottom: 25px;
    text-align: center;
    letter-spacing: 1px;
}

section p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
    text-align: center;
}

/* ====================== Apartados de materiales ====================== */
.apartado {
    margin: 60px auto;
    padding: 35px 25px;
    border-radius: 12px;
    background: #2a2a2a;
    border: 2px solid #c49b3d;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    max-width: 1300px;
    animation: fadeIn 1s ease;
}

.apartado h3 {
    font-size: 2rem;
    color: #f5d77d;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Cinzel', serif;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* ====================== Galería de materiales ====================== */
.galeria-materiales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-top: 40px;
    padding: 0 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.galeria-materiales img {
    width: 100%;
    max-width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid #c49b3d;
    box-shadow: 0 8px 18px rgba(0,0,0,0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.3s ease;
    filter: brightness(0.9);
    background: transparent;
}

.galeria-materiales img:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 28px rgba(0,0,0,0.8);
    filter: brightness(1);
}

/* ====================== Galería de productos ====================== */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* igual que materiales */
    gap: 25px;
    justify-items: center;
    margin-top: 40px;
    padding: 0 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.galeria img {
    width: 100%;
    max-width: 280px;
    height: 200px;
    object-fit: cover; /* igual que materiales */
    border-radius: 14px;
    border: 2px solid #c49b3d;
    box-shadow: 0 8px 18px rgba(0,0,0,0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease, filter 0.3s ease;
    filter: brightness(0.9);
    background: transparent;
}

.galeria img:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 28px rgba(0,0,0,0.8);
    filter: brightness(1);
}

/* ====================== Animación fadeIn ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================== Footer ====================== */
footer {
    background: linear-gradient(135deg, #900f0f, #c41313);
    color: #f4f4f4;
    text-align: center;
    padding: 25px 15px;
    border-top: 3px solid #c49b3d;
    font-size: 1rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.4);
}

footer p {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}