/* inicio_style.css */

/* Galería / Slider */
.gallery-container {
    margin: 30px auto;
    position: relative;
    overflow: hidden;
    width: 90%;
    height: 500px;
    border-radius: var(--radius-card);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: #000; /* Fondo negro por si la imagen tarda */
}

.gallery {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-color: #f5f5f5;
}

.slide.active { opacity: 1; z-index: 1; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Texto sobre galería */
.overlay-text {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    font-weight: 500;
    color: white;
    /* Usamos var pero con transparencia manual porque CSS no mezcla vars con alpha fácilmente sin trucos */
    background: rgba(0, 64, 128, 0.6); 
    padding: 10px 25px;
    border-radius: 30px;
    text-align: center;
    z-index: 2;
    max-width: 80%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.slide.active .overlay-text { animation: fadeInUp 0.8s forwards; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 30px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Controles */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 64, 128, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.prev { left: 20px; }
.next { right: 20px; }

.prev:hover, .next:hover {
    background: var(--color-primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Paginación */
.pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dot.active {
    background-color: var(--color-primary);
    transform: scale(1.2);
}

.dot:hover { background-color: var(--color-primary-light); }

/* Servicios */
.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 50px 5%;
    background: linear-gradient(to bottom, #f9f9f9, #f0f4f8);
    margin-top: 40px;
    margin-bottom: 60px;
}

.service {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.service::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
}
.service:hover::before { transform: scaleX(1); }

.service a { text-decoration: none; color: inherit; display: block; height: 100%; }

.service i {
    font-size: 3.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: inline-block;
}

.service:hover i { transform: scale(1.2); color: var(--color-primary-light); }

.service h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--color-primary);
    position: relative;
    display: inline-block;
}

.service h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}
.service:hover h3::after { width: 100%; }

.service p { font-size: 1.05rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 992px) {
    .gallery-container { height: 400px; }
    .services { grid-template-columns: repeat(2, 1fr); padding: 30px 4%; }
}

@media (max-width: 768px) {
    .gallery-container { height: 350px; width: 95%; }
    .prev, .next { width: 40px; height: 40px; font-size: 1.5rem; }
    .services { gap: 15px; padding: 25px 3%; }
    .overlay-text { font-size: 0.95rem; padding: 6px 14px; bottom: 50px; }
}

@media (max-width: 480px) {
    .gallery-container { height: 280px; }
    .services { grid-template-columns: 1fr; padding: 20px 5%; }
    .overlay-text { font-size: 0.8rem; padding: 4px 10px; max-width: 70%; }
}