/********** Template CSS **********/
:root {
    --primary: #B2222A;
    --secondary: #D9AA00; /* refined gold for better contrast */
    --light: #F7F3EC;
    --dark: #1C1C1C;
    --beige: #e9e1d3;
    /* Align Bootstrap CSS variables to Haywood palette */
    --bs-primary: #B2222A;
    --bs-secondary: #D9AA00;
    --bs-light: #F7F3EC;
    --bs-dark: #1C1C1C;
}

/* Override Bootstrap primary to match Haywood palette */
.btn-primary,
.btn-outline-primary:hover,
.bg-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary,
.text-primary,
.border-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    color: #fff !important;
}

.body-text {
    font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
    color: #2B2B2B;
}

body {
    font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
    color: #2B2B2B;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    color: var(--dark);
}

.brand-logo {
    height: 48px;
    width: auto;
}

.brand-text {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--dark);
}

.footer-modern {
    background-color: var(--beige);
    color: #2B2B2B;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.footer-hero .footer-wordmark {
    font-family: 'Libre Baskerville', 'Times New Roman', serif;
    font-size: clamp(72px, 10vw, 140px);
    letter-spacing: 4px;
    background: linear-gradient(90deg, #B2222A 0%, #D9AA00 50%, #B2222A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    background-size: 200% 200%;
    animation: footerGradient 8s ease-in-out infinite;
    line-height: 1;
}

.footer-hero .footer-wordmark:hover {
    animation-duration: 5s;
}

@keyframes footerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.timeline-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: #0a0a0a;
}

.timeline-full {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding-bottom: 0;
}

.timeline-shell {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.timeline-rail {
    position: sticky;
    top: 140px;
    align-self: flex-start;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: end;
    padding-right: 40px;
    z-index: 3;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(247, 243, 236, 0.45);
}

.timeline-dots {
    margin: 0;
    padding: 0 10px 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    justify-content: space-between;
    height: 100%;
}

.timeline-dot {
    position: relative;
    padding-right: 70px;
    cursor: pointer;
    color: #e9e1d3;
    font-weight: 500;
    text-align: right;
}

.timeline-dot .dot {
    position: absolute;
    right: 28px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f7f3ec;
    border: 2px solid #d9aa00;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-dot.active .dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(217, 170, 0, 0.18);
}

.timeline-dot .label {
    font-size: 15px;
    color: #f7f3ec;
}

.timeline-panels {
    position: relative;
    height: calc(100vh - 160px);
    overflow: hidden;
    padding: 0;
}

.timeline-panel {
    position: absolute;
    inset: 0;
    min-height: 100%;
    margin-bottom: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: stretch;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.timeline-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.timeline-legacy {
    filter: sepia(0.55) saturate(0.9);
}

.timeline-panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.35));
}

.timeline-panel-content {
    position: relative;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
    padding: clamp(20px, 4vw, 48px);
    width: min(1200px, 90vw);
    margin: 0 auto;
    color: #f7f3ec;
}

.timeline-panel-year {
    font-size: clamp(3rem, 7vw, 4.8rem);
    font-weight: 700;
    color: #f3c300;
    align-self: center;
}

.timeline-panel-body h3 {
    color: #f7f3ec;
}

.timeline-panel-body p {
    color: #e9e1d3;
}

.timeline-arrows .btn,
.timeline-prev,
.timeline-next {
    border-radius: 8px;
}

@media (max-width: 991.98px) {
    .timeline-layout {
        grid-template-columns: 1fr;
        margin-left: 0;
        width: 100%;
    }
    .timeline-rail { display: none; }
    .timeline-panels {
        height: auto;
        min-height: 70vh;
    }
    .timeline-panel {
        position: relative;
        min-height: 70vh;
    }
    .timeline-panel-content {
        grid-template-columns: 1fr;
        padding: 24px;
        width: 100%;
    }
    .timeline-panel-year {
        font-size: clamp(2.2rem, 7vw, 3rem);
    }
}

.timeline-mobile-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.timeline-mobile-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #d9aa00;
    background: rgba(217, 170, 0, 0.2);
    padding: 0;
    display: grid;
    place-items: center;
}

.timeline-mobile-dot .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
}

.timeline-mobile-dot.active {
    background: #d9aa00;
}

.timeline-mobile-dot.active .dot {
    background: #0a0a0a;
}
.footer-links .footer-link {
    color: #2B2B2B;
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
}

.footer-links .footer-link:hover {
    color: var(--primary);
}

.footer-links h6 {
    letter-spacing: 0.5px;
}

.btn-outline-dark {
    border-color: #2B2B2B;
    color: #2B2B2B;
}

.btn-outline-dark:hover {
    background-color: #2B2B2B;
    color: #fff;
}

a {
    color: var(--primary);
}

a:hover {
    color: #8f1b22;
}

.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.my-6 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.topbar-gold {
    background-color: var(--secondary) !important;
    color: var(--dark) !important;
}

.footer-gold {
    background-color: var(--secondary) !important;
    color: var(--dark) !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 80px
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--dark);
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.card-beige,
.panel-beige,
.bg-beige {
    background-color: var(--beige) !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    background: rgba(0, 0, 0, .55);
    padding-top: 6vh;
    padding-left: 5vw;
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 0;
    display: none;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
}

.carousel-indicators .active {
    background-color: var(--primary);
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.page-header .glass-panel {
    text-align: left;
}

.page-header .breadcrumb {
    justify-content: flex-start !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border: 10px solid var(--primary);
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .75), rgba(0, 0, 0, .75)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}


/*** Facts ***/
@media (min-width: 991.98px) {
    .facts {
        position: relative;
        margin-top: -75px;
        z-index: 1;
    }
}


/*** Courses ***/
.courses {
    min-height: 100vh;
    background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)), url(../img/carousel-1.jpg) center center no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

.courses-item .courses-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.courses-item:hover .courses-overlay {
    height: 100%;
    opacity: 1;
}


/*** Team ***/
.team-items {
    margin: -.75rem;
}

.team-item {
    padding: .75rem;
}

.team-item::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: #FFFFFF;
    transition: .5s;
    z-index: -1;
}

.team-item:hover::after {
    height: 100%;
    background: var(--primary);
}

.team-item .team-social {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .75);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-social {
    height: 100%;
    opacity: 1;
}


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: 2px solid var(--primary);
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 40px;
    height: 40px;
    background: var(--primary);
}

.testimonial-carousel .owl-item img {
    width: 150px;
    height: 150px;
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--light);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    background: #092139;
}

.copyright a {
    color: var(--primary);
}

.copyright a:hover {
    color: var(--light);
}
