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

/* ESTRUCTURA BASE */
html, body {
    height: 100%;         
    display: flex;         
    flex-direction: column;
}

body {
    font-family: 'Michroma', sans-serif;
    background-color: white;
    color: rgb(6, 1, 86);
    line-height: 1.8;
}

/* HEADER */
header {
    background-color: #cc0a0a;
    color: #f9f9f9;
    padding: 20px 10px;
    text-align: center;
}

header h2 {
    margin-bottom: 10px;
}

.logo {
    width: 400px;     
    height: auto;     
    display: block;
    margin: 0 auto 25px auto; 
    border-radius: 4px;  
}

/* Logo en pantallas medianas */
@media (max-width: 768px) {
    .logo {
        width: 180px;  
    }
}

/* NAVEGACIÓN */
nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav a {
    color: white;             
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    position: relative;       
    transition: color 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;              
    width: 0;
    background-color: white;      
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;            
}

nav a.active::after {
    width: 100%;               
    background-color: white;     
}

/* MAIN */
main {
    flex: 1;                
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 30px;
}

section h2 {
    color: rgb(6, 1, 86);
    margin-bottom: 10px;
}

/* Ajuste main en pantallas pequeñas */
@media (max-width: 768px) {
    main {
        margin: 10px;
        padding: 15px;
    }
}

/* GALERÍA */
.galeria {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.imagen-item {
    width: 400px;       
    height: 400px;     
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.imagen-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* PRODUCTOS */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.producto {
    background: #f4f4f4;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none;   
    color: rgb(6, 1, 86);  
    font-size: 1.1em;       
    display: block;  
    align-self: start;        
}

.producto:hover {
    transform: scale(1.05);
    background: #ffe5e5;
    color: #6b0505;  
}

.producto img {
    width: 100%;          
    max-width: 250px;        
    height: 180px;         
    object-fit: cover;      
    border-radius: 8px;       
    margin: 0 auto 10px auto;
    display: block;
}

.producto h2 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: rgb(6, 1, 86);
}

.producto h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: rgb(6, 1, 86);
}

.producto ul {
    margin-bottom: 15px;
    padding-left: 20px;
    text-align: left;
    font-weight: normal;
}


/* MISIÓN Y VISIÓN */
.titulo-mision, .titulo-vision {
    color: rgb(6, 1, 86);
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: bold;
}

.bloque {
    margin: 50px 0;
}

.contenido {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 900px;
}

.icono {
    width: 135px;
    height: auto;
}

hr {
    border: 0;
    border-top: 2px solid #ddd;
    margin: 50px 0;
}

/* HISTORIA */
.historia-img {
    width: 300px;   
    height: 200px;  
    object-fit: cover; 
    border-radius: 10px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
}

@media (max-width: 768px) {
    .historia-bloque .contenido {
        flex-direction: column; 
        align-items: center;   
    }

    .historia-bloque .contenido p {
        text-align: justify;    
    }

    .historia-bloque .contenido img {
        width: 100%;           
        max-width: 300px;       
        height: auto;
        margin-bottom: 15px;   
    }
}

/* UBICACIÓN */
.ubicacion-contenedor {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.ubicacion-item {
    text-align: center;
}

.ubicacion-item a {
    text-decoration: none;   
    color: rgb(6, 1, 86);            
    font-weight: bold;
    display: inline-block; 
}

.ubicacion-item a:hover {
    color: #1a73e8;         
    transform: scale(1.05);  
}

.ubicacion-img {
    width: 100px;
    height: 100px;
    object-fit: contain; 
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}

.ubicacion-img:hover {
    transform: scale(1.05);
}

.ubicacion-item p a {
    text-decoration: none;
    color: #000; 
    font-weight: bold;
}

.ubicacion-item p a:hover {
    color: #1a73e8; 
}

/* PRODUCTOS Y SERVICIOS */
.productos-servicios {
    margin-top: 20px;
}

.ps-contenedor {
    display: flex;
    gap: 30px;
    flex-wrap: wrap; 
    justify-content: space-between;
}

.ps-bloque {
    flex: 1;
    min-width: 320px;
    background: #f4f4f4;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.ps-item {
    background: white;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-weight: bold;
    color: rgb(6, 1, 86);
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ps-item:hover {
    transform: scale(1.05);
    background: #ffe5e5;
    color: #6b0505;
}

.productos-servicios .ps-bloque:nth-child(2) h3 {
    margin-bottom: 15px;
}

/* LAMINAS */
.galeria-laminas {
    display: flex;
    justify-content: center; 
    gap: 20px; 
    flex-wrap: wrap; 
    padding: 20px;
}

.galeria-laminas img {
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.galeria-laminas img:hover {
    transform: scale(1.05);
}

/* BOTÓN WHATSAPP */
.btn-whatsapp {
    display: inline-block;
    background-color: #25d366;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-whatsapp:hover {
    background-color: #1ebd5a;
    transform: scale(1.05);
}

/* FOOTER */
footer {
    text-align: center;
    background-color: #cc0a0a;
    color: white;
    padding: 15px 0;
    font-size: 0.9em;
}

/* MEDIA QUERIES GENERALES */
@media (max-width: 768px) {
    nav {
        flex-direction: row;
        gap: 10px;
    }

    .logo {
        width: 180px;
    }
}
