* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(to bottom, #f0f0f0 0%, #bdc3c7 20%, #2c3e50 60%, #1a1a2e 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 2. Header */
.main-header {
    position: relative;
    padding: 20px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 150px;
}

.main-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(2px);
    background-image: 
        radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.5) 100%), 
        url('/recursos/fondo.jpeg');
    opacity: 0.7;
}

.rif {
    text-align: right;
    font-size: 0.85rem;
    color: #1a1a2e;
    font-weight: bold;
    margin-bottom: 10px;
    width: 100%;
}

.main-logo {
    max-width: 90%;
    height: auto;
    max-height: 180px;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 0.6)) 
            drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* 3. Navegación */
.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    background: #2a2a72;
    border-top: 2px solid #1a1a2e;
    padding: 5px;
}

.main-nav li {
    flex: 1;
    min-width: 120px;
}

.main-nav a {
    display: block;
    padding: 15px;
    text-align: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s ease;
}

.main-nav a:hover, .main-nav a.active {
    background: #4a69bd; 
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/*footer */

.main-footer {
    background-color: #333333;
    color: #ffffff;
    padding: 10px 20px;
    text-align: center;
    border-top: 3px solid #4a69bd;
    margin-top: 10px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* --- FILA 1: CARRUSEL --- */
.carousel {
    position: relative;
    max-width: 80%;
    height: 550px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carousel-inner {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(42, 42, 114, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    border-left: 5px solid #4a69bd;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

.next { right: 0; border-radius: 5px 0 0 5px; }
.prev { left: 0; border-radius: 0 5px 5px 0; }

/* --- FILA 2: CATÁLOGO 3 COLUMNAS --- */
.catalog-section { padding: 40px 5%; }

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* 3 columnas automáticas */
    gap: 30px;
    margin-top: 10px;
}

.catalog-item {
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid rgba(74, 105, 189, 0.3);
}

.image-box {
    width: 100%;
    aspect-ratio: 1.2 / 1; /* Relación 1:1 cuadrada */
    overflow: hidden;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: scale 0.5s;
}

.catalog-item:hover { transform: translateY(-10px); }
.catalog-item:hover .image-box img { scale: 1.1; }

.catalog-info { padding: 20px; text-align: center; }
.catalog-info h3 { color: #4a69bd; margin-bottom: 5px; }

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column;
        padding: 20px;
    }
    .main-nav ul {
        flex-direction: column;
    }
}