@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ========================================
   Variables y reset
   ======================================== */

:root {
    --ulpgc-blue: #004a87;
    --ulpgc-blue-dark: #003562;
    --ulpgc-orange: #ff9900;
    --ulpgc-orange-light: #ffad33;
    --background-light: #f7f9fa;
    --section-alt-bg: #f0f4f7;
    --footer-bg: #e8ecef;
    --background-white: #ffffff;
    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #ffffff;
    --border-color: #e0e4e8;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --transition: 0.3s ease;

    /* Contenedores (márgenes fluidos; el contenido interior no usa estas variables) */
    --content-width: 80%;
    --content-max: 1500px;
    --gutter: clamp(16px, 4vw, 48px);
    --section-pad-y: clamp(44px, 6vw, 64px);
    --section-pad-block: clamp(40px, 5vw, 50px);
    --navbar-social-gap: clamp(20px, 3vw, 40px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

::selection {
    background-color: var(--ulpgc-blue);
    color: var(--text-light);
}

/* ========================================
   Estilos generales
   ======================================== */

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-white);
    color: var(--text-dark);
    line-height: 1.7;
    font-weight: 400;
}

.container {
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    padding-block: 20px;
    padding-inline: 0;
}

h1, h2 {
    color: var(--ulpgc-blue);
    font-weight: 700;
}

a {
    color: var(--ulpgc-blue);
    transition: color var(--transition);
}

i.fas,
i.fa-solid,
i.far,
i.fa-regular {
    margin-right: 6px;
}

a:hover {
    color: var(--ulpgc-orange);
}

/* ========================================
   Animacion fade-in al hacer scroll
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Cabecera con logos institucionales
   ======================================== */

.site-header {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    padding-block: clamp(14px, 2vw, 20px);
    padding-inline: 0;
    position: relative;
    z-index: 999;
}

.site-header .logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    gap: 28px;
    min-height: 88px;
}

.site-header .logo-group {
    display: flex;
    align-items: center;
    gap: clamp(28px, 5vw, 44px);
    flex-shrink: 0;
}

.site-header .logo-group a,
.site-header .logo-eu {
    display: flex;
    align-items: center;
    line-height: 0;
}

.site-header .logo-ulpgc img,
.site-header .logo-gobcan img {
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition);
}

.site-header .logo-ulpgc img {
    height: 94px;
    max-width: min(340px, 48vw);
}

.site-header .logo-gobcan img {
    height: 78px;
    max-width: min(190px, 30vw);
}

.site-header .logo-eu img {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: opacity var(--transition);
}

.site-header a:hover img {
    opacity: 0.82;
}

@media (max-width: 768px) {
    .site-header {
        padding-block: 14px;
        padding-inline: 0;
    }

    .site-header .logo-container {
        min-height: 64px;
        gap: 16px;
    }

    .site-header .logo-group {
        gap: 16px;
    }

    .site-header .logo-ulpgc img {
        height: 70px;
        max-width: 50vw;
    }

    .site-header .logo-gobcan img {
        height: 60px;
        max-width: 32vw;
    }

    .site-header .logo-eu img {
        height: 55px;
    }
}

/* ========================================
   Barra de navegacion (Navbar)
   ======================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(0, 40, 75, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--ulpgc-orange);
    padding-inline: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-inner {
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
    padding-inline: 0;
}

.navbar-brand {
    color: var(--text-light);
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 0;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.navbar-brand:hover {
    color: var(--ulpgc-orange);
}

.navbar-links {
    display: flex;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
    gap: 4px;
    flex-shrink: 0;
}

.navbar-links a {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 14px 20px;
    font-size: 1em;
    font-weight: 500;
    transition: color var(--transition);
}

.navbar-links a:hover {
    color: var(--ulpgc-orange-light);
}

.navbar-links a.active {
    color: var(--ulpgc-orange);
}

.navbar-social {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: var(--navbar-social-gap);
}

.navbar-social a {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 1.2rem;
    text-decoration: none;
    padding: 14px 0;
    transition: color var(--transition);
}

.navbar-social a:hover {
    color: var(--ulpgc-orange-light);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5em;
    cursor: pointer;
    padding: 14px 0;
}

/* ========================================
   Hero
   ======================================== */

.hero {
    background: linear-gradient(160deg, #00385f 0%, var(--ulpgc-blue) 40%, #005a9e 100%);
    color: var(--text-light);
    text-align: center;
    padding-block: var(--section-pad-y);
    padding-inline: 0;
}

.hero-inner {
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: 0;
}

.hero h1 {
    color: var(--text-light);
    font-size: 2rem;
    margin: 0 0 32px;
    line-height: 1.25;
    font-weight: 700;
}

.hero-columns {
    display: flex;
    max-width: 1400px;
    margin-inline: auto;
    align-items: flex-start;
    gap: 48px;
    text-align: left;
}

.hero-col {
    flex: 1;
    min-width: 0;
}

.hero-col--right {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 48px;
}

.hero-acronym {
    font-size: 1.75rem;
    color: var(--ulpgc-orange);
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
}

.hero-funding {
    font-size: 1rem;
    margin: 0;
    color: var(--text-light);
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 300;
}

.hero-details {
    margin: 0;
}

.hero-detail-item {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-light);
}

.hero-detail-item:last-child {
    margin-bottom: 0;
}

.hero-detail-item strong {
    font-weight: 700;
}

/* ========================================
   Secciones de contenido
   ======================================== */

section {
    padding-block: var(--section-pad-block);
    padding-inline: 0;
}

section:nth-child(even) {
    background-color: var(--section-alt-bg);
}

.title-wrapper {
    text-align: center;
    margin-bottom: 45px;
}

section h2 {
    font-size: 2.2em;
    display: inline-block;
    position: relative;
    margin: 0;
    transition: transform 0.4s ease;
}

section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--ulpgc-orange);
    margin: 12px auto 0;
    border-radius: 2px;
    transition: width 0.4s ease;
}

section:hover h2 {
    transform: scale(1.03);
}

section:hover h2::after {
    width: 100%;
}

/* ========================================
   Seccion Resumen
   ======================================== */

#resumen {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

#resumen::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 750px;
    height: 750px;
    background: url('../images/robot.png') center / contain no-repeat;
    opacity: 0.10;
    mask-image: radial-gradient(ellipse 50% 50% at center, black 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, black 50%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

#resumen .container {
    position: relative;
    z-index: 1;
}

.summary-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.15em;
    color: var(--text-medium);
}

.summary-content p {
    margin-bottom: 1.2em;
}

/* ========================================
   Seccion Equipo
   ======================================== */

.team-subsection {
    margin-bottom: 60px;
}

.team-subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    text-align: center;
    font-size: 1.5em;
    color: var(--ulpgc-blue);
    margin-bottom: 30px;
    font-weight: 700;
}

.team-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.team-pyramid .pyramid-row {
    margin-bottom: 0;
}

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.team-member-link {
    text-decoration: none;
}

.team-member {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px 25px;
    text-align: center;
    width: 250px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.member-icon {
    font-size: 2.5em;
    color: var(--ulpgc-blue);
    margin-bottom: 12px;
}

.member-name {
    display: block;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-dark);
}

.member-surname {
    display: block;
    font-size: 1.1em;
    color: var(--text-medium);
    margin-top: 4px;
}

/* ========================================
   Seccion Publicaciones
   ======================================== */

.publication-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.publication-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--ulpgc-orange);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.publication-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.publication-type {
    display: inline-block;
    background-color: var(--ulpgc-blue);
    color: var(--text-light);
    font-size: 0.75em;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.publication-title {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
}

.publication-authors {
    font-size: 0.95em;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.publication-venue {
    font-size: 0.92em;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 12px;
}

.publication-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--ulpgc-blue);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--ulpgc-blue);
    border-radius: 6px;
    transition: background-color var(--transition), color var(--transition);
}

.publication-link:hover {
    background-color: var(--ulpgc-blue);
    color: var(--text-light);
}

.tfg-card > .publication-link {
    margin-top: 14px;
}

/* ========================================
   Seccion Trabajos Fin de Grado
   ======================================== */

.tfg-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tfg-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--ulpgc-blue);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.tfg-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tfg-title {
    font-size: 1.12em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.5;
}

.tfg-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tfg-meta-item {
    font-size: 0.95em;
    color: var(--text-medium);
}

.tfg-meta-item i {
    width: 20px;
    text-align: center;
    color: var(--ulpgc-blue);
    margin-right: 8px;
}

.tfg-meta-label {
    font-weight: 500;
    color: var(--text-dark);
}

.tfg-year {
    display: inline-block;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    font-size: 0.8em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    color: var(--ulpgc-blue);
    margin-bottom: 14px;
}

/* ========================================
   Encabezado de pagina interna
   ======================================== */

.page-header {
    background: linear-gradient(160deg, #00385f 0%, var(--ulpgc-blue) 40%, #005a9e 100%);
    color: var(--text-light);
    padding-block: clamp(36px, 5vw, 45px);
    padding-inline: 0;
}

.page-header-inner {
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    text-align: center;
    padding-inline: 0;
}

.page-header h1 {
    color: var(--text-light);
    font-size: 2.4em;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35em;
}

.page-header h1 i {
    margin-right: 0;
}

.page-header p {
    font-size: 1.15em;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   Seccion Operación
   ======================================== */

.operacion-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.operacion-left {
    flex: 1;
}

.operacion-right {
    flex: 1;
}

.operacion-left h2 {
    margin-bottom: 20px;
}

.operacion-left p {
    font-size: 1.1em;
    line-height: 1.6;
}

.operacion-right p {
    margin-bottom: 15px;
}

.operacion-right ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.operacion-right li {
    margin-bottom: 8px;
}

.logos-institucionales {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.logos-institucionales img {
    width: 120px;
    height: auto;
}

.separator {
    font-size: 2em;
    color: var(--text-medium);
    font-weight: bold;
}

@media (max-width: 768px) {
    .operacion-content {
        flex-direction: column;
    }
    .logos-institucionales {
        flex-wrap: wrap;
        gap: 15px;
    }
    .logos-institucionales img {
        width: 100px;
    }
}

/* ========================================
   Footer
   ======================================== */

/* ========================================
   Pie de página
   ======================================== */

.site-footer {
    background-color: var(--background-white);
    border-top: 3px solid var(--ulpgc-blue);
    padding: 0;
    gap: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-wrapper {
    width: var(--content-width);
    max-width: var(--content-max);
    margin-inline: auto;
    padding-block: clamp(14px, 2vw, 16px) clamp(12px, 1.5vw, 14px);
    padding-inline: 0;
    text-align: center;
}

/* Bloque de información de la operación (inicio) */
#operacion .operacion-block {
    display: flex;
    gap: 40px;
    text-align: left;
}

.operacion-left {
    flex: 1;
}

.operacion-left h3 {
    font-size: 1.5em;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    font-weight: 700;
}

.operacion-left p {
    font-size: 1em;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.5;
}

.operacion-right {
    flex: 1;
    font-size: 0.85em;
    color: var(--text-medium);
}

.operacion-right p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.operacion-right strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* Logos en el footer */
.logos-footer {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
}

.logos-footer img {
    width: 180px;
    height: 96px;
    object-fit: contain;
}

/* Cofinanciado por UE */
.logos-footer img:nth-child(1) {
    width: 205px;
    height: 108px;
}

/* Ministerio de Hacienda */
.logos-footer img:nth-child(2) {
    width: 150px;
    height: 80px;
}

/* Fondos Europeos */
.logos-footer img:nth-child(3) {
    width: 205px;
    height: 108px;
}

/* Gobierno de Canarias (logo horizontal) */
.logos-footer img:nth-child(4) {
    width: auto;
    height: 100px;
    max-width: 260px;
}

/* Copyright en el footer */
.site-footer .footer-copyright {
    margin: 0;
    font-size: 0.85em;
    font-weight: 400;
    color: var(--text-medium);
    letter-spacing: 0.2px;
    line-height: 1.5;
}


/* Responsive */
@media (max-width: 1200px) {
    #operacion .operacion-block {
        flex-direction: column;
        gap: 20px;
    }

    .logos-footer {
        flex-wrap: wrap;
        justify-content: space-evenly;
        row-gap: 15px;
    }

    .logos-footer img {
        width: 145px;
        height: 78px;
        object-fit: contain;
    }

    .logos-footer img:nth-child(1) {
        width: 165px;
        height: 88px;
    }

    .logos-footer img:nth-child(2) {
        width: 120px;
        height: 64px;
    }

    .logos-footer img:nth-child(3) {
        width: 165px;
        height: 88px;
    }

    .logos-footer img:nth-child(4) {
        width: auto;
        height: 82px;
        max-width: 200px;
    }

    .operacion-right {
        font-size: 0.9em;
    }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: 10px;
    }

    .navbar-links.open {
        display: flex;
    }

    .navbar-inner {
        flex-wrap: wrap;
    }

    .navbar-brand {
        flex: 1;
        min-width: 0;
    }

    .navbar-links {
        margin-left: 0;
        order: 4;
        width: 100%;
    }

    .navbar-social {
        order: 2;
        margin-left: auto;
    }

    .navbar-toggle {
        order: 3;
        padding: 0;
    }

    .navbar-links a {
        padding: 12px 20px;
    }

    .navbar-links a.active {
        color: var(--ulpgc-orange);
    }

    .hero-inner {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 1.65rem;
        margin-bottom: 24px;
        text-align: center;
    }

    .hero-columns {
        flex-direction: column;
        gap: 28px;
    }

    .hero-col--right {
        border-left: none;
        padding-left: 0;
    }

    .hero-acronym {
        font-size: 1.45rem;
        margin-bottom: 16px;
        text-align: center;
    }

    .hero-funding {
        font-size: 0.95rem;
    }

    .hero-detail-item {
        font-size: 0.9rem;
    }

    .page-header h1 {
        font-size: 1.8em;
    }

    section h2 {
        font-size: 1.8em;
    }

    .summary-content {
        font-size: 1em;
    }

    .team-member {
        width: 100%;
        max-width: 300px;
    }

    .publication-card,
    .tfg-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding-block: 12px;
        padding-inline: 0;
    }

    .site-header .logo-container {
        min-height: 52px;
    }

    .site-header .logo-ulpgc img {
        height: 54px;
    }

    .site-header .logo-gobcan img {
        height: 46px;
        max-width: 28vw;
    }

    .site-header .logo-eu img {
        height: 46px;
    }

    .hero h1 {
        font-size: 1.35rem;
    }

    .hero-acronym {
        font-size: 1.25rem;
    }
}
