:root {
    --primary-color: #277ed0; /* Deep Teal/Green typical of HSE sites */
    --secondary-color: #000000; /* Safety Yellow */
    --text-dark: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    padding-top: 76px; /* Offset for fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* --- Navbar --- */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
}
.navbar-brand img {
    width: 160px;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    margin-left: 15px;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.btn-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #2c6fff;
    --bs-btn-hover-border-color: #2c6fff;
    --bs-btn-focus-shadow-rgb: 217, 164, 6;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #1856b9;
    --bs-btn-active-border-color: #2c6fff;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
}

.btn-quote {
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 0;
    padding: 8px 25px;
}
.btn-quote:hover {
    background-color: #00332a;
    color: #fff;
}

/* --- Login Page Styles --- */
.login-section {
    min-height: calc(100vh - 76px); /* Full height minus navbar */
}

.auth-bg {
    background-size: cover !important;
    background-position: center !important;
}

.input-group-text {
    border-color: #e0e0e0;
    color: var(--primary-color);
}

.form-control:focus + .input-group-text {
    border-color: var(--primary-color);
}

/* Custom button hover for Google Auth */
.btn-outline-light:hover {
    background-color: #f8f9fa;
    border-color: #ddd;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(0, 77, 64, 0.7), rgb(0 19 77 / 70%)), url('https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 85vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* The "Window" that clips the text */
.sliding-window {
    height: 1.2em; /* Matches one line of text */
    width: 100%;
    overflow-y: hidden;
    overflow-x: auto;
    display: inline-block;
    vertical-align: bottom;
    color: var(--primary-color); /* Your Safety Yellow */
}

/* The list that moves up */
.sliding-list {
    display: flex;
    flex-direction: column;
    animation: slide-up 10s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}

.slide-item {
    height: 1.2em;
    line-height: 1.2em;
    white-space: nowrap;
    padding-right: 10px;
}

/* Animation Logic:
   Each item is 1.2em. We have 5 items total (4 unique + 1 loop).
   Move the list up by -1.2em for each step.
*/
@keyframes slide-up {
    0%, 20% { transform: translateY(0); }             /* Item 1 */
    25%, 45% { transform: translateY(-1.2em); }      /* Item 2 */
    50%, 70% { transform: translateY(-2.4em); }      /* Item 3 */
    75%, 95% { transform: translateY(-3.6em); }      /* Item 4 */
    100% { transform: translateY(-4.8em); }           /* Back to Loop */
}

/* Add the typing cursor as a separate element if desired */
.sliding-window::after {
    content: "";
    border-right: 3px solid white;
    margin-left: 5px;
    animation: blink-cursor 0.8s infinite;
}

@keyframes blink-cursor {
    50% { border-color: transparent; }
}

/* --- Services Section --- */
.service-card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-10px);
}
.icon-box {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- About Section --- */
.about-section {
    background-color: #f8f9fa;
}
.section-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin-top: 10px;
}

/* --- Footer --- */
footer {
    background-color: #212529;
    color: #ccc;
    padding: 60px 0 20px;
}
footer h5 {
    color: #fff;
    margin-bottom: 20px;
}
footer ul {
    padding-left: 0;
    list-style: none;
}
footer ul li {
    margin-bottom: 10px;
}
footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--secondary-color);
}
.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Helper Utilities */
.text-primary-custom { color: var(--primary-color); }
.bg-primary-custom { background-color: var(--primary-color); }

/* --- Testimonials --- */
.quote-icon {
    font-size: 2rem;
    color: var(--secondary-color); /* Uses the Yellow defined earlier */
    opacity: 0.6;
}

/* Move indicators down slightly to not overlap text */
.carousel-indicators {
    bottom: -20px; 
}

/* Style the dots to be visible on light background */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* --- About Page Enhancements --- */

/* Decorative border for mission/vision boxes */
.border-primary {
    border-color: var(--primary-color) !important;
}

.border-warning {
    border-color: var(--secondary-color) !important; /* Uses your Yellow */
}

/* Core Value Cards */
.value-icon {
    transition: transform 0.3s ease;
}

.card:hover .value-icon {
    transform: scale(1.1);
}

/* Page Header Height */
.page-header {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography adjustment for about page text */
.lead {
    font-size: 1.15rem;
    line-height: 1.8;
}

/* --- Portfolio Photo Section --- */
.portfolio-image-container {
    padding: 20px;
}

.portfolio-main-img {
    transition: transform 0.4s ease;
    border: 8px solid #f8f9fa;
}

.portfolio-image-container:hover .portfolio-main-img {
    transform: scale(1.02);
}

.floating-card {
    position: absolute;
    bottom: -10px;
    left: -30px;
    width: 200px;
    border-left: 5px solid #198754; /* Success Green */
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Section Title Highlight (if not already in your CSS) */
.text-primary-custom {
    color: var(--primary-color) !important;
}

/* --- Course Cards --- */
.course-card {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    border-radius: 12px;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12) !important;
}

.course-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image-wrapper img {
    transform: scale(1.05);
}

.course-card .card-body {
    padding: 1.5rem;
}

.course-card .btn-primary {
    border-radius: 6px;
    padding: 10px;
    text-transform: none; /* Courses look better with standard casing */
    letter-spacing: 0.5px;
}

/* Badge Styling */
.badge {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
}

/* --- Course Detail Custom Styles --- */

.course-sub-nav .nav-link {
    font-size: 0.9rem;
    padding: 1rem 0.5rem;
    border-bottom: 3px solid transparent;
}

.course-sub-nav .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color);
}

.stats-bar .stat-item {
    font-size: 0.95rem;
    background: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 50px;
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: #f8faff;
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,0.125);
}

/* Sticky Sidebar Offset */
@media (min-width: 992px) {
    .sticky-top {
        top: 90px !important;
    }
}

/* --- Contact Page Styles --- */
.form-control, .form-select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(39, 126, 208, 0.15);
}

.icon-circle {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Form Label Highlight */
label.form-label {
    color: #555;
    margin-bottom: 0.4rem;
}

/* --- Blog Page Styles --- */

.blog-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.category-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Featured Blog Post Height */
.blog-card.featured {
    min-height: 400px;
}

/* Pagination Customization */
.pagination .page-link {
    border: none;
    margin: 0 5px;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: #fff;
}

/* Responsive fixes for Featured Post */
@media (max-width: 991px) {
    .blog-card.featured img {
        height: 250px;
        width: 100%;
    }
}

.exam-page{
    padding:20px;
}

.exam-header{
    margin-bottom:15px;
}

.exam-progress{
    margin-bottom:15px;
}

.exam-container{
    display:flex;
    gap:20px;
}

/* Sidebar */
.exam-sidebar{
    width:80px;
    background:#f8f9fa;
    padding:10px;
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.question-number{
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#ddd;
    border-radius:6px;
    cursor:pointer;
}

.question-number.active{
    background:#0d6efd;
    color:white;
}

.question-number.answered{
    background:#198754;
    color:white;
}

/* Content */
.exam-content{
    flex:1;
}

.question-card{
    background:white;
    padding:20px;
    border-radius:10px;
}

.option-item{
    display:block;
    padding:10px;
    margin-bottom:10px;
    background:#f1f1f1;
    border-radius:6px;
    cursor:pointer;
}

.option-item:hover{
    background:#e2e6ea;
}

.exam-nav{
    margin-top:20px;
    display:flex;
    justify-content:space-between;
}

.result-summary{
    text-align:center;
}

.score-circle{
    width:120px;
    height:120px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:bold;
    margin:20px auto;
    color:white;
}

.score-circle.pass{
    background:#198754;
}

.score-circle.fail{
    background:#dc3545;
}

.review-item ul{
    list-style:none;
    padding-left:0;
}

.review-item li{
    padding:6px 10px;
    border-radius:6px;
}

.correct-answer{
    background:#d1e7dd;
}

.wrong-answer{
    background:#f8d7da;
}

.exam-card{
    border-radius:12px;
    border:1px solid #eee;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    transition:0.3s;
}

.exam-card:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 20px rgba(0,0,0,0.08);
}

.exam-card-body{
    padding:20px;
}

.exam-title{
    font-weight:600;
    margin-bottom:10px;
}

.exam-meta{
    font-size:14px;
    color:#777;
}

.exam-card-footer{
    padding:15px;
    border-top:1px solid #eee;
}