/* ============================================================
   ESTRUTURA DAS SECÇÕES PRINCIPAIS
   .hof-section — secção dos projetos em destaque (slider)
   .testimonials-section — secção dos graduados (cards)
   Largura máxima centrada com padding lateral
   ============================================================ */
.hof-section, 
.testimonials-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

/* Título de secção em rosa */
.titulo-medio {
    text-align: center;
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    margin-bottom: 40px;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #FF00FF;
}

.highlight { color: #FF00FF; }

/* ============================================================
   SLIDER DE VÍDEOS (PROJETOS EM DESTAQUE)
   Navegação controlada por JS/open-titles.js — changeVideoSlide()
   Cada slide é um .video-slide — só o .active é visível
   Fundo rosa (#FF00FF)
   Para adicionar vídeo: copia um bloco .video-slide no hof.html
   ============================================================ */
.video-slider-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #FF00FF;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Slide individual — escondido por defeito */
.video-slide { display: none; animation: fadeIn 0.5s ease-in-out forwards; }
.video-slide.active { display: block; }

/* Wrapper do iframe com proporção 16:9 (padding-bottom: 56.25%) */
.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

/* iframe do YouTube ocupa todo o wrapper */
.iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* Botões prev/next do slider — circulares, pretos com ícone rosa */
.slider-prev, 
.slider-next {
    position: absolute;
    bottom: 45px;
    background: #000000;
    color: #FF00FF;
    border: none;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    z-index: 10;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover, .slider-next:hover { background: #ffffff; color: #000000; transform: scale(1.05); }
.slider-prev { left: 30px; }
.slider-next { right: 30px; }

/* Área de informação por baixo do vídeo — fundo rosa */
.video-slide .project-info {
    padding: 30px 20px 25px;
    background: #FF00FF;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Título do projeto em branco */
.video-slide .project-info h3 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* Autor em preto */
.video-slide .project-info .author {
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Descrição em cinza escuro itálico */
.video-slide .project-info .description {
    color: #1a1a1a;
    font-size: 14px;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   YOUTUBE FACADE (PROJETOS EM DESTAQUE)
   Substitui o iframe por uma thumbnail de alta resolução
   O iframe só carrega ao clicar no botão de play
   Controlado por JS/open-titles.js — listener de clique no .yt-facade
   Para usar: substitui o <iframe> por um .yt-facade no HTML
   ============================================================ */
.yt-facade {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    cursor: pointer;
}

/* Thumbnail em alta resolução (maxresdefault) com fallback para hqdefault */
.yt-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botão de play centralizado sobre a thumbnail */
.yt-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 255, 102, 0.9);
    color: #000;
    border: none;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.yt-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ffffff;
}

/* ============================================================
   CARDS DE TESTEMUNHOS (GRADUADOS)
   Grelha automática — mínimo 350px por card
   Fundo rosa, texto preto
   Clicável — abre modal com depoimento completo
   Controlado por JS/open-titles.js — openAlumniModal()
   Para adicionar graduado: copia um .testimonial-card no hof.html
   ============================================================ */
.testimonials-section {
    max-width: 1800px;
    margin: 50px auto;
    padding: 0 40px;
}

/* Grelha responsiva automática */
.testimonials-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
    align-items: stretch;
}

/* Card individual do graduado — fundo rosa */
.testimonial-card {
    background: #FF00FF;
    padding: 25px 20px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

/* Hover: borda branca, sobe, fundo rosa mais escuro */
.testimonial-card:hover {
    border-color: #ffffff;
    transform: translateY(-8px);
    background: #e600e6;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

/* Foto circular com borda preta */
.alumni-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #000000;
    display: block;
}

.alumni-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Cargo/função profissional em preto */
.cargo { color: #000000; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
/* Pré-visualização do depoimento em itálico escuro */
.depoimento-preview { color: #222222; font-style: italic; font-size: 14px; margin: 15px 0; line-height: 1.5; }
/* "VER DEPOIMENTO" — empurrado para o fundo do card via margin-top: auto */
.ler-mais { font-size: 11px; color: #000000; font-weight: 800; letter-spacing: 1px; margin-top: auto; padding-top: 10px; }
/* Texto completo escondido — lido pelo JS para preencher o modal */
.hidden-text { display: none; }

/* ============================================================
   MODAL DO DEPOIMENTO COMPLETO
   Abre ao clicar num card de graduado
   Fundo rosa, texto preto
   Controlado por JS/open-titles.js — openAlumniModal() / closeAlumniModal()
   ============================================================ */
.modal-v2 {
    display: none; /* Visível via JS: modal.style.display = "flex" */
    position: fixed;
    z-index: 10005;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Conteúdo do modal — fundo rosa, scrollável se o texto for longo */
.modal-content-v2 {
    background: #FF00FF;
    padding: 50px 40px;
    border-radius: 32px;
    max-width: 800px;
    width: 100%;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Botão × para fechar o modal */
.close-modal { position: absolute; right: 25px; top: 15px; color: #000000; font-size: 40px; font-weight: 300; cursor: pointer; line-height: 1; transition: color 0.2s ease; }
.close-modal:hover { color: #ffffff; }

/* Texto do depoimento em preto itálico */
#modal-body-v2 p { color: #000000; font-style: italic; line-height: 1.8; text-align: justify; font-size: 16px; margin-bottom: 15px; }
#modal-body-v2 p:last-child { margin-bottom: 0; }

/* ============================================================
   ANIMAÇÕES
   fadeIn — usado na transição entre slides do slider
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   RESPONSIVIDADE
   900px — tablets
   480px — telemóveis
   ============================================================ */

/* Tablets */
@media (max-width: 900px) {
    /* Botões do slider mais pequenos e reposicionados */
    .slider-prev, .slider-next { width: 50px; height: 50px; font-size: 20px; bottom: 50px; }
    .slider-prev { left: 15px; }
    .slider-next { right: 15px; }
    /* Info do slide com menos padding e altura automática */
    .video-slide .project-info { padding: 25px 75px; min-height: auto; }
    /* Testemunhos com padding lateral e cards mais pequenos */
    .testimonials-section { padding: 0 20px; }
    .testimonials-container { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
    .yt-play-btn { width: 60px; height: 60px; font-size: 22px; }
}

/* Telemóveis */
@media (max-width: 480px) {
    /* Secção de projetos colada ao conteúdo acima */
    .hof-section,
    .video-slider-container { margin-top: -10px !important; padding-top: 0 !important; }
    /* Slider com cantos menos arredondados */
    .video-slider-container { border-radius: 16px; }
    /* Botões do slider compactos */
    .slider-prev, .slider-next { bottom: 20px; width: 42px; height: 42px; font-size: 16px; }
    .slider-prev { left: 15px; }
    .slider-next { right: 15px; }
    /* Info do slide compacta — padding extra em baixo para não tapar os botões */
    .video-slide .project-info { padding: 20px 15px 65px; }
    .video-slide .project-info h3 { font-size: 18px; margin-bottom: 5px !important; }
    /* Secção de graduados colada ao slider */
    .testimonials-section { padding: 0 15px; margin-top: 15px !important; padding-top: 5px !important; }
    /* Título dos graduados mais compacto e aproximado dos cards */
    .testimonials-section h2,
    .testimonials-section .titulo-medio { margin-top: -20px !important; font-size: 1.3rem !important; }
    /* Cards em coluna única com espaçamento reduzido */
    .testimonials-container { grid-template-columns: 1fr; gap: 12px; justify-content: center; justify-items: center; }
    /* Card individual compacto */
    .testimonial-card { padding: 20px 15px; width: 100%; max-width: 380px; margin-bottom: 0 !important; }
    /* Modal com menos padding e cantos arredondados */
    .modal-content-v2 { padding: 40px 20px 30px 20px; border-radius: 20px; }
    .yt-play-btn { width: 48px; height: 48px; font-size: 18px; }
}