/* =========================================
   1. VARIÁVEIS E GERAL
   ========================================= */
:root {
    --primary-color: #2c3e50; /* Azul escuro profissional */
    --accent-color: #3498db;  /* Azul SMF vibrante */
    --bg-light: #f8f9fa;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. NAVBAR (MENU)
   ========================================= */
.navbar-custom {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar-brand img {
    height: 40px;
}
.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--accent-color) !important;
}

/* =========================================
   3. HERO SECTION (CABEÇALHO)
   ========================================= */
.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 30px;
    border-bottom: 5px solid var(--accent-color);
}

/* =========================================
   4. CARDS E WIDGETS GERAIS
   ========================================= */
.custom-card {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header-custom {
    background-color: white;
    border-bottom: 2px solid var(--accent-color);
    padding: 15px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Utilitários de Notícias e User Info */
.news-date { font-size: 0.8rem; color: #7f8c8d; }
.topic-link { text-decoration: none; color: #2c3e50; font-weight: 600; }
.topic-link:hover { color: var(--accent-color); }
.avatar-img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-color); }

/* Ajustes para o Bloco de Doações (Input Images) */
.custom-card input[type="image"] {
    max-width: 100%;
    height: auto;
    transition: transform 0.2s;
}
.custom-card input[type="image"]:hover {
    transform: scale(1.05);
}

/* =========================================
   5. RODAPÉ (FOOTER)
   ========================================= */
footer {
    margin-top: auto;
    background-color: #1a252f;
    color: #bdc3c7;
    padding: 40px 0;
    font-size: 0.85rem;
    border-top: 4px solid var(--accent-color);
}

/* =========================================
   6. WIDGET CURSOS (BANNER ANIMADO)
   ========================================= */
.sidebar-course-wrapper {
    width: 250px;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #000;
    margin: 0 auto;
}

.course-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: slideCycle 8s infinite;
    z-index: 1;
}

/* Cores dos Slides */
.slide-cyber { background: linear-gradient(135deg, #004d40 0%, #000000 100%); animation-delay: 0s; }
.slide-ai    { background: linear-gradient(135deg, #4a148c 0%, #1a237e 100%); animation-delay: 4s; }

/* Animação */
@keyframes slideCycle {
    0% { opacity: 0; transform: scale(1.1); }
    10% { opacity: 1; transform: scale(1); }
    45% { opacity: 1; transform: scale(1); }
    55% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 0; }
}

/* Textos e Botões do Widget */
.course-icon { font-size: 45px; margin-bottom: 10px; text-shadow: 0 0 10px rgba(255,255,255,0.5); }
.course-title { color: #fff; font-size: 18px; font-weight: 800; text-transform: uppercase; margin-bottom: 5px; line-height: 1.2; }
.course-desc { color: #e0e0e0; font-size: 12px; margin-bottom: 40px; }

.course-btn-area {
    position: absolute; bottom: 20px; left: 0; width: 100%; text-align: center; z-index: 10;
}
.course-btn {
    background: #ff9800; color: #fff; text-decoration: none;
    padding: 8px 20px; border-radius: 20px;
    font-weight: bold; font-size: 13px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s; border: 1px solid #f57c00;
    display: inline-block;
}
.course-btn:hover { background: #fff; color: #e65100; transform: scale(1.1); }

.top-brand {
    position: absolute; top: 10px; left: 0; width: 100%;
    text-align: center; font-size: 10px; color: rgba(255,255,255,0.5);
    z-index: 10; letter-spacing: 2px; font-weight: bold;
}

/* =========================================
   7. BANNER REVENDA (Sticky Wrapper)
   ========================================= */
.sticky-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    
    /* Fundo Amarelo com Gradiente e Borda */
    background: linear-gradient(120deg, #fff9c4 0%, #fff59d 50%, #fff9c4 100%);
    background-size: 200% 200%;
    border: 1px solid #fbc02d;
    border-left: 5px solid #f57f17; /* Laranja forte */
    border-radius: 4px;
    padding: 12px;
    
    /* Layout Flexível Inteligente */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 20px; /* Aumentei um pouco para separar dos outros widgets */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    animation: bgShimmer 5s ease infinite;
    text-decoration: none !important;
}

/* Animação do Fundo */
@keyframes bgShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Área de Informação */
.sticky-info-area {
    display: flex;
    align-items: center;
    flex: 1 1 150px; /* Ajustei para caber melhor na sidebar */
    min-width: 0;
}

/* Ícone */
.sticky-icon-r {
    font-size: 26px;
    margin-right: 12px;
    flex-shrink: 0;
    animation: swing 3s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(5deg); }
    40% { transform: rotate(-5deg); }
    50% { transform: rotate(0deg); }
}

/* Textos */
.sticky-text-group {
    display: flex;
    flex-direction: column;
}

.sticky-title-r {
    color: #e65100;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.sticky-tag-r {
    display: inline-block;
    background: #d32f2f;
    color: white;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 5px;
    white-space: nowrap;
}

.sticky-desc-r {
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Botão (CTA) */
.sticky-btn-r {
    background: #2e7d32;
    color: white !important;
    font-size: 12px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none !important;
    white-space: nowrap;
    border: 1px solid #1b5e20;
    text-align: center;
    transition: all 0.2s;
    flex: 0 0 auto;
}

.sticky-btn-r:hover {
    background: #1b5e20;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Responsividade Mobile e Sidebar */
@media (max-width: 600px) {
    .sticky-responsive-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .sticky-info-area {
        flex-direction: column;
        margin-bottom: 10px;
    }
    .sticky-icon-r {
        margin: 0 0 8px 0;
        font-size: 32px;
    }
    .sticky-btn-r {
        width: 100%;
    }
}
/* =========================================
   8. WIDGET REVENDA (DESIGN PREMIUM)
   ========================================= */
.hosting-promo-card {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); /* Azul Escuro Tecnológico */
    border-radius: 10px;
    padding: 25px 20px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
    text-decoration: none !important;
    display: block; /* Faz o card todo clicável se quiseres */
}

.hosting-promo-card:hover {
    transform: translateY(-5px); /* Sobe um pouco ao passar o rato */
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Ícone de Fundo Decorativo (Marca d'água) */
.hosting-bg-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 100px;
    color: rgba(255,255,255,0.05);
    transform: rotate(15deg);
    z-index: 0;
    pointer-events: none;
}

/* Conteúdo */
.hosting-content {
    position: relative;
    z-index: 1;
}

.hosting-badge {
    background-color: #ff4757; /* Vermelho Hot */
    color: white;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hosting-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #fff;
}

.hosting-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 20px;
}

.hosting-btn {
    background: #00d2d3; /* Ciano Vibrante */
    color: #000;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 210, 211, 0.3);
    transition: all 0.2s;
    border: none;
}

.hosting-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.05);
}

/* =========================================
   9. WIDGET TOP POSTADORES
   ========================================= */
.top-poster-item {
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}
.top-poster-item:hover {
    background-color: #f8f9fa;
    border-left: 3px solid var(--accent-color);
}
.top-poster-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    padding: 1px;
}
.top-poster-rank {
    font-size: 10px;
    font-weight: bold;
    color: #bdc3c7;
    margin-right: 10px;
    min-width: 15px;
}

/* =========================================
   AJUSTE DO LOGÓTIPO SVG
   ========================================= */
.navbar-brand .logo-svg {
    /* Define a altura máxima do logo na barra */
    height: 45px; 
    /* Garante que a largura se ajusta automaticamente para não distorcer */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Pequeno efeito ao passar o rato (opcional) */
.navbar-brand .logo-svg:hover {
    transform: scale(1.05); /* Aumenta ligeiramente */
}

/* Ajuste para telemóveis, se necessário */
@media (max-width: 768px) {
    .navbar-brand .logo-svg {
        height: 40px; /* Um pouco mais pequeno em ecrãs pequenos */
    }
}
/* Avatar Genérico (Quando não há foto) */
.avatar-placeholder {
    width: 45px;
    height: 45px;
    background-color: #e9ecef; /* Cinza claro */
    color: #adb5bd; /* Cinza escuro para o ícone */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 2px solid #dee2e6;
}
/* =========================================
   ESTILOS GERAIS DO PORTAL (SMFPT)
   ========================================= */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-light: #f8f9fa;
    --text-dark: #333;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar Personalizada */
.navbar-custom {
    background-color: var(--primary-color);
}
.navbar-custom .nav-link {
    color: rgba(255,255,255,0.85) !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.navbar-custom .nav-link:hover, 
.navbar-custom .nav-link.active {
    color: var(--accent-color) !important;
}

/* =========================================
   ESTILOS DO BLOG (LISTAGEM)
   ========================================= */
.blog-card {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: white;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-img-container {
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: #e9ecef; /* Cor de fundo caso a imagem falhe */
}

.blog-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem preenche sem esticar */
    transition: transform 0.5s;
}

.blog-card:hover .blog-img-container img {
    transform: scale(1.05);
}

/* Badge de Data - Ajustado para não quebrar */
.blog-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2; /* Garante que fica acima da imagem */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    font-size: 0.85rem;
    color: #95a5a6;
    margin-bottom: 15px;
}

.blog-meta i {
    margin-right: 5px;
}

/* =========================================
   WIDGETS LATERAIS
   ========================================= */
.widget {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
    color: var(--primary-color);
}

/* =========================================
   RODAPÉ (Padronizado)
   ========================================= */
footer {
    margin-top: auto;
    background-color: #1a252f;
    color: #bdc3c7;
    padding: 40px 0;
    border-top: 4px solid var(--accent-color);
}