:root {
    /* Colores principales */
    --color-vino: #9C1836;
    /* Rojo vino del rombo derecho */
    --color-rojo: #9C1836;
    /* Usaremos el mismo tono para consistencia */
    --color-blanco: #FAF9FA;
    /* Blanco ligeramente cálido del logo */
    --color-negro: #000000;

    /* Grises */
    --color-gris-claro: #FAF9FA;
    /* Muy similar al blanco del logo */
    --color-gris-medio: #B2AEAF;
    /* Gris del rombo izquierdo */
    --color-gris-oscuro: #4A4A4A;
    /* Puedes dejar este para textos */

    /* Teclas y botones */
    --color-gris-tecla: #B2AEAF;
    /* Gris medio suave */

    /* Acentos */
    --color-beige: #FAF9FA;
    /* El logo NO tiene beige real, así que mantenemos un blanco cálido */
}

/* ============================================
    ESTILOS PÁGINA INICIO (TEMA CLARO)
    ============================================ */

/* Container específico del main content - NO afecta al header */
.main-content .container,
.hero-section .container,
.welcome-section .container,
.info-cards .container,
.portfolio-section .container,
.links-section .container,
.cta-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
    HERO CAROUSEL
    ============================================ */
/* ... (Sección del carrusel se mantiene, usa texto blanco sobre imagen oscura) ... */
.hero-section {
    width: 100%;
    margin-top: 80px;
    /* Espacio para el header fixed */
}

/* Esto crea un fondo oscuro suave detrás del logo y texto central */
.hero-content {
    background-color: rgba(255, 255, 255, 0.85);
    /* Fondo blanco semitransparente */
    padding: 20px;
    border-radius: 10px;
    /* Bordes redondeados */
    display: inline-block;
    /* Para que el cuadro se ajuste al contenido */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Sombra para darle profundidad */
}

/* O SI PREFIERES MANTENERLO SIN CAJA, PERO LEGIBLE: */
.texto-hero {
    color: #FFFFFF;
    /* Texto blanco */
    text-shadow: 2px 2px 4px #000000;
    /* Sombra negra fuerte para leerse sobre cualquier foto */
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-caption {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--color-blanco);
    z-index: 2;
    width: 90%;
    max-width: 800px;
    animation: carouselFadeInUp 1s ease;
}

@keyframes carouselFadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.carousel-caption h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    color: var(--color-blanco);
}

.carousel-caption p {
    font-size: 1.3rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    color: var(--color-beige);
    /* OK: Usa --color-beige */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* CAMBIO: Usamos --color-gris-tecla, ya estaba la variable */
    background: var(--color-gris-tecla);
    color: var(--color-blanco);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: var(--color-rojo);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--color-blanco);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--color-rojo);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--color-beige);
}

/* ============================================
    MAIN CONTENT
    ============================================ */

.main-content {
    /* OK: Fondo claro usando variables */
    background: linear-gradient(180deg, var(--color-beige) 0%, var(--color-blanco) 100%);
}

/* Sección de bienvenida */
.welcome-section {
    padding: 4rem 0 2rem;
    text-align: center;
}

.welcome-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-negro);
    /* OK: Usa --color-negro */
    margin-bottom: 1rem;
}

.title-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-rojo), transparent);
    margin: 0 auto;
}

/* ============================================
    INFO CARDS
    ============================================ */

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
}

.card-item {
    background: var(--color-blanco);
    border-radius: 15px;
    padding: 2.5rem;
    /* OK: Sombra sutil oscura */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.card-item:hover {
    transform: translateY(-10px);
    /* CAMBIO: Sombra roja con rgba(var(--color-rojo), 0.2) simulado o manteniendo el color */
    box-shadow: 0 15px 40px rgba(156, 24, 54, 0.2);
    /* Usando el RGB de --color-rojo (#9C1836) */
    border-color: var(--color-rojo);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    /* OK: Gradiente con rojo y vino */
    background: linear-gradient(135deg, var(--color-rojo) 0%, var(--color-vino) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blanco);
    font-size: 2rem;
    /* CAMBIO: Sombra roja con rgba(var(--color-rojo), 0.3) simulado */
    box-shadow: 0 5px 15px rgba(156, 24, 54, 0.3);
}

.card-item h3 {
    font-size: 1.5rem;
    color: var(--color-negro);
    /* OK: Usa --color-negro */
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-item p {
    color: var(--color-gris-oscuro);
    /* CAMBIO: Texto oscuro para legibilidad */
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.card-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1.8rem;
    background: var(--color-rojo);
    /* OK: Usa --color-rojo */
    color: var(--color-blanco);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-button:hover {
    background: var(--color-vino);
    /* OK: Usa --color-vino */
    transform: translateX(5px);
    /* OK: Sombra oscura */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* ============================================
    PORTFOLIO SECTION
    ============================================ */

.portfolio-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.2rem;
    color: var(--color-negro);
    /* OK: Usa --color-negro */
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* ... (Portfolio grid y item se mantienen) ... */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--color-blanco);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    /* CAMBIO: Sombra roja con rgba(var(--color-rojo), 0.2) simulado */
    box-shadow: 0 15px 40px rgba(156, 24, 54, 0.2);
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CAMBIO: Opacidad de --color-rojo con rgba(var(--color-rojo), 0.9) simulado */
    background: rgba(156, 24, 54, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ... (Resto de portfolio se mantiene) ... */
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay i {
    font-size: 3rem;
    color: var(--color-blanco);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h4 {
    font-size: 1.4rem;
    color: var(--color-negro);
    /* OK: Usa --color-negro */
    margin-bottom: 1rem;
    font-weight: 600;
}

.portfolio-content p {
    color: var(--color-gris-oscuro);
    /* CAMBIO: Texto oscuro para legibilidad */
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-rojo);
    /* OK: Usa --color-rojo */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-button:hover,
.cta-button:hover,
.portfolio-link:hover {
    outline: 3px solid var(--color-negro);
    outline-offset: 3px;
}

/* ============================================
    LINKS SECTION
    ============================================ */
/* ... (Sección de enlaces se mantiene) ... */
.links-section {
    padding: 4rem 0;
    background: var(--color-blanco);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: center;
}

.section-subtitle {
    font-size: 2rem;
    color: var(--color-negro);
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle-divider {
    width: 80px;
    height: 3px;
    background: var(--color-rojo);
    margin-bottom: 1.5rem;
}

.links-description {
    color: var(--color-gris-oscuro);
    /* CAMBIO: Texto oscuro para legibilidad */
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.links-list {
    list-style: none;
}

.links-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.links-list i {
    color: var(--color-rojo);
    font-size: 0.9rem;
}

/* Grid específico para la lista de aliados */
.ally-list-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 1rem !important;
}

.ally-list-grid li {
    margin-bottom: 0;
}

.links-list a {
    color: var(--color-negro);
    /* CAMBIO: Texto oscuro para legibilidad */
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.links-list a:hover {
    color: var(--color-rojo);
    padding-left: 8px;
}

/* Iconos de redes sociales */
.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* CAMBIO: Opacidad de --color-rojo con rgba(var(--color-rojo), 0.1) simulado */
    background: rgba(156, 24, 54, 0.1);
    border: 2px solid var(--color-rojo);
    border-radius: 50%;
    color: var(--color-rojo);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--color-rojo);
    color: var(--color-blanco);
    transform: translateY(-5px);
    /* CAMBIO: Sombra roja con rgba(var(--color-rojo), 0.4) simulado */
    box-shadow: 0 8px 20px rgba(156, 24, 54, 0.4);
}

/* ... (Imagen se mantiene) ... */
.links-image {
    text-align: center;
}

.links-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ============================================
    CALL TO ACTION
    ============================================ */

.cta-section {
    padding: 3rem 0 4rem;
}

.cta-content {
    /* OK: Fondo claro usando variables */
    background: linear-gradient(135deg, var(--color-beige) 0%, var(--color-blanco) 100%);
    border-radius: 15px;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    /* Sombra sutil */
    border: 2px solid var(--color-rojo);
}

.cta-text {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: var(--color-gris-oscuro);
    /* CAMBIO: Texto oscuro para legibilidad */
    flex: 1;
}

.cta-text i {
    font-size: 3.5rem;
    color: var(--color-rojo);
    /* OK: Usa --color-rojo */
}

.cta-text h3 {
    font-size: 1.8rem;
    color: var(--color-negro);
    /* CAMBIO: Texto oscuro */
    margin-bottom: 0.5rem;
}

.cta-text p {
    font-size: 1.05rem;
    color: var(--color-gris-oscuro);
    /* CAMBIO: Texto oscuro para legibilidad */
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 1.2rem 2.5rem;
    background: var(--color-rojo);
    /* OK: Usa --color-rojo */
    color: var(--color-blanco);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cta-button:hover {
    background: var(--color-vino);
    /* OK: Usa --color-vino */
    transform: translateX(5px);
    /* CAMBIO: Sombra roja con rgba(var(--color-rojo), 0.5) simulado */
    box-shadow: 0 8px 25px rgba(156, 24, 54, 0.5);
}

/* ============================================
    RESPONSIVE
    ============================================ */

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .ally-list-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin-top: 70px;
    }

    .carousel-container {
        height: 320px;
    }

    .carousel-caption h2 {
        font-size: 1.6rem;
    }

    .carousel-caption p {
        font-size: 0.95rem;
    }

    .welcome-section h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
        padding: 2rem 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .ally-list-grid {
        grid-template-columns: 1fr !important;
    }

    .ally-item {
        flex-direction: row;
        align-items: center;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .cta-text {
        flex-direction: column;
        text-align: center;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .section-subtitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    .main-content .container,
    .hero-section .container,
    .info-cards .container,
    .portfolio-section .container,
    .links-section .container,
    .cta-section .container {
        padding: 0 1rem;
    }

    .hero-section {
        margin-top: 60px;
    }

    .carousel-container {
        height: 240px;
    }

    .carousel-caption {
        bottom: 8%;
    }

    .carousel-caption h2 {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }

    .carousel-caption p {
        font-size: 0.85rem;
        display: none;
    }

    .carousel-control {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .welcome-section {
        padding: 2.5rem 0 1rem;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-subtitle {
        font-size: 1.3rem;
    }

    .card-item {
        padding: 1.5rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .card-item h3 {
        font-size: 1.2rem;
    }

    .portfolio-grid {
        gap: 1.5rem;
    }

    .portfolio-image {
        height: 200px;
    }

    .portfolio-content {
        padding: 1.2rem;
    }

    .ally-item {
        padding: 12px;
        gap: 10px;
    }

    .ally-logo {
        max-height: 50px;
        max-width: 80px;
    }

    .cta-content {
        padding: 1.5rem 1rem;
    }

    .cta-text i {
        font-size: 2.5rem;
    }

    .cta-text h3 {
        font-size: 1.4rem;
    }

    .social-icons {
        justify-content: center;
    }

    .mapa-contenedor {
        height: 420px !important;
    }

    .mapa-lista {
        max-height: 140px;
        overflow-y: auto;
    }
}

.logo-animation-container {
    width: 100%;
    max-width: 600px;
    /* Tamaño máximo del contenedor del logo */
    height: 400px;
    /* Altura para un video cuadrado o circular */
    margin: 1.5rem auto 0;
    /* Centra el contenedor y dale margen superior */
    border-radius: 20%;
    /* Opcional: si quieres que el video parezca circular */
    overflow: hidden;
    /* Sombra para resaltar el logo animado sobre el fondo */
    box-shadow: 0 0 20px rgba(var(--color-vino), 0.8);
}

/* Estilo para el video en sí */
.caption-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que la animación cubra el contenedor */
}