:root {
    --rgc-navy: #111111;
    --rgc-blue: #2b2b2b;
    --rgc-red: #ed1c24;
    --rgc-orange: #ed1c24;
    --rgc-orange-dark: #c41218;
    --rgc-gold: #d4af37;
    --rgc-yellow: #f0c419;
    --rgc-light: #f7f7f7;
    --rgc-text: #333;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--rgc-text);
    background: #fff;
}

a { text-decoration: none; }

/* Top bar */
.top-bar {
    background: var(--rgc-navy);
    color: #fff;
    font-size: 0.875rem;
    padding: 0.45rem 0;
}

.top-bar a { color: #fff; }
.top-bar i { color: var(--rgc-orange); margin-right: 0.35rem; }

.top-bar-link {
    white-space: nowrap;
    display: inline-block;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--rgc-red);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.site-header .navbar {
    align-items: center;
}

.site-header .navbar-brand {
    font-weight: 700;
    color: var(--rgc-navy) !important;
    font-size: 1.35rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    background: transparent;
    display: block;
}

.brand-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--rgc-gold), var(--rgc-red));
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 0.65rem;
}

.text-brand { color: var(--rgc-red) !important; }

.navbar-nav .nav-link {
    color: var(--rgc-navy) !important;
    font-weight: 600;
    padding: 0.75rem 0.9rem !important;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

@media (min-width: 992px) {
    .site-header .site-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.1rem;
        margin-left: auto;
    }

    .site-header .site-nav .nav-item {
        flex-shrink: 0;
    }

    .site-header .site-nav .nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.45rem !important;
        font-size: 0.72rem;
        line-height: 1.1;
        letter-spacing: 0.01em;
    }

    .site-header .site-nav .nav-link-login {
        color: var(--rgc-red) !important;
        padding-right: 0.25rem !important;
    }
}

@media (min-width: 1200px) {
    .site-header .site-nav .nav-link {
        padding: 0.55rem 0.55rem !important;
        font-size: 0.76rem;
    }

    .brand-logo-img {
        height: 52px;
        max-width: 190px;
    }
}

@media (min-width: 1400px) {
    .site-header .site-nav .nav-link {
        padding: 0.6rem 0.65rem !important;
        font-size: 0.8rem;
    }
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--rgc-red) !important;
}

/* Hero */
.hero-slider-section {
    position: relative;
    overflow: hidden;
}

.hero-slider-section .carousel,
.hero-slider-section .carousel-inner,
.hero-slider-section .carousel-item {
    min-height: clamp(320px, 55vh, 520px);
}

.hero-slider-section .carousel-item {
    position: relative;
}

.hero-slide-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-slide {
    min-height: clamp(320px, 55vh, 520px);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-slide-overlay {
    position: relative;
    z-index: 1;
    min-height: clamp(320px, 55vh, 520px);
    display: flex;
    align-items: center;
    background: linear-gradient(120deg, rgba(11,45,92,0.82), rgba(26,79,140,0.55));
    color: #fff;
}

.hero-slide-overlay h1,
.hero-slider h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hero-slide-overlay p,
.hero-slider p {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
}

.hero-slider-section .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.hero-slider-section .carousel-control-prev,
.hero-slider-section .carousel-control-next {
    width: 8%;
    opacity: 0.9;
}

.hero-slider-section .carousel-control-prev:hover,
.hero-slider-section .carousel-control-next:hover {
    opacity: 1;
}

.hero-slider {
    position: relative;
    min-height: 420px;
    background: linear-gradient(120deg, rgba(11,45,92,0.92), rgba(26,79,140,0.88)),
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?auto=format&fit=crop&w=1600&q=80') center/cover;
    color: #fff;
    display: flex;
    align-items: center;
}

.hero-slider h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.hero-slider p {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
}

.popup-image-carousel .popup-slide-image {
    max-height: 320px;
    object-fit: cover;
}

.popup-image-carousel .popup-slide-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: 1rem;
}

/* Portal boxes */
.portal-section {
    margin-top: -55px;
    position: relative;
    z-index: 5;
    padding-bottom: 2rem;
}

.portal-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    text-align: center;
    padding: 1.75rem 1rem 1.5rem;
    height: 100%;
    border-top: 4px solid var(--rgc-orange);
    transition: transform 0.25s, box-shadow 0.25s;
}

.portal-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.16);
}

.portal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--rgc-light);
    color: var(--rgc-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 2px solid #dbe6f5;
}

.portal-box h4 {
    color: var(--rgc-navy);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.portal-box p {
    font-size: 0.82rem;
    color: #666;
    margin-bottom: 1rem;
    min-height: 48px;
}

.portal-btn {
    display: inline-block;
    background: var(--rgc-orange);
    color: #fff !important;
    padding: 0.45rem 1.25rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.portal-btn:hover { background: var(--rgc-orange-dark); color: #fff; }

/* Section titles */
.section-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-heading h2 {
    color: var(--rgc-navy);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.75rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: var(--rgc-orange);
}

.section-heading p {
    color: #666;
    margin-top: 0.75rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About */
.about-section { padding: 4rem 0; background: #fff; }

.about-image {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border: 4px solid var(--rgc-orange);
}

.about-image img { width: 100%; display: block; }

.about-content h3 {
    color: var(--rgc-navy);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Info cards */
.info-card {
    background: var(--rgc-light);
    border-left: 4px solid var(--rgc-orange);
    padding: 1.5rem;
    height: 100%;
    border-radius: 0 6px 6px 0;
}

.info-card h4 {
    color: var(--rgc-navy);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

/* Warning banner */
.warning-banner {
    background: #c0392b;
    color: #fff;
    padding: 2.5rem 0;
    text-align: center;
}

.warning-banner h3 {
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* Stats */
.stats-section {
    background: var(--rgc-navy);
    color: #fff;
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item .count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--rgc-orange);
}

.stat-item .label {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* Courses */
.course-card-rgc {
    border: none;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    height: 100%;
    transition: transform 0.25s;
}

.course-card-rgc:hover { transform: translateY(-5px); }

.course-card-rgc .card-header {
    background: var(--rgc-blue);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
}

.course-card-link { color: inherit; display: block; }

.course-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #e9ecef;
    position: relative;
}

.course-code-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--rgc-orange);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.course-read-more {
    color: var(--rgc-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

.course-card-rgc:hover .course-read-more { color: var(--rgc-orange); }

.course-detail-hero {
    background-size: cover;
    background-position: center;
}

.breadcrumb-light .breadcrumb-item a { color: rgba(255,255,255,.85); }
.breadcrumb-light .breadcrumb-item.active { color: #fff; }

.course-detail-image {
    max-height: 360px;
    object-fit: cover;
}

.course-info-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.course-info-list li i {
    color: var(--rgc-orange);
    margin-right: 0.5rem;
}

.course-elements-list { margin-top: 1rem; }

.course-element-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: #fafafa;
}

.rich-text-content p:last-child { margin-bottom: 0; }
.rich-text-content ul,
.rich-text-content ol { padding-left: 1.25rem; }
.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3,
.rich-text-content h4 { margin-top: 1rem; }

.course-element-item .element-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rgc-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.course-info-card { position: sticky; top: 90px; }

/* Success stories */
.success-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    border-bottom: 3px solid var(--rgc-orange);
}

.success-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rgc-light);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--rgc-blue);
    border: 3px solid var(--rgc-orange);
}

.success-card h5 { color: var(--rgc-navy); font-weight: 700; margin-bottom: 0.25rem; }
.success-card .org { color: var(--rgc-orange); font-weight: 600; font-size: 0.9rem; }
.success-card .post { color: #555; font-size: 0.85rem; }

/* Notice marquee */
.notice-ticker {
    background: var(--rgc-orange);
    color: #fff;
    padding: 0.6rem 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.notice-ticker marquee { line-height: 1.6; }

/* Verify */
.verify-section {
    background: var(--rgc-light);
    padding: 4rem 0;
}

.verify-box {
    background: #fff;
    border-radius: 6px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    border-top: 4px solid var(--rgc-blue);
}

/* Gallery preview */
.gallery-thumb {
    border-radius: 10px;
    overflow: hidden;
    height: 180px;
    background: #ddd center/cover;
    position: relative;
    box-shadow: 0 4px 14px rgba(11, 45, 92, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-thumb-link:hover .gallery-thumb,
.gallery-thumb-link:focus .gallery-thumb {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(11, 45, 92, 0.16);
}

.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(11,45,92,0.2);
    opacity: 0;
    transition: opacity 0.25s;
}

.gallery-thumb-link:hover .gallery-thumb::after,
.gallery-thumb-link:focus .gallery-thumb::after {
    opacity: 1;
}

/* Footer */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 3rem 0 0;
}

.site-footer h5 {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--rgc-orange);
    display: inline-block;
}

.site-footer a { color: #aaa; }
.site-footer a:hover { color: var(--rgc-orange); }

.footer-bottom {
    background: #111;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.85rem;
    text-align: center;
}

/* Popup */
.welcome-popup .modal-header {
    background: var(--rgc-navy);
    color: #fff;
    border: none;
}

.welcome-popup .modal-title {
    font-weight: 700;
    text-transform: uppercase;
}

.welcome-popup .btn-close { filter: invert(1); }

.welcome-popup .modal-body {
    padding: 1.5rem;
    line-height: 1.7;
}

.welcome-popup .modal-footer {
    border-top: 1px solid #eee;
    background: var(--rgc-light);
}

.btn-rgc {
    background: var(--rgc-orange);
    border-color: var(--rgc-orange);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-rgc:hover {
    background: var(--rgc-orange-dark);
    border-color: var(--rgc-orange-dark);
    color: #fff;
}

.btn-rgc-outline {
    border: 2px solid var(--rgc-navy);
    color: var(--rgc-navy);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-rgc-outline:hover {
    background: var(--rgc-navy);
    color: #fff;
}

@media (max-width: 991px) {
    .portal-section { margin-top: 0; padding-top: 2rem; }
    .hero-slider { min-height: 320px; }
}
