/* Root Variables */
:root {
    --primary-color: #003d82;
    --secondary-color: #0066cc;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --muted-text: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: white !important;
}

.navbar-brand .logo {
    height: 40px;
    margin-right: 10px;
}

.navbar-brand .brand-text {
    color: white;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

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

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
}

.programs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.programs-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Program Cards */
.program-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.program-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.program-code {
    font-weight: 600;
    font-size: 0.9rem;
}

.program-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.program-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 2.5rem;
}

.program-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--muted-text);
}

.info-item i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
    font-size: 1rem;
}

.program-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-view-details {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    transform: scale(1.02);
}

/* Action Cards */
.action-buttons {
    margin-top: 4rem;
}

.action-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

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

.action-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.action-card h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.action-card p {
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    max-height: 70vh;
}

/* Program Details */
.program-details {
    padding: 1rem 0;
}

.detail-section {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.detail-item span {
    color: var(--dark-text);
    font-size: 0.95rem;
}

.qualification-list {
    list-style: none;
    padding: 0;
}

.qualification-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
    border-radius: 4px;
}

.centres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.centre-card {
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.centre-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mediums {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.mediums strong {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.mediums .badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.contact-info i {
    margin-top: 0.25rem;
    color: var(--info-color);
}

.contact-info a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: white;
    text-decoration: underline;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: var(--shadow-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .programs-header h2 {
        font-size: 1.5rem;
    }

    .navbar-brand .brand-text {
        font-size: 1rem;
    }

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

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

    .action-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .program-card-body {
        padding: 1rem;
    }

    .action-card {
        padding: 1.5rem;
    }

    .action-card i {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-card,
.action-card {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .action-buttons,
    .btn {
        display: none;
    }

    .program-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
