/*
Theme Name: INSTIAC
Theme URI: https://instiac.ac.mz
Author: INSTIAC
Author URI: https://instiac.ac.mz
Description: Tema oficial do Instituto Superior de Ciências e Administração de Chimoio (INSTIAC), baseado no template Universo - Educational & University Template.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: instiac
Tags: education, university, responsive, bootstrap, courses, events
*/

/* ==========================================================================
   Importações e Reset Base
   ========================================================================== */

/* Todos os estilos visuais estão nos assets/css/ do tema.
   Este ficheiro serve apenas como identificador do tema WordPress.
   Adicione aqui apenas substituições/overrides específicos do INSTIAC. */

/* Override: Cor primária INSTIAC */
/* Valores por omissão — sobrescritos dinamicamente pelo Customizer via wp_head */
:root {
    --instiac-primary:   #012951;
    --instiac-secondary: #e8a020;
    --instiac-accent:    #c0392b;
}

/* Owl Carousel no hero — garantir visibilidade após init */
.owl-carousel { display: block; }

/* Secção Sobre — imagem de tamanho fixo */
#about .section-content img.add-margin {
    width: 100%;
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
    margin-bottom: 12px;
}
#about .section-content .read-more {
    display: inline-block;
    margin-top: 12px;
}

/* Notícias — item com thumbnail à esquerda */
.news-item-thumb {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}
.news-item-thumb:last-child {
    border-bottom: 0;
    margin-bottom: 4px;
}
.news-thumb-img {
    flex-shrink: 0;
    display: block;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 3px;
    background: #e8e8e8;
}
.news-thumb-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity .2s;
}
.news-thumb-img:hover img { opacity: .85; }
.news-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 22px;
}
.news-thumb-body {
    flex: 1;
    min-width: 0;
}
.news-thumb-body figure.date {
    margin: 0 0 3px;
    font-size: 11px;
}
.news-thumb-body header a {
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#news-small .read-more {
    display: inline-block;
    margin-top: 8px;
}

/* Arquivo Galeria — grid responsivo (evita conflito com .gallery-list do template) */
.instiac-archive-gallery {
    list-style: none;
    padding: 0;
    margin: 0;
}
.instiac-archive-gallery .instiac-gallery-item {
    padding: 6px;
    margin-bottom: 0;
    float: none;         /* anula float do bootstrap row hack */
    height: auto;        /* cancela height:100px do .gallery-list li */
    width: auto;         /* cancela width:100px */
    overflow: visible;
    position: static;
}
.instiac-archive-gallery .instiac-gallery-item a.image-popup {
    display: block;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}
.instiac-archive-gallery .instiac-gallery-item a.image-popup::after {
    /* reaplicar o efeito hover do template */
    font-family: 'fontawesome';
    content: "\f06e";
    color: #fff;
    background: rgba(0,0,0,.45);
    border-radius: 50%;
    display: inline-block;
    font-size: 18px;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.instiac-archive-gallery .instiac-gallery-item a.image-popup:hover::after {
    opacity: 1;
}
.instiac-archive-gallery .instiac-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 2px;
    transition: transform .3s, opacity .2s;
}
.instiac-archive-gallery .instiac-gallery-item a.image-popup:hover img {
    transform: scale(1.05);
    opacity: .9;
}
.instiac-archive-gallery .instiac-gallery-item p {
    font-size: 11px;
    text-align: center;
    margin: 5px 0 0;
    color: #777;
    line-height: 1.3;
}

/* Docentes — imagem fixa para não baralhar o card */
#our-professors .professor-image {
    width: 76px;
    height: 76px;
    overflow: hidden;
    flex-shrink: 0;
}
#our-professors .professor-image img,
#our-professors .professor-image a img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    object-position: center top;
    display: block;
}
#our-professors .professor-thumbnail aside {
    margin-left: 88px;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#our-professors .read-more {
    display: inline-block;
    margin-top: 8px;
    position: static;
}

/* Parceiros — logos altura fixa e alinhados */
#partners .logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
#partners .logos .logo {
    flex: 0 0 auto;
}
#partners .logos .logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
}
#partners .logos .logo img {
    max-height: 60px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(30%);
    transition: filter .2s, opacity .2s;
}
#partners .logos .logo a:hover img {
    filter: grayscale(0%);
    opacity: .85;
}

/* Testemunhos — avatar de tamanho fixo */
#testimonials .author-picture,
#testimonials .author-carousel .author-picture {
    width: 80px;
    height: 80px;
    min-width: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
}
#testimonials .author-picture img,
#testimonials .author-carousel .author-picture img {
    width: 80px;
    height: 80px;
    max-height: 80px;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 50%;
}

/* Ajustes WordPress específicos */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1em;
}

.wp-caption img {
    display: block;
    width: 100%;
}

.wp-caption-text {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 5px;
}

.alignleft {
    float: left;
    margin: 0 20px 10px 0;
}

.alignright {
    float: right;
    margin: 0 0 10px 20px;
}

.aligncenter {
    display: block;
    margin: 0 auto 10px;
}

.alignnone {
    margin: 0 0 10px;
}

/* Paginação WordPress */
.page-links {
    margin: 20px 0;
}

/* Galeria WordPress */
.gallery {
    margin-bottom: 20px;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
}

/* Acessibilidade - skip link */
.skip-link {
    background: #1a3c6e;
    color: #fff;
    font-weight: 700;
    left: -9999rem;
    padding: 15px 23px;
    position: absolute;
    text-decoration: none;
    top: -9999rem;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
    z-index: 100000;
}
