* {
    box-sizing: border-box
}

.btn-ini {
    position: fixed; /*El elemento es removido del flujo normal del documento, 
    sin crearse espacio alguno para el elemento en el esquema de la página.*/
    width: 40px; /*ancho*/
    height: 40px; /*alto*/
    line-height: 40px;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.658);
    color: #49a3d6;
    text-align: center;
    border-radius: 50px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.4);
    font-size: 20px;
  }
  
  .btn-ini:hover {
    background: #000;
  }

  .btn-portfolio {
    display: inline-block;
    padding: 10px 20px;
    background-color: #49a3d6; /* Color de fondo */
    color: white; /* Color del texto */
    font-size: 16px;
    text-align: center;
    text-decoration: none; /* Eliminar el subrayado */
    border-radius: 5px; /* Bordes redondeados */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Transiciones suaves */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra suave */
}

.btn-portfolio:hover {
    background-color: #3498db; /* Color al pasar el mouse */
    transform: translateY(-2px); /* Efecto de elevación al hacer hover */
}

.btn-portfolio:active {
    background-color: #2980b9; /* Color al hacer clic */
    transform: translateY(0); /* Volver a su posición original */
}


body {
    background: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

.contenedor {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    overflow: hidden;
}

/*  HEADER  */



header {
    background: url('../img/bg.jpg') #49a3d6;
    background-repeat: no-repeat;
    background-position: center;
    max-height: 600px;
}

/* header - MENU DE NAVEGACION */



header .menu {
    margin: 40px 0;
    text-align: right;
}

header .menu a {
    margin: 0 20px;
    color: #fff;
    display: inline-block;
    padding: 9px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 1em;
}

header .menu a:hover {
    border-bottom: 2px solid #fff;
}

/* HEADER- CONTENEDOR TEXTO*/



header .contenedor-texto {
    margin: 190px 0;
    display: flex;
    justify-content: center;
    align-content: center;
}

header .contenedor-texto .texto {
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 3px;
    display: inline-block;
    text-align: center;
    padding: 20px 60px;
}

header .contenedor-texto .texto h1,
header .contenedor-texto .texto h2 {
    color: #fff;
    font-weight: 300; /*Recordemos que aqui estamos indicando "300", ya que tenemos de:
    https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0;400;0;600;0;700;1;600ydisplay=swap
    * 300 --> es el valor light
    * 400 --> es el valor regular
    * 600 --> es el valor semi-bold
    * 700 --> es el valor bold.*/
    margin: 0;
}

header .contenedor-texto .texto .nombre {
    margin-bottom: 10px;
    font-size: 50px;
    line-height: 50px;
}
header.contenedor-texto .texto .profesion {
    font-size: 25px;
    line-height: 25;
}


/* MAIN */



.main .contenedor {
    overflow: visible;
}

/* MAIN ACERCA DE*/



.main .acerca-de {
    text-align: center;
    }

    .main .acerca-de .foto {
        margin-top: -60px;
    }

.main .acerca-de .foto img {
   vertical-align: top;
   border-radius: 50%;
   border: 5px solid rgba(255,255,255, 0.20);
}

.main .acerca-de .texto .titulo {
    font-size: 34px;
    line-height: 34px;
    margin-bottom: 40px;
    font-weight: 300;
    color: #ff820d;
    text-align: center;
}

.main .acerca-de .texto .bold {
    color: #3895ea;
    text-decoration: underline;
}

/*Main - trabajos*/



.main .trabajos {
    background: #f2f2f2;
    padding: 60px 0;
}

.main .trabajos .contenedor {
    overflow: hidden;
}

.main .trabajos .titulo {
    font-size: 34px;
    line-height: 34px;
    margin-bottom: 40px;
    font-weight: 300;
    color: #323068;
    text-align: center;
}

.main .trabajos .contenedor-trabajos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.main .trabajos .contenedor-trabajos .trabajo {
    width: 23%;
    margin-bottom: 40px;
}



.main .trabajos .contenedor-trabajos .trabajo .thumb img:hover {
    opacity: 0.5;
}

.main .trabajos .contenedor-trabajos .trabajo .descripcion {
    text-align: center;

}

.main .trabajos .contenedor-trabajos .trabajo .nombre {
    font-weight: 700;
    color: #3895ea;
    margin-bottom: 10px;
}

.main .trabajos .contenedor-trabajos .trabajo .categoria {
    font: 14px;
    color: #636363;
}

	/*   FOOTER - CONTACTO   */

footer .contacto {
    padding: 60px 0;
}

footer .contacto .titulo {
    font-size: 34px;
    line-height: 34px;
    margin-bottom: 40px;
    font-weight: 300;
    color: #3895ea;
    text-align: center;
}

footer .contacto .formulario {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

footer .contacto .formulario input[type="text"],
footer .contacto .formulario input[type="email"],
footer .contacto .formulario textarea {
    border: 2px solid #cecece;
    border-radius: 5px;
    padding: 15px 20px;
    font-size: 20px;
    color: #a4a4a4;
}

footer .contacto .formulario input[type="text"]:hover,
footer .contacto .formulario input[type="email"]:hover,
footer .contacto .formulario textarea:hover {
    border: 2px solid #3895ea;
}

footer .contacto .formulario input[type="text"],
footer .contacto .formulario input[type="email"] {
    width: 49%;
    margin-bottom: 15px;
}

footer .contacto .formulario textarea {
  width: 100%;
  height: 100px;
  min-width: 100%;
  max-width: 100%;
  min-height: 100px;
  max-height: 300px;
  margin-bottom: 15px;  
}

footer .contacto .formulario .boton {
    margin: auto;
    background: #3895ea;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 15px 40px;
    cursor: pointer;
}

footer .contacto .formulario .boton:hover {
    background: #387bea;
}


	/*   FOOTER - REDES SOCIALES   */


footer .redes-sociales {
    background: #1e2b38;
    padding: 60px 0;
}

footer .redes-sociales .contenedor {
    display: flex;
    justify-content: center;
}

footer .redes-sociales a {
    color: #fff;
    text-align: center;
    width: 100px;
    display: block;
    padding: 15px 0;
    border-radius: 3px;
    font-size: 30px;
    margin: 0 20px;
}

footer .redes-sociales .twitter:hover {	background: #14171a; }
footer .redes-sociales .facebook:hover { background: #3b5998; }
footer .redes-sociales .youtube:hover {	background: #cd201f; }
footer .redes-sociales .github:hover { background: #666666; }
footer .redes-sociales .instagram:hover { background: #3f729b; }

	/*   MEDIA QUERIES   */

@media screen and (max-width: 800px) {
    header .menu {
        text-align: center;
    }

    .main .trabajos .contenedor-trabajos .trabajo {
        width: 46%;
    }
}

@media screen and (max-width: 500px) {
    header .contenedor-texto .texto .nombre {
        font-size: 35px;
    }

    header .contenedor-texto .texto .profesion {
        font-size: 18px;
    }

    footer .redes-sociales .contenedor {
        flex-wrap: wrap;
        padding: 20px 0;
    }
}

.trabajos {
    padding: 80px 20px;
    background-color: #f8f8f8;
}

.contenedor {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
}

.titulo {
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: #1a1a1a;
    font-weight: 700;
}

.contenedor-trabajos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    padding: 0 15px;
}

/* Tarjeta */
.trabajo {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
}

/* HOVER: Agranda y eleva */
.trabajo:hover {
    transform: translateY(-18px) scale(1.10);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Contenedor de imagen */
.thumb {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f0f0f0;
    padding: 10px;
    box-sizing: border-box;
}

/* IMAGEN COMPLETA + ZOOM AL HOVER */
.thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ¡CLAVE! Muestra imagen completa */
    transition: transform 0.5s ease;
}

.trabajo:hover .thumb img {
    transform: scale(1.25); /* Zoom suave al pasar el mouse */
}

/* Texto */
.descripcion {
    padding: 18px;
    text-align: left;
    transition: all 0.3s ease;
}

.trabajo:hover .descripcion {
    padding: 22px 18px;
}

.nombre {
    font-weight: 700;
    font-size: 1.15rem;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    transition: font-size 0.3s ease;
}

.trabajo:hover .nombre {
    font-size: 1.28rem;
}

.categoria {
    font-size: 0.92rem;
    color: #555;
    margin: 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.trabajo:hover .categoria {
    color: #000;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.mostrar {
    display: flex;
    opacity: 1;
}

.modal-contenido {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalAbre 0.5s ease;
}

@keyframes modalAbre {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#modal-imagen {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-texto {
    padding: 20px;
    text-align: center;
    background: #fff;
}

.modal-texto h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    color: #1a1a1a;
}

.modal-texto p {
    margin: 0;
    color: #555;
    font-weight: 500;
}

.cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.cerrar:hover {
    background: rgba(255,0,0,0.8);
    transform: rotate(90deg);
}

/* Para que el <a> no rompa el diseño */
.trabajo a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Ícono de Play encima de la imagen */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #e74c3c;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.trabajo:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Aseguramos que el thumb sea relativo para el ícono */
.thumb {
    position: relative;
}

/* CENTRAR IMÁGENES - 100% FUNCIONAL (ÚNICO BLOQUE) */
.thumb {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 220px;
    padding: 12px;
    background: #f9f9f9;
    overflow: hidden;
    box-sizing: border-box;
}

.thumb img {
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
    border-radius: 6px;
}

.trabajo:hover .thumb img {
    transform: scale(1.25);
}