/* General */
:root {
    --color-dark-gray: #2c3e50;
    --color-medium-gray: #34495e;
    --color-light-bg: #f8f8f8;
    --color-white: #ffffff;
    --color-accent-blue: #3498db;
    --color-accent-blue-dark: #2980b9;
    --color-imam-red: #B10000; /* ROJO MÁS INTENSO */
    --color-imam-green: #008000; /* VERDE MÁS VIBRANTE */
    --font-serif: 'Lora', serif;
    --font-sans-serif: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans-serif);
    line-height: 1.6;
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Header */
header {
    background-color: var(--color-dark-gray);
    color: var(--color-white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white); /* Color base para el logo, sobreescrito por clases */
}

/* Colores específicos para el logo */
.logo .logo-c,
.logo .logo-i {
    color: var(--color-imam-red);
}

.logo .logo-green {
    color: var(--color-imam-green);
}

/* ANIMACIÓN PARA EL LOGO */
@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-animated {
    opacity: 0; /* Oculto al inicio */
    animation: logoFadeIn 1s ease-out forwards; /* Aplica la animación al cargar */
    animation-delay: 0.2s; /* Un pequeño retraso para que no aparezca de golpe */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-accent-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(52, 152, 219, 0.7)), url('https://source.unsplash.com/random/1920x1080/?modern-bathroom,kitchen-showroom,industrial-design') no-repeat center center/cover;
    background-attachment: fixed; /* Parallax effect */
    color: var(--color-white);
    text-align: center;
    padding: 10rem 0 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 80vh; /* Para que ocupe más pantalla */
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 4.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5); /* Sombra para mejor lectura */
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.btn {
    display: inline-block;
    padding: 18px 45px;
    background: var(--color-accent-blue);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.6s forwards;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: var(--color-accent-blue-dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.4);
}

/* Sections General */
.section-padded {
    padding: 6rem 0;
}

.section-title {
    font-family: var(--font-serif);
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 4rem;
    color: var(--color-dark-gray);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background: var(--color-accent-blue);
    margin: 1.5rem auto 0;
    border-radius: 3px;
}

.bg-light {
    background-color: var(--color-light-bg);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.content-wrapper p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--color-medium-gray);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    color: white; /* Color del texto sobre la imagen de fondo */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8); /* Sombra para el texto */
    overflow: hidden; /* Para asegurar que el pseudo-elemento no se salga */
    background-size: cover;            /* Asegurar que la imagen cubra la tarjeta */
    background-position: center;       /* Centrar la imagen */
    background-repeat: no-repeat;      /* Evitar que se repita */
}

.product-card::before { /* Capa oscura superpuesta a la imagen */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65); /* Más oscuro para contraste */
    border-radius: 15px;
    z-index: 1;
    transition: background 0.3s ease;
}

.product-card > * { /* Asegurar que el contenido esté por encima de la capa */
    position: relative;
    z-index: 2;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.product-card:hover::before {
    background: rgba(0, 0, 0, 0.4); /* Menos oscuro al pasar el ratón */
}

/* Fondos específicos para cada fabricante con las URLs que me has dado */
.galindo-bg { background-image: url('https://comercialimam.com/images/GALINDO.png'); }
.blanco-bg { background-image: url('https://comercialimam.com/images/BLANCO.png'); }
.luppi-bg { background-image: url('https://comercialimam.com/images/SERGIOLUPPI.png'); }
.campoaras-bg { background-image: url('https://comercialimam.com/images/CAMPOARAS.png'); }
.castel-mamparas-bg { background-image: url('https://comercialimam.com/images/CASTELMAMPARAS.jpg'); }
.castel-platos-bg { background-image: url('https://comercialimam.com/images/CASTELPLATOS.png'); }
.mesinor-bg { background-image: url('https://comercialimam.com/images/MESINOR.png'); }
.novy-bg { background-image: url('https://comercialimam.com/images/NOVY.png'); }
.cromados-bg { background-image: url('https://comercialimam.com/images/CROMADOS.png'); }


.product-card h3 {
    font-family: var(--font-serif);
    margin-bottom: 0.8rem;
    color: var(--color-white);
    font-size: 1.8rem;
}

.product-card p {
    color: #f0f0f0;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.brand-link { /* Estilo para el enlace a la web del fabricante */
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-dark-gray);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.brand-link:hover {
    background: var(--color-accent-blue);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

.contact-card {
    background-color: var(--color-light-bg);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
    display: flex; /* Usar flexbox para el contenido */
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.contact-card .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent-blue);
}

.contact-card h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--color-dark-gray);
}

.contact-card p {
    font-size: 1rem;
    color: var(--color-medium-gray);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Permite que el párrafo crezca y empuje el link hacia abajo */
}

.contact-card .contact-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-card .contact-link:hover {
    color: var(--color-accent-blue-dark);
    text-decoration: underline;
}

address {
    font-style: normal; /* Para quitar la cursiva por defecto */
    margin-top: 1.5rem;
    line-height: 1.6;
    color: var(--color-medium-gray);
}

/* Footer */
footer {
    background-color: var(--color-medium-gray);
    color: var(--color-white);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: auto; /* Empuja el footer hacia abajo */
}

footer p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    .hero p {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Podrías implementar un menú hamburguesa aquí */
    }
    .hero {
        padding: 8rem 0 6rem;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    .section-padded {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }
    .product-card, .contact-card {
        padding: 2rem;
    }
    .contact-card .icon {
        font-size: 3.5rem;
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 1.8rem;
    }
    .container {
        padding: 0 15px;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .section-title::after {
        width: 80px;
        height: 4px;
    }
    .product-card h3 {
        font-size: 1.5rem;
    }
    .product-card p {
        font-size: 0.95rem;
    }
}