:root {
    --primary-red: #c41e3a;
    --primary-black: #1a1a1a;
    --secondary-gray: #f5f5f5;
    --text-dark: #333333;
    --text-light: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

main {
    padding-top: 100px;
}

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

/* Header Styles */
.main-header {
    background-color: var(--primary-black);
    padding: 1rem 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
}

.logo img {
    height: 50px;
    vertical-align: middle;
}

.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.main-nav > ul {
    gap: 2rem;
    height: 100%;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-red);
}

/* Auth Buttons */
.auth-buttons {
    margin-left: 2rem;
}

.login-btn, .register-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.login-btn {
    background-color: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.login-btn:hover {
    background-color: var(--primary-red);
    color: white !important;
    text-decoration: none;
}

.register-btn {
    background-color: var(--primary-red);
    color: white !important;
    text-decoration: none;
}

.register-btn:hover {
    background-color: #a01830;
    color: white !important;
    text-decoration: none;
}

/* User Menu */
.user-menu {
    position: relative;
    margin-left: 2rem;
}

.user-icon {
    gap: 0.5rem;
}

.user-icon i {
    font-size: 1.2rem;
}

.user-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.user-menu .dropdown-menu li {
    padding: 0;
}

.user-menu .dropdown-menu a {
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    display: block;
}

.user-menu .dropdown-menu a:hover {
    background-color: var(--secondary-gray);
    color: var(--primary-red);
}

/* Proficiency Menu - Bootstrap Dropdown Overrides */
.proficiency-menu .nav-link {
    color: var(--text-light) !important;
    font-weight: 500;
    padding: 0;
    transition: color 0.3s ease;
}

.proficiency-menu .nav-link:hover,
.proficiency-menu .nav-link:focus {
    color: var(--primary-red) !important;
}

.proficiency-menu .dropdown-menu {
    background: #ffffff;
    border: 1px solid rgba(196, 30, 58, 0.25);
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
    padding: 0.5rem 0;
    min-width: 260px;
    margin-top: 0.5rem;
    opacity: 1;
}

.proficiency-menu .dropdown-item {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: background 0.2s ease;
    background: transparent;
}

.proficiency-menu .dropdown-item:hover,
.proficiency-menu .dropdown-item:focus {
    background: var(--secondary-gray);
    color: var(--primary-red);
}

/* Page Banner Styles */
.page-banner {
    background: linear-gradient(135deg, 
        var(--primary-black) 0%,
        #2a2a2a 100%
    );
    padding: 4rem 0;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/pattern-overlay.png') repeat;
    opacity: 0.05;
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.banner-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.banner-subtitle {
    font-size: 1.25rem;
    color: var(--primary-red);
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

/* Alternative Banner Styles */
.page-banner.alt-banner {
    background: linear-gradient(135deg, 
        var(--primary-red) 0%,
        #8f1228 100%
    );
}

.page-banner.light-banner {
    background: linear-gradient(135deg, 
        #f5f5f5 0%,
        #e0e0e0 100%
    );
    color: var(--text-dark);
}

.page-banner.light-banner .banner-subtitle {
    color: var(--primary-black);
}

/* Hero photo banner with dark overlay for legible white title */
.page-banner.page-banner-hero-bg {
    background: url('/assets/images/hero_image.jpg') center / cover no-repeat;
    color: #fff;
}

.page-banner.page-banner-hero-bg::before {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.page-banner.page-banner-hero-bg .banner-title {
    background: none;
    background-clip: unset;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #fff;
    color: #fff;
    font-weight: 700;
}

/* Page Content Styles */
.page-content {
    padding: 4rem 0;
    background-color: white;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: var(--primary-black);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.content-section h3 {
    color: var(--primary-red);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Icon Navigation */
.icon-navigation {
    background: linear-gradient(135deg, #c41e3a 0%, #8f1228 100%);
    padding: 3rem 0;
}

.nav-icons-wrapper {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon-link {
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-icon-link:hover {
    transform: translateY(-5px);
}

.nav-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.nav-icon-link:hover .nav-icon {
    background: rgba(255, 255, 255, 0.25);
}

.nav-icon-item span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer Styles */
.main-footer {
    background-color: var(--primary-black);
    color: var(--text-light);
    padding: 4rem 0 0;
}

.footer-section h3 {
    color: var(--primary-red);
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Portal Section in Footer */
#portal.content-section {
    background: white;
}

#portal .section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

#portal .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-black);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

#portal .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-red);
}

.portal-content {
    margin-top: 30px;
}

.portal-description {
    padding: 20px;
}

.portal-description h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 20px;
}

.portal-description p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

.footer-features-column {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.footer-features-column li {
    padding: 12px 0 12px 30px;
    color: var(--primary-black);
    font-weight: 500;
    line-height: 1.6;
    position: relative;
    border-bottom: 1px solid #e5e5e5;
}

.footer-features-column li:last-child {
    border-bottom: none;
}

.footer-features-column li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 12px;
    color: var(--primary-red);
    font-size: 1.2rem;
    line-height: 1;
    font-weight: bold;
}

.portal-access {
    background: linear-gradient(135deg, var(--primary-black) 0%, #2a2a2a 100%);
    padding: 40px;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-access h4 {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.portal-access p {
    color: #ccc;
    margin-bottom: 30px;
}

.portal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.portal-btn {
    display: block;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portal-btn.login-btn {
    background: var(--primary-red);
    color: var(--text-light);
}

.portal-btn.login-btn:hover {
    background: #a01830;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
    text-decoration: none;
}

.portal-btn.register-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.portal-btn.register-btn:hover {
    background: var(--text-light) !important;
    color: var(--primary-black) !important;
    text-decoration: none;
}

/* Contact Info */
.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-info i {
    color: var(--primary-red);
    width: 20px;
}

/* Accreditation Badge */
.accreditation-badge img {
    max-width: 150px;
    height: auto;
}

/* Back to Top */
.back-to-top {
    text-align: right;
    margin-bottom: 1rem;
}

.back-to-top a {
    color: var(--primary-red);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.back-to-top a:hover {
    text-decoration: underline;
}

/* Responsive Design */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
}

@media (max-width: 768px) {
    main {
        padding-top: 80px;
    }

    .mobile-menu-toggle {
        display: block;
        align-items: center;
        justify-content: center;
        margin-left: 1rem;
        width: 44px;
        height: 44px;
        color: white;
        transition: all 0.2s ease;
    }

    .mobile-menu-toggle.active {
        color: white;
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-black);
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        height: auto;
        background-color: var(--primary-black);
    }

    .main-nav > ul > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav > ul > li.auth-buttons {
        border-bottom: none;
    }

    .main-nav > ul > li > a,
    .main-nav > ul > li > .nav-link {
        display: block;
        padding: 1rem;
    }

    .proficiency-menu .dropdown-menu {
        position: static !important;
        float: none;
        transform: none !important;
        margin: 0.25rem 0 0;
        width: 100%;
        border-radius: 8px;
    }

    .proficiency-menu .dropdown-item {
        padding: 0.75rem 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        gap: 0;
        padding: 0;
        background-color: transparent;
    }

    .auth-buttons .login-btn, 
    .auth-buttons .register-btn {
        width: 100%;
        text-align: center;
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }

    .auth-buttons .login-btn {
        background-color: var(--primary-black);
        border: 1px solid var(--primary-red);
        border-left: none;
        border-right: none;
        color: var(--primary-red);
    }

    .auth-buttons .login-btn:hover {
        background-color: var(--primary-red);
        color: white !important;
    }

    .auth-buttons .register-btn {
        border: none;
        border-bottom: none;
        background-color: var(--primary-red);
    }
    
    /* Page Banner Mobile Responsive */
    .page-banner {
        padding: 3rem 0;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1.1rem;
    }
    
    .page-content {
        padding: 3rem 0;
    }
    
    .content-section h2 {
        font-size: 1.8rem;
    }
    
    .content-section h3 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    /* Page Banner Small Screen Responsive */
    .page-banner {
        padding: 2rem 0;
    }
    
    .banner-title {
        font-size: 1.75rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .page-content {
        padding: 2rem 0;
    }
}
