/* =====================================================
   SID ENTERPRISE - Portal (Public) Styles
   ===================================================== */

/* ===== Top Accent Bar ===== */
.portal-topbar {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #dc2626 50%, #fff 50% 66.67%, #dc2626 66.67%) 1;
}

.portal-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-left i,
.topbar-right i {
    font-size: 11px;
    opacity: 0.6;
}

.topbar-sep {
    opacity: 0.3;
    margin: 0 4px;
}

/* ===== Branding Header ===== */
.portal-header {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.portal-header .container {
    padding-top: 16px;
    padding-bottom: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

/* When a custom logo image is used */
.brand-logo.has-img {
    background: transparent;
}

.brand-logo-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
}

.brand-text h1 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin: 0;
}

.brand-text p {
    font-size: 13px;
    color: var(--text-tertiary);
    margin: 2px 0 0;
    line-height: 1.3;
}

.brand-text .brand-province {
    font-size: 11px;
    opacity: 0.7;
}

/* ===== Navigation Bar ===== */
.portal-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.portal-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom-color: transparent;
}

.portal-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
}

/* Portal Main — no fixed offset since nav is sticky, not fixed */
.portal-main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    bottom: -100px;
    left: -50px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .value {
    font-size: 32px;
    font-weight: 800;
    color: white;
}

.hero-stat .label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Section */
.section {
    padding: 64px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-50);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Article Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.article-card .card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary-200);
    overflow: hidden;
}

.article-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .card-content {
    padding: 20px;
}

.article-card .card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.article-card .card-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.article-card .card-content h3 a:hover {
    color: var(--primary);
}

.article-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-link {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text-primary);
}

.quick-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
    color: var(--primary);
}

.quick-link .ql-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
}

.quick-link h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-link p {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Portal Footer */
.portal-footer {
    background: var(--gray-900);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col p,
.footer-col a {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: white;
}

.footer-col i {
    margin-right: 8px;
    width: 16px;
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .portal-topbar {
        display: none;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .brand-text h1 {
        font-size: 17px;
    }

    .brand-text p {
        font-size: 11px;
    }

    .brand-text .brand-province {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-link {
        padding: 10px 14px;
        border-radius: var(--radius-md);
    }

    .nav-link::after {
        display: none;
    }

    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .hero-stat .value {
        font-size: 24px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.portal-body {
    background: var(--bg-primary);
}