/* ===================================
    SERVIÇOS - ESTILO GERAL (FINAL)
====================================== */

/* --- Banner de Topo --- */
.services-header {
    padding: 180px 0 100px 0;
    overflow: hidden;
    /* IMPORTANTE: Garante que as formas não saiam do azul */
    position: relative;
    z-index: 1;
    transition: background 0.5s ease;
}

.services-header.bg-blue {
    background-color: var(--blue);
}

.services-header.bg-yellow {
    background-color: var(--yellow);
}

.services-header.bg-green {
    background-color: var(--green);
}

.services-header.bg-orange {
    background-color: var(--orange);
}

.services-header .heading {
    font-family: 'Handlee', cursive !important;
    font-size: 3.5rem;
    color: #fff;
    margin-top: 70px !important;
    position: relative;
    z-index: 5;
    /* Garante que o título está acima das formas */
}

@media (max-width: 767px) {
    .services-header .heading {
        font-size: 2.5rem;
    }
}


.services-header .sub-heading {
    position: relative;
    z-index: 5;
}

/* --- Meia-lua do Logótipo --- */
.logo-half-moon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 150px;
    background-color: #ffffff;
    border-bottom-left-radius: 130px;
    border-bottom-right-radius: 130px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    z-index: 10;
    /* Fica acima de tudo */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.logo-half-moon img {
    max-width: 120px;
    height: auto;
    margin-top: -30%;
}

.logo-half-moon img {
    max-width: 120px;
    height: auto;
    margin-top: -30%;
}

@media (max-width: 767px) {
    .logo-half-moon img {
        max-width: 75px;
        height: auto;
        margin-top: -20%;
    }
}

/* --- Formas Geométricas (Equilibradas: 5 Esq / 5 Dir) --- */
.geo-item {
    position: absolute;
    opacity: 0.25;
    z-index: 0;
    /* No fundo */
    pointer-events: none;
    animation: floating-random 15s infinite ease-in-out;
}

/* Estilo das Formas */
.triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid #fff;
}

.circle {
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 50%;
}

.square {
    width: 30px;
    height: 30px;
    background: var(--yellow);
}

.circle-small {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
}

.triangle-small {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 25px solid var(--yellow);
}

.hexagon {
    width: 40px;
    height: 23px;
    background: #fff;
    opacity: 0.4;
}

.line-long {
    width: 80px;
    height: 4px;
    background: #fff;
    transform: rotate(-45deg);
}

.circle-medium {
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.diamond {
    width: 30px;
    height: 30px;
    background: #fff;
    transform: rotate(45deg);
    opacity: 0.3;
}

.rectangle {
    width: 50px;
    height: 12px;
    background: #fff;
    opacity: 0.2;
}

/* Posicionamento Estratégico (5 na Esquerda e 5 na Direita) */

/* ESQUERDA */
.geo-item:nth-child(1) {
    top: 15%;
    left: 5%;
    animation-duration: 12s;
}

/* Triangle */
.geo-item:nth-child(2) {
    top: 50%;
    left: 18%;
    animation-duration: 18s;
}

/* Circle */
.geo-item:nth-child(3) {
    top: 80%;
    left: 8%;
    animation-duration: 15s;
}

/* Square */
.geo-item:nth-child(4) {
    top: 35%;
    left: 2%;
    animation-duration: 22s;
}

/* Circle-small */
.geo-item:nth-child(5) {
    top: 65%;
    left: 25%;
    animation-duration: 14s;
}

/* Triangle-small */

/* DIREITA */
.geo-item:nth-child(6) {
    top: 20%;
    right: 5%;
    animation-duration: 20s;
}

/* Hexagon */
.geo-item:nth-child(7) {
    top: 60%;
    right: 15%;
    animation-duration: 16s;
}

/* Line-long */
.geo-item:nth-child(8) {
    top: 10%;
    right: 22%;
    animation-duration: 25s;
}

/* Circle-medium */
.geo-item:nth-child(9) {
    top: 40%;
    right: 3%;
    animation-duration: 13s;
}

/* Diamond */
.geo-item:nth-child(10) {
    top: 85%;
    right: 10%;
    animation-duration: 19s;
}

/* Rectangle */

@keyframes floating-random {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-35px) rotate(15deg);
    }
}

/* Responsividade */
@media (max-width: 767px) {
    .services-header {
        padding: 120px 0 60px 0;
    }

    .geo-item:nth-child(n+6) {
        display: none;
    }

    /* Esconde as da direita no mobile para limpar o visual */
    .logo-half-moon {
        width: 180px;
        height: 100px;
        padding-top: 20px;
    }
}

/* --- Cartões Modernos --- */
.service-card-modern {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    margin-bottom: 40px;
}

/* Row que estica colunas */
.service-card-modern .row {
    display: flex;
    align-items: stretch;
    /* Garante altura uniforme */
}

/* Imagens */
.service-card-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* Colunas (remove padding das bordas) */
.service-card-modern .col-md-6 {
    display: flex;
    flex-direction: column;
}

/* Conteúdo de Texto */
.text-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px !important;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Tipografia */
.service-card-modern h3 {
    font-family: 'Handlee', cursive !important;
    font-size: 2rem;
    margin: 0 20px 15px 20px !important;
    transition: 0.4s;
}

.service-card-modern ul {
    color: #605c5c;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 20px 15px 30px !important;
    transition: 0.4s;
}


.service-card-modern p {
    color: #605c5c;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 20px 15px 20px !important;
    transition: 0.4s;
}

.text-box-content ul.list-unstyled {
    margin: 0 20px 0 20px !important;
}

.text-box-content ul li {
    font-size: 0.9rem;
    padding: 3px 0;
    transition: 0.4s;
}

.text-box-content ul li i {
    color: var(--green);
    margin-right: 8px;
}

/* --- Efeitos Hover --- */
.service-card-modern:hover {
    transform: translateY(-5px);
}

.service-card-modern:hover img {
    transform: scale(1.05);
}

.service-card-modern:hover .text-box-content,
.service-card-modern:hover .text-box-content h3,
.service-card-modern:hover .text-box-content p,
.service-card-modern:hover .text-box-content li {
    color: #ffffff !important;
}

.service-card-modern:hover .text-box-content ul li i {
    color: #ffffff !important;
}

/* Cores Hover Dinâmicas (o teu JS aplica a cor ao fundo) */
.service-card-modern:hover .text-box-content {
    background-color: var(--blue);
}

/* Ajustar no JS conforme necessário */

/* Responsividade */
@media (max-width: 767px) {
    .text-box-content {
        padding: 30px !important;
    }

    .services-header {
        padding: 120px 0 60px 0;
    }
}

.btn.blue-btn {
    padding: 15px 40px !important;
    font-size: 1.1rem !important;
    margin-top: 30px;
}

/*--------------------------------------------------------------SOBRE NOS----------------------------------------------*/
/* Espaçamento geral */
.sobre-nos-container .padding-top {
    padding-top: 80px;
}

/* Títulos específicos do "Sobre Nós" */
.sobre-titulo-custom {
    font-family: 'Handlee', cursive !important;
    font-size: 3rem !important;
    color: #202020;
    margin-bottom: 40px !important;
}

@media (max-width: 767px) {
    .sobre-titulo-custom {
        font-size: 2rem !important;

    }
}

.sobre-titulo-custom.quem-somos {
    text-align: left !important;
}

/* Missão e Visão */
.card-missao-visao {
    padding: 40px;
    background: #fdfdfd;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.card-missao-visao h3 {
    font-family: 'Handlee', cursive !important;
    font-size: 2rem !important;
}

/* --- Cartões dos Valores --- */
.valor-card {
    padding: 10px;
    background: #fff;
    border: 2px solid var(--dark-gray);
    /* Borda cinzenta padrão */
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s ease;
    cursor: pointer;

    /* Centralização Total */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    height: 60px;
    width: 100%;
    white-space: nowrap;
    /* Impede a palavra de saltar de linha dentro do card */
}

/* Hover: Efeito de elevação e cor (A cor de fundo é aplicada pelo JS) */
.valor-card:hover {
    color: #ffffff !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    /* O JS vai injetar o background-color aqui */
}

/* --- AJUSTES RESPONSIVOS ESPECÍFICOS --- */

/* 1. Entre 400px e 767px (2 por linha) */
@media (min-width: 401px) and (max-width: 767px) {
    .valor-card {
        font-size: 13px;
        /* Diminui a fonte para palavras longas caberem em 50% da largura */
    }
}

/* 2. Abaixo de 400px (1 por linha como pediste) */
@media (max-width: 400px) {
    .valor-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .valor-card {
        font-size: 16px;
        /* Pode voltar ao normal pois tem a largura toda */
        margin-bottom: 10px;
    }
}

.inscricao-sec .inscricao-heading {
    font-family: 'Handlee', cursive !important;
    font-size: 40px;
    color: #202020;
    margin-bottom: 30px;
}

/* Formulário customizado */
.inscricao-sec .form-control {
    border-radius: 10px;
    border: solid 2px #eceef2;
    padding: 15px;
    height: 50px;
}

.inscricao-sec textarea.form-control {
    height: 150px;
}

/* Lista de Contactos Alinhada */
.inscricao-details .contact-list li {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #605c5c;
}

.inscricao-details .contact-list li i {
    font-size: 28px;
    min-width: 40px;
    /* Garante que o texto começa sempre na mesma vertical */
}

@media (max-width: 400px) {

    /* Seleciona as colunas dos valores dentro da secção sobre-nos */
    .sobre-nos-container .col-6 {
        flex: 0 0 100% !important;
        /* Força a ocupar a largura toda */
        max-width: 100% !important;
    }

    /* Ajuste opcional no card para não ficar demasiado alto */
    .valor-card {
        margin-bottom: 10px;
        height: 50px;
        /* Reduz ligeiramente a altura para poupar espaço vertical */
    }
}

/*--------------------------------------------------------------INSCRIÇÕES----------------------------------------------*/
/* Mapa */
.map-container {
    padding: 10px;
    background: #fff;
    border: 2px solid #f4f4f4;
    transition: 0.4s;
}

.map-container:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    filter: grayscale(20%);
    transition: 0.4s;
}

.map-container iframe:hover {
    filter: grayscale(0%);
}

/*--------------------------------------------------------------NOVIDADES----------------------------------------------*/
/* Removemos qualquer resíduo de pontilhado na página de novidades */
.news-page .dot-background {
    display: none !important;
}

.news-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    transition: all 0.4s ease;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: block;
    /* Para o link envolver o card */
    text-decoration: none !important;
}

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

/* Garante que o hover funciona na div pai */
.news-card:hover .news-content {
    background-color: var(--blue);
}

.news-card:hover h3,
.news-card:hover p {
    color: #ffffff !important;
}

.share-icons a {
    font-size: 14px;
    /* Ícones mais pequenos */
    color: #605c5c;
    transition: 0.3s;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-icons a:hover {
    color: var(--blue);
    border-color: var(--blue);
}

.content img {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 10px;
}

/*-------------------------------------------------------------- INSTALAÇÕES ----------------------------------------------*/

/* Espaçamento e Estilo do Texto Explicativo (Intro) */
.sobre-titulo-custom {
    font-family: 'Handlee', cursive !important;
    font-size: 2.5rem !important;
    color: #202020;
    margin-bottom: 20px !important;
}

.sobre-texto {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #605c5c;
    line-height: 1.7;
}

/* Estrutura da Galeria */
.gallery-item {
    transition: all 0.5s ease;
}

/* Container que segura a imagem e o overlay */
.gallery-img-container {
    position: relative;
    overflow: hidden;
    height: 300px;
    /* Altura fixa para manter a grelha uniforme */
    border-radius: 15px;
}

.gallery-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.5s ease;
}

/* Filtro Escuro (Overlay) */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Cor preta com 70% de transparência */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Invisível por padrão */
    transition: opacity 0.4s ease;
}

/* Conteúdo dentro do Overlay (Texto + Ícone) */
.overlay-content {
    text-align: center;
    color: #ffffff;
    padding: 20px;
    transform: translateY(20px);
    /* Começa um pouco abaixo para animar a subir */
    transition: transform 0.4s ease;
}

.overlay-content h4 {
    font-family: 'Handlee', cursive !important;
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.overlay-content p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Ícone de "+" em Amarelo */
.plus-icon {
    font-size: 32px;
    color: var(--yellow);
    display: block;
    margin-top: 10px;
}

/* --- EFEITOS DE HOVER --- */

/* Ativar overlay e texto */
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
    /* Texto sobe para a posição original */
}

/* Zoom suave na imagem */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Utilitários */
.hidden-photo {
    display: none;
}

/* Botão "Mostrar Mais" */
.blue-btn {
    padding: 12px 35px !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blue-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 189, 0.3);
}

/* Ajuste Responsivo */
@media (max-width: 767px) {
    .gallery-img-container {
        height: 220px;
        /* Reduz altura em telemóvel para não ocupar muito ecrã */
    }

    .overlay-content h4 {
        font-size: 1.3rem;
    }
}

/*------------------------------------- PÁGINAS LEGAIS -----------------------------------------------------------*/

.legal-page-wrapper {
    background-color: #f4f1ea;
    /* Fundo bege muito suave como na imagem */
    min-height: 100vh;
}

.legal-title {
    font-family: 'Handlee', cursive !important;
    /* Mantendo a tua fonte de títulos */
    font-size: 3.5rem;
    font-weight: 900;
    color: #202020;
    letter-spacing: -1px;
}

.legal-content-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 60px;
    line-height: 1.8;
}

.legal-text-body {
    font-family: 'Roboto', sans-serif;
    font-size: 1.05rem;
    color: #444;
}

/* Estilização interna para o que vem do CKEditor */
.legal-text-body h2,
.legal-text-body h3 {
    font-family: 'Handlee', cursive !important;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #202020;
}

.legal-text-body p {
    margin-bottom: 20px;
}

.legal-text-body strong {
    color: #000;
}

/* Responsividade */
@media (max-width: 767px) {
    .legal-title {
        font-size: 2.2rem;
    }

    .legal-content-card {
        padding: 30px 20px;
    }
}