:root {
    --fuenteHeading: "Playfair Display", serif;
    --fuenteParrafos: "Nunito", serif;

    --doradoBrillante: #FFD700;
    --negroProfundo: #000000;
    --blancoPuro: #FFFFFF;
    --azulMarino: #0A2540;
    --verdeEsmeralda: #50C878;
    --grisAcero: #4B4B4B;
    --rojoCarmesi: #E63946;
    --amarilloMostaza: #FFC107;
}


html {
    box-sizing: border-box;
    font-size: 62.5%;
    margin: 0;
    padding: 0;

}

*,
*:before *:after {
    box-sizing: inherit;
}

body {
    font-family: var(--fuenteParrafos);
    line-height: 1.5;

    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/*Globales*/
.contenedor {
    width: min(100%, 120rem);
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--negroSolido)
}

p {
    font-family: var(--fuenteParrafos);
    line-height: 2;
}

h1 {
    display: none;
}


h3,
h4 {
    font-family: var(--fuenteParrafos);
    line-height: 1.2;
}

h2 {
    font-size: 4rem;
    font-family: var(--fuenteHeading);
    line-height: 1.2;
    font-weight: 800;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    font-size: 2rem;
}

img {
    max-width: 100%;
}

/* Utilidades */

.no-margin {
    margin: 0;
}

.no-padding {
    padding: 0;
}

.centrar-texto {
    text-align: center;
}

.centrar-imagen {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.centrar-parrafo {
    display: block;
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

.negrita {
    font-weight: 700;
}

.tituloPrincipal {
    display: none;
}

.header {
    background-image: url(../imagenes/bannersParaWeb.jpg);
    height: 110rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    position: relative;
    /* necesario para que el hijo se posicione con respecto a este */
}

@media (min-width: 768px) {
    .header {
        height: 80rem;
    }
}

@media (min-width: 768px) {
    .logo img {
        width: 15rem;
    }
}

.header__texto {
    text-align: center;
    color: var(--blancoPuro);
    padding: 0 2rem;
}


@media (min-width:768px) {
    .header__texto {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        /* centra perfectamente */
        width: 90%;
    }

    .header__texto--parrafo {
        max-width: 70rem;
    }
}

.logo img {
    width: 10rem;

}

@media (min-width:768px) {
    .barra {
        padding-top: 3rem;
        display: flex;
        justify-content: space-around;
        /*alinea horizontalmente si solo si hay display flex*/
        align-items: center;
        /*alinea verticalmente si solo si hay display flex*/
        color: var(--blancoPuro);
    }

}

.boton {
    margin: 3rem auto;
    background-color: var(--azulMarino);
    color: var(--blancoPuro);
    padding: 2rem 2rem;
    border-radius: 0.5rem;
    font-weight: bold;
    text-align: center;
    display: inline-block;
    cursor: pointer;
    font-weight: 400;
}

@media (min-width: 768px) {
    .navegacion {
        display: flex;
        gap: 2rem;
    }
}

.navegacion__enlace {
    margin-top: 1.5rem;
    display: block;
    text-align: center;
    font-size: 1.8rem;
    color: var(--blancoPuro);
}

@media (min-width: 768px) {
    .navegacion__enlace {
        margin-top: 0;
    }
}

/*Inicio portafolio de servicios */

@media (max-width: 480px) {
    .sPrincipal__titulo {
        font-size: 2.5rem;
    }
}

.sPrincipal__parrafo {
    margin-bottom: 3rem;
}

.sPrincipal__parrafo p {
    width: 90%;
    max-width: 30rem;
    margin: 0 auto;
    /* ✅ Esto centra horizontalmente */
}

@media (min-width:768px) {
    .sPrincipal__parrafo p {
        line-height: 2;
        max-width: 80rem;
        margin: 0 auto;
        line-height: 2;
    }
}


.sPrincipal__videos {
    width: 90%;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 3rem;
    padding: 0;

}

@media (min-width:768px) {
    .sPrincipal__videos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:1200px) {
    .sPrincipal__videos {
        grid-template-columns: repeat(4, 1fr);
    }
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Escala y recorta manteniendo proporciones */
    z-index: -1;
}

.video-section {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 25rem;
    /* o el alto que definas */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: grid;
    place-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--blancoPuro);
    font-size: 1.5rem;
}

.video #portafolio {
    padding: 2rem 1rem;
    background-color: #f9f9f9;
    /* Fondo suave para destacar la sección */
}

/*Inicio portafolio de proyectos*/

.pPrincipal {
    display: flex;
    /* Activa flexbox en el contenedor */
    flex-direction: column;
    /* Coloca los elementos en columnas, uno sobre el otro */
    justify-content: center;
    /* Centra el contenido horizontalmente */
    align-items: center;
    /* Centra el contenido verticalmente */
    text-align: center;
    /* Centra el texto dentro del párrafo */
    height: 100%;
    /* Ajusta la altura según sea necesario */
}

.pPrincipal p {
    width: 90%;
    max-width: 30rem;
}


@media (min-width: 768px) {
    .pPrincipal p {
        max-width: 80rem;
        margin: 0 auto;
        color: var(--negroProfundo);
        line-height: 1.5;
    }
}

/* Carrusel seccion proyectos destacados*/

.proyecto {
    display: flex;
    flex-direction: column;
    /* ✅ Imagen arriba, luego texto */
    align-items: center;
    gap: 2rem;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.proyecto img {
    width: 100%;
    max-width: 60rem;
    /* Puedes ajustar este tamaño */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.proyecto div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    max-width: 90%;
    margin: 0 auto;
}

.proyecto p {
    color: var(--grisOscuro);
    margin: 0;
    line-height: 1.8;
    text-align: center;
}


.eWeb {
    display: inline-block;
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem 4rem;
    background-color: var(--amarilloMostaza);
    color: var(--negroProfundo);
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-top: 1rem;
    /* Separación extra respecto al último párrafo */
}

/* Efecto al pasar el mouse */
.eWeb:hover {
    background-color: #e6b800;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}


@media (min-width:768px) {

    /* Envoltura del carrusel con botones */
    .carrusel-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
    }

    /* Botones del carrusel */
    .carrusel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: var(--blancoPuro);
        border: none;
        font-size: 2rem;
        padding: 1rem;
        cursor: pointer;
        z-index: 10;
        border-radius: 50%;
        transition: background-color 0.3s ease;
    }

    .carrusel-btn:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }

    .carrusel-btn.prev {
        left: 0.5rem;
    }

    .carrusel-btn.next {
        right: 0.5rem;
    }


    .carrusel {
        max-width: 100rem;
        margin: 0 auto;
        padding: 1rem;
    }

    .carrusel h3 {
        margin-bottom: 1rem;
        color: var(--negroProfundo);
    }

    /* Contenedor del carrusel */
    .carrusel-contenedor {
        display: flex;
        flex-wrap: nowrap;
        /* Mantiene los proyectos en una fila */
        gap: 4rem;
        /* Espaciado entre proyectos */
        overflow-x: auto;
        /* Desplazamiento horizontal */
        padding-bottom: 1rem;
        /* Espacio inferior */
        scrollbar-width: thin;
        /* Scroll delgado (navegadores soportados) */

        /* Scroll Snap */
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
    }

    .carrusel-contenedor::-webkit-scrollbar {
        height: 8px;
        /* Altura del scroll */
    }

    .carrusel-contenedor::-webkit-scrollbar-thumb {
        background-color: var(--grisOscuro);
        border-radius: 4px;
        /* Bordes redondeados del scroll */
    }

    /* Elementos del carrusel */
    .carrusel-item {
        flex: 0 0 auto;
        /* No permite que los elementos se reduzcan */
        width: 100%;
        /* Ocupa el ancho del contenedor */
        scroll-snap-align: start;
        /* Alinea cada elemento al inicio */
    }

}

.categoria {
    text-align: center;
    padding: 40px 20px;
}

.categoria h2 {
    color: var(--negroProfundo);
    margin-bottom: 20px;
}

.categoria__parrafo {
    max-width: 80rem;
}

/* Contenedor general en forma de grilla */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjeta individual del logo */
.logo-card {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f1f1;
}

/* Efecto al pasar el mouse */
.logo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* Imagen del logo */
.logo-card img {
    width: 100%;
    max-width: 200px;
    /* O ajústalo según el diseño */
    height: 150px;
    /* Altura fija para uniformidad */
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0 auto 1rem auto;
}


/* Título del proyecto */
.logo-card h4 {
    font-size: 1.4rem;
    color: var(--azulMarino, #0A2540);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Descripción */
.logo-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--grisOscuro, #4B4B4B);
}

/* Responsive padding para móviles */
@media (max-width: 480px) {
    .logo-card {
        padding: 1.5rem 1rem;
    }
}


/* Contenedor principal de la sección */
#testimonios {
    text-align: center;
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Título de la sección */
#testimonios h2 {
    color: var(--negroProfundo);
    margin-bottom: 40px;
}

.testimonio__parrafo {
    max-width: 80rem;
}

/* Contenedor de testimonios con diseño de grid */
.testimonios-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 2rem;
    padding: 2rem 1rem;
}

.testimonio {
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.testimonio:hover {
    transform: translateY(-5px);
}

.cliente {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cliente img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--verdeEsmeralda);
}

.nombre {
    font-weight: bold;
    color: var(--negroProfundo);
    font-size: 1.5rem;
}

.comentario {
    font-size: 1.5rem;
    color: var(--grisOscuro);
    line-height: 1.6;
    font-style: italic;
}


/* Formulario de contacto estilos */
/* Contenedor principal del formulario */
#fContacto {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    padding: 40px 20px;
    max-width: 60rem;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.fContacto__formulario,
.fContacto__parrafo {
    width: 100%;
    padding: 20px;
}

/* Título del formulario */
#fContacto h2 {
    color: var(--negroProfundo);
    margin-bottom: 0;
    font-size: 2rem;
    text-align: center;
}

/* Fieldset general */
#fContacto fieldset {
    border: none;
    padding: 0;
}

/* Leyenda principal */
#fContacto legend {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--azulMarino);
}

/* Contenedor de cada campo */
#fContacto div {
    margin-bottom: 20px;
}

/* Etiquetas */
#fContacto label {
    display: block;
    margin-bottom: 6px;
    color: var(--negroProfundo);
    font-weight: 600;
    font-size: 2rem;
}

/* Inputs y Textarea */
#fContacto input[type="text"],
#fContacto input[type="email"],
#fContacto input[type="tel"],
#fContacto textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.3s;
    background-color: #fff;
    box-sizing: border-box;
}

#fContacto input:focus,
#fContacto textarea:focus {
    outline: none;
    border-color: var(--azulMarino);
    box-shadow: 0 0 0 2px rgba(10, 37, 64, 0.1);
}

/* Área de texto */
#fContacto textarea {
    height: 120px;
    resize: none;
}

/* Radios */
#fContacto input[type="radio"] {
    margin-right: 6px;
    accent-color: var(--azulMarino);
}

#fContacto div:last-child {
    text-align: center;
}

/* Botón */
#fContacto input[type="submit"] {
    background: var(--azulMarino);
    color: var(--blancoPuro);
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

#fContacto input[type="submit"]:hover {
    background: var(--negroProfundo);
}

/* Mensaje de éxito */
#mensajeExito {
    display: none;
    padding: 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    #fContacto {
        padding: 30px 15px;
    }

    #fContacto h2 {
        font-size: 1.6rem;
    }

    #fContacto input[type="submit"] {
        width: 100%;
    }
}


/* footer section */
.footer-container {
    width: 100%;
    background-color: var(--amarilloMostaza);
    color: var(--negroProfundo);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 10%;
    flex-wrap: wrap;
    box-sizing: border-box;
    margin-top: 2rem;
}

/* Secciones del footer */
.footer-section {
    text-align: left;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

/* Estilo para los títulos */
.footer-section h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: bold;
    border-bottom: 2px solid var(--negroProfundo);
    padding-bottom: 5px;
    display: inline-block;
}

/* Estilos para los enlaces */
.footer-section a {
    text-decoration: none;
    color: var(--negroProfundo);
    font-size: 1.8rem;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 8px;
}

.footer-section a:hover {
    color: var(--azulMarino);
}

/* Íconos sociales */
.footer-section .social-icons {
    display: flex;
    gap: 20px; /* Separación más amplia entre íconos */
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap; /* Para que no se desborden en pantallas pequeñas */
}

/* Tamaño y estilo de los íconos sociales */
.footer-section .social-icons a i {
    font-size: 3rem; /* Aumentado: puedes probar 2.5rem si quieres más impacto */
    color: var(--negroProfundo);
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-section .social-icons a:hover {
    color: var(--rojoCarmesi);
    transform: scale(1.1);
}

/* Lista de enlaces */
.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

/* Pie de página inferior */
.footer-bottom {
    width: 100%;
    background-color: var(--negroProfundo);
    /* Fondo negro */
    text-align: center;
    padding: 15px 0;
    color: var(--blancoPuro);
}

/* Responsivo */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-section {
        text-align: center;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .footer-section h2 {
        border-bottom: none;
    }

    .footer-section .social-icons {
        justify-content: center;
    }
}