/* Variables CSS para colores y fuentes */
:root {
    --primary-color: #C00000; /* Rojo oscuro (similar al logo TRAMA) */
    --secondary-color: #333; /* Gris oscuro para texto */
    --light-grey: #f4f4f4;
    --dark-grey: #555;
    --white: #ffffff;
    --font-family-body: 'Roboto', sans-serif;
    --font-family-heading: 'Roboto', sans-serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-body);
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.main-header .logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--white);
}

.main-header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.main-header .slogan {
    font-size: 1.3em;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 25px; /* Ajustado para dar espacio al nuevo botón */
}

/* Estilos para el link de descarga del catálogo */
.catalog-download {
    margin-top: 20px; /* Espacio superior */
    margin-bottom: 20px; /* Espacio inferior */
}

.btn-catalog-download {
    display: inline-block;
    background-color: var(--white); /* Fondo blanco para destacar */
    color: var(--primary-color); /* Color rojo del logo para el texto */
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Sombra para darle profundidad */
    border: 2px solid var(--primary-color); /* Borde para mayor contraste */
}

.btn-catalog-download i {
    margin-right: 10px; /* Espacio entre el icono y el texto */
    font-size: 1.1em; /* Tamaño del icono */
}

.btn-catalog-download:hover {
    background-color: var(--primary-color); /* Invertir colores al pasar el ratón */
    color: var(--white);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transform: translateY(-2px); /* Pequeño efecto de elevación */
}
/* Fin de estilos del link de descarga */


/* Navigation */
.main-nav {
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky; /* Sticky navigation */
    top: 0;
    z-index: 1000;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

.main-nav ul li {
    margin: 0 20px;
}

.main-nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-bottom: 2px solid transparent;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Main Content Sections */
.main-content {
    padding-bottom: 50px;
}

.section {
    padding: 60px 0;
    text-align: center;
}

.section:nth-child(even) { /* Estilo alternado para secciones */
    background-color: var(--light-grey);
}

.section h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

/* Hero Section */
.hero-section {
    padding: 0;
    background-color: var(--white);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; /* Limita la altura de la imagen hero */
}

/* Location Section */
.location-info p {
    font-size: 1.1em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-info p i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.location-info .note {
    font-size: 0.9em;
    color: var(--dark-grey);
    margin-top: -10px;
    margin-bottom: 20px;
}

.map-container {
    margin-top: 30px;
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    height: 0;
}

.map-container iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border: none;
}

/* Product List */
.product-list {
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.product-list li {
    font-size: 1.15em;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.product-list li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--primary-color);
    font-size: 1.3em;
}

/* News Section */
.news-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin: 0 auto 30px auto;
    max-width: 700px;
    text-align: left;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item h3 {
    color: var(--primary-color);
    font-size: 1.6em;
    margin-bottom: 10px;
}

.news-item .news-date {
    font-size: 0.9em;
    color: var(--dark-grey);
    margin-bottom: 15px;
}

.btn-read-more {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.btn-read-more:hover {
    background-color: #a00000; /* Un poco más oscuro */
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* Contact Section */
.contact-info {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.3em;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary-color);
}


/* Footer */
.main-footer {
    background-color: var(--dark-grey);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}

.main-footer .social-links {
    margin-bottom: 15px;
}

.main-footer .social-links a {
    color: var(--white);
    font-size: 1.8em;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.main-footer .social-links a:hover {
    color: var(--primary-color);
}

.main-footer .footer-links {
    margin-top: 15px;
}

.main-footer .footer-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.main-footer .footer-links a:hover {
    color: var(--primary-color);
}

/* Responsividad básica */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.2em;
    }

    .main-header .slogan {
        font-size: 1em;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0;
    }

    .main-nav ul li {
        margin: 5px 0;
    }

    .section {
        padding: 40px 0;
    }

    .section h2 {
        font-size: 2em;
    }

    .product-list {
        text-align: center;
    }

    .product-list li {
        padding-left: 0;
    }

    .product-list li i {
        position: static;
        margin-right: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        margin: 0 10px 20px 10px;
    }

    .btn-catalog-download {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 20px 0;
    }

    .main-header h1 {
        font-size: 1.8em;
    }

    .main-header .logo {
        width: 80px;
        height: 80px;
    }
}