﻿/* styles.css */
:root {
    --primary-color: #CC0000;
    --secondary-color: #007BFF;
    --accent-color: #FFD700;
    --light-bg: #FFF5F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--light-bg);
}

header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 4px auto;

}

.logo {
    height: 40px;
    margin-bottom: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.servicio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.servicio-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.servicio-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.instituciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.institucion-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.institucion-card img {
    width: 78%;
    height: 500px;
    object-fit: cover;
}

.info {
    padding: 1.5rem;
}

.info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 1rem;
}

.calidad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.calidad-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.calidad-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--primary-color);
}

.evento {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.fecha {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    flex: 0 0 150px;
    text-align: center;
}

.contenido {
    flex: 1;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    margin-left: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.galeria-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.galeria-grid img:hover {
    transform: scale(1.05);
}

.directorio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.miembro {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.miembro img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}

footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    border-bottom: 2px solid white;
    padding-bottom: 0.5rem;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
    margin: 0 0.5rem;
}

@media (max-width: 768px) {
    .hero {
        height: 300px;
    }

    .evento {
        flex-direction: column;
    }

    .fecha {
        margin-bottom: 1rem;
    }

    .timeline::before {
        left: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Historia */
.historia {
    background-color: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

.historia h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.historia p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #333;
}

/* Hitos */
.hitos {
    background-color: white;
    padding: 4rem 0;
    text-align: center;
}

.hitos h2 {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--primary-color);
}

.evento {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.fecha {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    flex: 0 0 150px;
    text-align: center;
}

.contenido {
    flex: 1;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    margin-left: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .evento {
        flex-direction: column;
    }

    .fecha {
        margin-bottom: 1rem;
    }

    .timeline::before {
        left: 20px;
    }
}

/* Carrusel */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
         /*       url('https://via.placeholder.com/1920x1080/CC0000/FFFFFF?text=CONIFOS+AG') no-repeat center center/cover; */ 
    height: 500px;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 2rem;
}

.carousel-container {
    position: relative;
    width: 50%;
    max-width: 1024px;
    margin: 0 auto;
}

.carousel-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    overflow: hidden;
}

.carousel-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 400%; /* 4 slides × 100% */
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 25%; /* 4 slides */
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* Cambiado de 'cover' a 'contain' */
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

@media (max-width: 768px) {
    .carousel-ratio {
        padding-top: 177.78%; /* 9:16 ratio for vertical screens */
    }
}