/* Tipografía y estilos generales */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container, .section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo span {
    font-weight: 600;
    color: #333;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #667eea;
}

/* Hero section */
/* #hero {
    height: 100vh;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
} */

#hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

#bg-video {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Black color with 50% transparency */
    z-index: -1;
}

.content {
    z-index: 1;
    position: relative;
}

#hero .content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

#hero .content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

#hero .btn {
    padding: 0.75rem 2rem;
    background: #fff;
    color: #333;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

#hero .btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* .section {
    padding: 5rem 0;
} */

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Estilos de la sección Sobre mí */
.personal-photo-centered {
    display: block;
    margin: 0 auto 20px;
    border-radius: 50%;
    max-width: 150px;
}

.about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin-top: 40px;
}

.personal-info {
    flex: 1;
    padding-right: 20px;
    text-align: justify;
}

.company-info {
    flex: 1;
    text-align: center;
}

.cangi-logo {
    max-width: 200px;
    margin: 0 auto;
}

.caption {
    text-align: center;
    font-style: italic;
    margin-top: 10px;
}

/* Estilos de la sección Servicios */
#services {
    padding: 5rem 0;
    background-color: #f5f5f5;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;  /* Título más pequeño */
    color: #333;
}

.service-card p {
    color: #666;
    font-size: 0.9rem;  /* Descripción más compacta */
    line-height: 1.5;
}


/* Estilos seccion skills */
#skills {
    padding: 5rem 0;
    background-color: #f5f5f5;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
}

.skill span {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
    width: 100%;
}

.progress {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 20px;
    background-color: #667eea;  /* Azul sólido que combina con la estética general */
    color: white;
    text-align: center;
    line-height: 20px;
    font-size: 0.85rem;
    transition: width 0.5s ease-in-out;
}

/* Estilos seccion recomendaciones */
#recommendations {
    padding: 5rem 0;
    background-color: #f5f5f5;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.recommendation-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    text-align: center;
}

.recommender-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.recommendation-card p {
    font-style: italic;
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.recommender-info {
    margin-top: 1rem;
}

.recommender-info strong {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.recommender-info span {
    font-size: 0.9rem;
    color: #555;
}



/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

#project-hero {
    margin-top: 100px;
    text-align: center;
    padding: 1rem 0;
}

.project-logo-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 1rem auto;
}

#project-details .description {
    text-align: center;  /* Centra la descripción del proyecto */
    margin-top: 1rem;  /* Ajusta el margen superior */
    margin-bottom: 1rem;  /* Reduce el margen inferior */
    padding: 0 20px;  /* Opcional: Añade un pequeño padding lateral para una mejor legibilidad */
}

#project-details h3 {
    margin-top: 3rem;  /* Mayor margen superior para "Detalles del Proyecto" */
    margin-bottom: 0.5rem;  /* Mucho menos margen inferior */
}

#project-details ul {
    text-align: left;
    margin-top: 1rem;  /* Mantén un margen estándar para la lista */
}

/* Contacto */
#contact {
    margin-top: 1rem;
    text-align: center;
    background: none; /* Quitar el fondo blanco */
    padding: 0; /* Quitar el padding para eliminar el recuadro */
    max-width: 800px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 2rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif; /* Asegúrate de aplicar la misma tipografía */
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: #fff;
    box-shadow: none;
}

#contact button {
    padding: 1rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

#contact button:hover {
    background: #5b6bd9;
}

.section h2 {
    margin-bottom: 2rem; /* Alinear título correctamente */
    font-size: 2.2rem; /* Ajustar tamaño del título */
}



/* Footer */
footer {
    margin-top: 4rem;
    background: #333;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.social-icons a {
    color: #ffffff;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
color: #007bff;
}

footer p {
    margin: 0;
    font-size: 1rem;
}

/* Media query per a pantalles petites (mòbils) */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }

    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-bottom: 10px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    nav ul li a {
        font-size: 1rem;
    }

    #hero {
        height: 80vh;
    }

    #hero .content h1 {
        font-size: 2.5rem;
    }

    #hero .content p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .personal-info, .company-info {
        padding: 0;
    }

    #services .services-grid, #skills .skills-grid, #recommendations .recommendations-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .service-card, .skill, .recommendation-card, .project-card {
        padding: 1.5rem;
    }

    .skill span {
        font-size: 0.9rem;
    }

    .progress-bar {
        height: 15px;
    }
}

/* Estils generals per a millorar la responsivitat */

/* Media query per a pantalles petites (mòbils) */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }

    header .container {
        flex-direction: column;
        align-items: center; /* Centra el títol (logo + text) */
        justify-content: center; /* Centra verticalment */
        height: 50px; /* Ajusta l'alçada per centrar millor */
    }

    .logo {
        margin-top: 10px;
        font-size: 1rem; /* Redueix la mida del text del logo */
    }

    .logo img {
        height: 20px; /* Ajusta la mida del logo per pantalles petites */
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }

    nav ul li a {
        font-size: 1rem;
    }

    #hero {
        height: 80vh;
    }

    #hero .content h1 {
        font-size: 2.5rem;
    }

    #hero .content p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .personal-info, .company-info {
        padding: 0;
    }

    .personal-info {
        text-align: center;
    }

    #services .services-grid, #skills .skills-grid, #recommendations .recommendations-grid, .projects-grid {
        grid-template-columns: 1fr;
    }

    .service-card, .skill, .recommendation-card, .project-card {
        padding: 1.5rem;
    }

    .skill span {
        font-size: 0.9rem;
    }

    .progress-bar {
        height: 20px;
    }
}

/* Media query per a pantalles mitjanes (tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
    header .container {
        flex-direction: row;
        align-items: center;
    }

    nav ul {
        flex-direction: row;
    }

    #hero .content h1 {
        font-size: 3.5rem;
    }

    #hero .content p {
        font-size: 1.4rem;
    }

    .about-content {
        flex-direction: row;
        text-align: left;
    }

    .personal-info, .company-info {
        padding: 0 10px;
    }

    #services .services-grid, #skills .skills-grid, #recommendations .recommendations-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Ajustos per a imatges i vídeos */
img, video {
    max-width: 100%;
    height: auto;
}

/* Ajustos per a les seccions per assegurar que s'adaptin */
.section-container {
    padding: 0 20px;
}

/* Botó del menú per a mòbils */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        margin-left: auto;
    }

    nav {
        display: none;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 0;
    }

    nav ul li {
        margin: 0;
        padding: 15px;
        text-align: left;
    }
}

/* Estils per millorar l'espaiat a diferents dispositius */
.section {
    padding: 5rem 1rem;
}

/* Ajustos per al footer en dispositius petits */
@media (max-width: 768px) {
    footer .container {
        text-align: center;
    }

    footer .social-icons {
        margin-bottom: 1rem;
    }
}