 *
{
	margin: 0;
	padding: 0;
}
@font-face
{
	font-family: AVGARDM;
	src: url(../font/AVGARDM.TTF);
	font-weight: normal;
}
.lexend-<uniquifier> 
{
  font-family: "Lexend", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}
.font-logotipo
{
	font-family: AVGARDM;
	font-weight: normal;
}

body 
{
	font-size: 18px;
	font-family: Lexend, sans-serif;
	font-style: normal;
}
figure, img 
{
	margin: 0;
	padding: 0;
	line-height: 0;
}
header {
    background: #1e334d;
    color: #ededed;
    width: 100%;                  /* siempre 100% del ancho disponible */
    box-sizing: border-box;
    padding: 1.2em 1em;
    
    display: flex;
    flex-direction: column;       /* por defecto: vertical (menor a 768px) */
    align-items: center;          /* centrado horizontalmente */
    justify-content: center;      /* centrado verticalmente si hace falta */
    gap: 0.8em;
}

#logotipo {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

#logotipo img {
    width: 60px;
    height: auto;
}

h1 {
    font-size: 1.6em;
    margin: 0;
    text-align: center;
}

h2 {
    font-size: 1.5em;
    margin: 0;
    text-align: center;
}

h2 span {
    background: #ededed;
    padding: 0.1em 0.3em;
    color: #1e334d;
    border-radius: 4px;
}
h3
{
	color: #1e334d;
	margin: 0.5em 0;
}
#content-opciones
{
	display: grid;
 	gap: 1.5rem 2rem;
	padding: 1.5rem;
	max-width: 1600px;
	margin: 0 auto;          /* centra el contenedor en pantallas grandes */
	/* Mobile por defecto: 1 columna */
	grid-template-columns: 1fr;
}

#content-opciones article
{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	flex: 1;
}
#content-opciones article .content-article
{
	padding: 0;
}
#content-opciones article p 
{
	font-weight: normal;
}
#content-opciones article a.btn 
{
	background: #1e334d;
	display: block;
	padding: 0.5em 0;
	color: #ededed;
	text-decoration: none;
	border-radius: 5px;
	text-align: center;
	margin: 0.5em 0;
	transition: 1s all ease-out;
}
#content-opciones article a.btn:hover 
{
	background: #4a6381;
} 
#content-opciones article video 
{
	width: 100%;
	margin: 0;
	padding: 0;
	display: block;
	object-fit: cover;
}
#content-opciones article .content-video
{
	position: relative;
	overflow: hidden;
	height: 250px;
	margin: 0;	
	border-radius: 10px;
	box-shadow: 0px 0px 10px #282828;
}
article.card-bg a {
    display: block;
    height: 100%;
    text-decoration: none;
}
#bg_control {
    position: relative;
    height: 100%;
   /* min-height: 500px;  ajusta según tu diseño */
    overflow: hidden;
    border-radius: 10px;

    background: 
 				linear-gradient(
            rgba(40,40,40,0),
            rgba(40,40,40,0.8)
        ),
    url("../img/bg_control.jpg") center bottom / cover no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
    box-sizing: border-box;
    filter: grayscale(0);
    transition: 2s all ease-out;
}
#bg_control:hover
{
	 filter: grayscale(1);

}
#bg_control::before {
    content: "";
    position: relative;
    overflow: hidden;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(40,40,40,0.5),
        rgba(40,40,40,0.5)
    );
}
#txt-bgcontrol {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    text-align: center;
}
#txt-bgcontrol img 
{
	width: 50px;
	margin: 0 auto;
}
#txt-bgcontrol span 
{
	width: 100%;
	text-align: center;
	color: #ededed;
}
footer {
    background: #1e334d;
    color: #ededed;
    padding: 2.5em 1.5em 2em;
    font-size: 0.95em;
    width: 100%;                    /* fuerza 100% del ancho de la ventana */
    box-sizing: border-box;         /* el padding no suma al ancho */
}

/* Contenedores internos */
footer > div {  /* #contet-list y #content-redes */
    width: 100%;
    margin-bottom: 1.8em;
}

/* Mapa de sitio */
#contet-list h4 {
    margin-bottom: 0.8em;
    font-size: 1.1em;
    text-align: center;
}

#list-sitio {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2em 2.5em;
    list-style: none;
    padding: 0;
    margin: 0;
}

#list-sitio li a {
    color: #ededed;
    text-decoration: none;
    transition: color 0.3s;
}

#list-sitio li a:hover {
    color: #4a6381;
}

/* Redes sociales */
#content-redes {
    text-align: center;
}

#content-redes ul#list-redes {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 1em 0 0.8em;
    padding: 0;
    list-style: none;
}

#content-redes li {
    background: #ededed;
    border-radius: 6px;
    padding: 0.5em;
    transition: background 0.3s;
}

#content-redes li:hover {
    background: #4a6381;
}

#content-redes img {
    width: 28px;
    height: 28px;
    display: block;
}

#content-redes span {
    display: block;
    font-size: 0.85em;
    font-weight: 200;
    opacity: 0.9;
}
/*inicio del carrusel*/
#content-carrusel
{
	width: 100%;
	padding: 2em 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
#content-carrusel #content-promocional
{
	width: 100%;
	max-width: 600px;
}
#content-carrusel #content-promocional h3  
{
	text-align: center;
	width: 100%;
}
#content-carrusel #content-promocional p  
{
	text-align: center;
	margin: 1em 0;
}
#content-carrusel #carrusel 
{
	width: 100%;
	max-width: 70%;
}
.slider
{
	width:100% ;
	height: var(--height);
	overflow: hidden;
	mask-image: linear-gradient(
		to right,
		transparent,
		#000 10% 90%,
		transparent
	);
}
.slider .list
{
	display: flex;
	width: 100%;
	min-width: calc(var(--width)* var(--quantity));
	position: relative;
}
.slider .list .item {
	width: var(--width);
	height: var(--height);
	position: absolute;
	left: 100%;
	animation: autoRun 10s linear infinite;
	transition: filter 0.5s;
	animation-delay: calc( (10s / var(--quantity)) * (var(--position) - 2) );
	cursor: pointer;
}
.slider .list .item img {
	width: 100%;
}
@keyframes autoRun{
	from{
		left: 100%;
	} to{
		left: calc(var(--width)*-1);
	}
}
.slider:hover .item{
	animation-play-state: paused!important;
	filter: grayscale(1);
}
.slider .item:hover{
	filter: grayscale(0);
}

/*Modal*/
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 800px;
    aspect-ratio: 16/9;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
}

.close {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* 480–767px → horizontal (lado a lado) */
@

/* 480px+ → 2 columnas → queremos 2 + 2 (incluyendo card-bg en la segunda fila) */
@media (min-width: 480px) {
    #content-opciones {
        grid-template-columns: repeat(2, 1fr);
    }
  
}

/* 768px+ → 3 columnas → aquí SÍ queremos que card-bg ocupe toda la fila */
@media (min-width: 767px) {
    #content-opciones {
        grid-template-columns: repeat(3, 1fr);
    }
     
}


/* 1024px+ → 4 columnas → todo en una fila, card-bg como una más */
@media (min-width: 1024px) {
    #content-opciones {
        grid-template-columns: repeat(4, 1fr);
    }
    footer {
        padding: 3em 5% 2.5em;           /* mismo padding lateral que header */
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 4em;
        width: 100%;                     /* explícito: 100% del ancho */
        margin: 0;                       /* elimina cualquier centrado */
        box-sizing: border-box;
    }

    #contet-list,
    #content-redes {
        flex: 1;
        margin-bottom: 0;
    }

    #contet-list {
        max-width: 40%;
    }

    #content-redes {
        max-width: 45%;
        text-align: right;
    }

    #list-sitio {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6em 3em;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    #contet-list h4 {
        grid-column: 1 / -1;
        text-align: left;
    }

    #list-sitio li:nth-child(1) { grid-column: 1; grid-row: 2; }
    #list-sitio li:nth-child(2) { grid-column: 2; grid-row: 2; }
    #list-sitio li:nth-child(3) { grid-column: 1; grid-row: 3; }
    #list-sitio li:nth-child(4) { grid-column: 2; grid-row: 3; }
    #list-sitio li:nth-child(5) { grid-column: 1; grid-row: 4; }

    #content-redes ul#list-redes {
        justify-content: flex-end;
    }

    #content-redes span {
        text-align: right;
    }

}

/* Solo en el rango de 3 columnas forzamos que card-bg ocupe toda la fila */
@media (min-width: 768px) and (max-width: 1023px) {
    .card-bg {
        grid-column: 1 / -1;
    }
    
    /* opcional: más altura para que no se vea apretado */
    #bg_control {
        min-height: 380px;   /* o 400px, prueba valores */
        align-items: flex-end;
        padding: 2em 1.5em;
    }
    
    #txt-bgcontrol {
        max-width: 520px;
        margin: 0 auto;
    }
     footer {
        padding: 2.8em 3em;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    #contet-list,
    #content-redes {
        flex: 1 1 45%;
    }

    #list-sitio {
        column-count: 2;
    }

}
@media (min-width: 768px) {
    header {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 1.2em 5%;            /* padding lateral proporcional, mismo que footer */
        gap: 2em;
    }

    #logotipo {
        justify-content: flex-start;
    }

    #content-name {
        text-align: right;
    }

    h1 { font-size: 2.1em; }
    h2 { font-size: 1.9em; }
}
/* Opcional: en pantallas muy pequeñas (< 480px) podemos ajustar fuente más pequeña si quieres */
@media (max-width: 479px) {
    h1 { font-size: 1.4em; }
    h2 { font-size: 1.3em; }
}