/*******************************/
/********* General CSS *********/
/*******************************/

/* --- Base Variables (Must be defined for script.js) --- */
:root {
    /* Initial state - will be overridden by script.js */
    --surface: inherit;
    --background: inherit;
    --on-surface: inherit;
    --border-color: inherit;
    /* Fixed primary color (Adjust if your primary is different) */
    --primary: #e46809;
    --primary-rgb: 228, 104, 9;
    /* Other fixed values */
    --border-width: 1px;
    --border-style: solid;
    --transition-speed: 0.3s;
    --base-font-size: 16px; /* Default base size */
}

body {
    color: var(--on-surface);       /* USE VARIABLE */
    background: var(--background);  /* USE VARIABLE */
    font-family: 'Lato', sans-serif;
    font-size: var(--base-font-size); /* Base size, JS will override this directly on body tag */
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                font-size var(--transition-speed) ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--on-surface);       /* USE VARIABLE */
    font-family: 'Oswald', sans-serif;
    /* Let font size inherit or be set specifically, don't use inherit here */
    transition: color var(--transition-speed) ease;
}

a {
    color: var(--primary);          /* USE VARIABLE for links (or --on-surface if preferred) */
    transition: color var(--transition-speed) ease;
}

a:hover, a:active, a:focus {
    color: var(--primary);          /* Darken or adjust primary on hover if needed */
    opacity: 0.8;
    outline: none;
    text-decoration: none;
}

.btn:focus,
.form-control:focus {
    box-shadow: none;
}

.container-fluid {
    max-width: 1366px;
}

@media (min-width: 992px) {
    .mt-125 { margin-top: 125px; }
}

.dashed-line {
    border-top: 2px dashed var(--border-color); /* USE VARIABLE */
    width: 100%;
    margin: 20px 0;
    transition: border-color var(--transition-speed) ease;
}

/**********************************/
/********** Top Bar CSS ***********/
/**********************************/
.top-bar {
    position: relative;
    height: auto;
    background-color: var(--surface); /* USE VARIABLE */
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 10px 0;
    /* margin-bottom: 10px; Remove margin if navbar sits directly below */
    border-bottom: var(--border-width) var(--border-style) var(--border-color); /* USE VARIABLES */
    transition: background-color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
}

.top-bar .top-bar-left,
.top-bar .top-bar-right {
    display: flex;
    align-items: center;
}
.top-bar .top-bar-left { justify-content: flex-start; }
.top-bar .top-bar-right { justify-content: flex-end; }

.top-bar .text {
    display: flex; align-items: center; padding: 5px 10px;
    border-left: 1px solid var(--border-color); /* Use variable, maybe lighter */
    transition: border-color var(--transition-speed) ease;
}
.top-bar .text:last-child { border-right: 1px solid var(--border-color); }

/* Style links and text within top-bar */
.top-bar .text i,
.top-bar .text a,
.top-bar .text p,
.top-bar .text h2,
.top-bar .text span { /* Added span for icon text */
    font-size: 0.9em; /* Adjust as needed */
    color: var(--on-surface) !important; /* USE VARIABLE, override specificity if needed */
    opacity: 0.9;
    margin: 0;
    margin-right: 5px; /* Space after icon */
    transition: color var(--transition-speed) ease;
}
.top-bar .text a:hover {
     color: var(--primary) !important; /* Use primary on hover */
     opacity: 1;
}


@media (min-width: 992px) {
    .top-bar { padding: 5px 60px; /* Adjust padding */ }
}

/**********************************/
/*********** Nav Bar CSS **********/
/**********************************/
.navbar {
    position: relative; /* Changed from sticky initially, add sticky class via JS if needed */
    background: linear-gradient(to right, white 20%, var(--border-color) 50%) !important;
    border-bottom: var(--border-width) var(--border-style) var(--border-color); /* Add border */
    transition: background-color var(--transition-speed) ease,
                border-color var(--transition-speed) ease,
                padding var(--transition-speed) ease;
    z-index: 999;
    /* Remove the complex gradient background */
    /* background: linear-gradient(to right, white 20%, var(--navbar-bg-color) 50%) !important; */
}

/* Sticky state (Add this class with JS on scroll) */
.navbar.nav-sticky {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Adjust shadow color based on theme if needed */
    padding-top: 10px; /* Reduce padding when sticky */
    padding-bottom: 10px;
    background: linear-gradient(to right, white 20%, var(--border-color) 50%) !important;
}

.navbar .navbar-brand img {
    max-width: 100%;
    max-height: 45px; /* Slightly smaller */
}

/* Styling Bootstrap navbar links */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    padding: 10px 10px 8px 10px;
    color: var(--on-surface) !important; /* USE VARIABLE */
    opacity: 0.9;
    transition: color var(--transition-speed) ease, opacity var(--transition-speed) ease;
}
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary) !important; /* USE VARIABLE */
    opacity: 1;
}

.navbar .dropdown-menu {
    margin-top: 0; border: 0; border-radius: 0;
    background: var(--surface); /* USE VARIABLE */
    border: var(--border-width) var(--border-style) var(--border-color); /* Add border */
}
.navbar .dropdown-item {
    color: var(--on-surface); /* USE VARIABLE */
}
.navbar .dropdown-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1); /* Use primary for hover */
    color: var(--primary);
}


@media (min-width: 992px) {
    .navbar { padding: 15px 60px; /* Adjust default padding */ }
    .navbar.nav-sticky { padding: 10px 60px; } /* Padding when sticky */
    .navbar a.nav-link {
        padding: 8px 15px;
        /* font-size: inherit; Inherit from body */
        letter-spacing: 1px;
        text-transform: uppercase;
    }
}

@media (max-width: 991.98px) {
    .navbar { padding: 10px 15px; } /* Mobile padding */
    .navbar a.nav-link { padding: 8px 5px; } /* Adjust mobile link padding */
    .navbar .dropdown-menu { box-shadow: none; }

    /* Theme the mobile toggler */
    .navbar-dark .navbar-toggler {
        border-color: var(--primary) !important; /* Use primary color */
    }
    .navbar-dark .navbar-toggler-icon {
       /* Use SVG with stroke set by a variable if possible, otherwise use themed color */
       background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(var(--primary-rgb), 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}


/*******************************/
/********** Hero CSS ***********/
/*******************************/
/* Carousel Start */
.carousel {
    position: relative;
    width: 100%;
    height: 100vh; /* Full screen height */
    background: #e46809 !important;
    margin-bottom: 45px;
}

.carousel .container-fluid {
    padding: 0;
}

.carousel .carousel-item {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel .carousel-img {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel .carousel-img::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
     background: rgba(222, 126, 9, 0.7);
}

.carousel .carousel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: inherit;
    z-index: 10;
}

.carousel-text h1 {
    font-size: 3rem !important; /* Responsive and bold */
    font-weight: 700;
    color: inherit;
    margin-bottom: 15px;
}

.carousel-text p {
    font-size: 1.5rem !important;
    line-height: 1.5;
    color: inherit;
    margin-bottom: 20px;
}

.carousel-btn .btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    color: inherit;
    background: transparent;
    border: 2px solid;
    border-radius: 5px;
    transition: 0.3s;
}

.carousel-btn .btn:hover {
    background: inherit;
    color: #fff !important; /* Highlight button on hover */
}

.owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    width: 100%;
    justify-content: space-between;
    z-index: 10;
}

.owl-nav .owl-prev, 
.owl-nav .owl-next {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 50%;
    transition: 0.3s;
}

.owl-nav .owl-prev:hover, 
.owl-nav .owl-next:hover {
    background-color: #e46809;
    color: #fff;
}

.owl-prev {
    margin-left: 15px;
}

.owl-next {
    margin-right: 15px;
}

/* Mobile View */
@media (max-width: 991.98px) {
    .carousel, 
    .carousel .carousel-item {
        height: 80vh;
    }

    .carousel-text h1 {
        font-size: 2.5rem !important;
    }

    .carousel-text p {
        font-size: 1.2rem !important;
    }
}

@media (max-width: 575.98px) {
    .carousel, 
    .carousel .carousel-item {
        height: 60vh;
    }

    .carousel-text h1 {
        font-size: 2rem !important;
    }

    .carousel-text p {
        font-size: 1rem !important;
    }

    .carousel-btn .btn {
        padding: 10px 20px;
        font-size: 1rem !important;
    }
}

/**************************************/
/*******Registration Container ********/
/*************************************/
/* Slider specific styles */
.col-md-6 { display: inline-block; vertical-align: top; width: 50%; } /* Revisit this for layout */
.slides { padding: 0; width: 100%; height: auto; max-height: 420px; display: block; margin: 0 auto; position: relative; overflow: hidden; }
.slides * { user-select: none; -ms-user-select: none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.slide-container { display: block; }
.slide { top: 0; opacity: 0; width: 100%; height: 100%; display: block; position: absolute; transform: scale(0); transition: all .7s ease-in-out; }
.slide img { width: 100%; height: 100%; object-fit: cover; /* Ensure image covers area */ }
.nav label { display: none; position: absolute; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--on-surface); font-size: 2rem; z-index: 1; padding: 0 10px; }
.nav .prev { left: 0; }
.nav .next { right: 0; }
input[type="radio"] { display: none; } /* Hide radio buttons */
input:checked+.slide-container .slide { opacity: 1; transform: scale(1); }
input:checked+.slide-container .nav label { display: block; }
.nav-dots { width: 100%; bottom: 15px; height: 11px; display: block; position: absolute; text-align: center; z-index: 1; }
.nav-dots .nav-dot { top: -5px; width: 11px; height: 11px; margin: 0 4px; position: relative; border-radius: 100%; display: inline-block; background-color: rgba(0, 0, 0, 0.4); transition: background-color 0.3s; }
.nav-dots .nav-dot:hover { cursor: pointer; background-color: rgba(0, 0, 0, 0.7); }
input#img-1:checked~.nav-dots label#img-dot-1, input#img-2:checked~.nav-dots label#img-dot-2, input#img-3:checked~.nav-dots label#img-dot-3, input#img-4:checked~.nav-dots label#img-dot-4 { background: var(--primary); /* Use primary for active dot */ }

/* Registration container text */
.registration-container { background: var(--surface); padding: 20px; border-radius: 8px; }
.registration-container h2 { color: var(--on-surface); font-size: 1.2em; margin-bottom: 15px; line-height: 1.4; }
.registration-container a.register-btn {
    color: var(--on-surface) !important;
    border-color: var(--border-color) !important;
    background-color: transparent !important; /* Make transparent */
    padding: 10px 20px; display: inline-block; margin-top: 10px;
    border-radius: 5px; font-weight: 500;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}
.registration-container a.register-btn:hover {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}
.registration-container div[style*="border-bottom"] { /* Target the dotted line div */
    border-bottom-color: var(--border-color) !important; /* Use variable */
}

@media (max-width: 768px) {
    .col-md-6 { width: 100%; margin-bottom: 20px; } /* Stack columns */
    .slides { max-height: 300px; } /* Adjust mobile height */
    .nav-dots { bottom: 10px; }
}


/************************************/
/*********Popular Courses ***********/
/************************************/
.container.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.container.my-5 h1, .container.my-5 h2 {
    color: var(--on-surface) !important; /* USE VARIABLE */
    /* font-size: inherit !important; Remove - let specific rules handle size */
}
.text-center { text-align: center; }
.demarcator-line { border-top: 1px solid var(--border-color); margin: 20px 0; width: 100%; transition: border-color var(--transition-speed) ease;}

/* Course item styling */
.course-item {
    background: var(--surface); /* USE VARIABLE */
    border: var(--border-width) var(--border-style) var(--border-color); /* USE VARIABLES */
    border-radius: 10px; padding: 20px; margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    transition: transform 0.3s, box-shadow 0.3s, background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    display: flex; flex-direction: column; height: 100%; /* Ensure cards in a row have same height */
}
.course-item:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); }
.course-item img.img-fluid { border-radius: 5px; margin-bottom: 15px; max-height: 180px; object-fit: cover; width: 100%; }
.course-item h4 {
    margin-top: 0; color: var(--on-surface); /* USE VARIABLE */
    font-weight: 600; margin-bottom: 10px;
    font-size: 1.1em; /* Adjust size */
    line-height: 1.3; flex-grow: 1; /* Allow title to push content down */
    transition: color var(--transition-speed) ease;
}
.course-item p { color: var(--on-surface); opacity: 0.8; margin-bottom: 15px; font-size: 0.9em; transition: color var(--transition-speed) ease;}
.course-item .btn-primary {
    background-color: var(--primary) !important; /* USE VARIABLE */
    border-color: var(--primary) !important; /* USE VARIABLE */
    color: white !important; /* Ensure text is white */
    margin-top: auto; /* Push button to bottom */
    align-self: flex-start; /* Align left */
    padding: 8px 18px; font-size: 0.9em;
}
.course-item .btn-primary:hover { opacity: 0.85; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-3 { flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 576px) {
    .col-md-3 { flex: 0 0 100%; max-width: 100%; }
}


/*******************************/
/********* Feature CSS *********/
/*******************************/
.feature {
    /* background-image: url('image/back001.jpg'); Optional static background */
    background-color: var(--surface); /* Use surface color */
    background-size: cover; background-repeat: no-repeat; background-position: center;
    padding: 80px 0 40px 0; margin-top: 45px;
    border-top: var(--border-width) var(--border-style) var(--border-color);
    border-bottom: var(--border-width) var(--border-style) var(--border-color);
     transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.feature .counters .col-6 {
    padding-top: 25px; display: flex; align-items: center; /* Align icon and text */
    justify-content: center; /* Center content */ margin-bottom: 30px;
}
.feature .counters i {
    padding: 0 15px 0 0; font-size: 2.5em; /* Adjust size */
    color: var(--primary); /* USE VARIABLE */
    transition: color var(--transition-speed) ease;
}
.feature .counters h2 {
    position: relative; display: inline-block;
    color: var(--on-surface); /* USE VARIABLE */
    font-size: 2.5em; font-weight: 600; /* Bolder */
    margin: 0; line-height: 1;
    transition: color var(--transition-speed) ease;
}
.feature .counters h2::after { content: none; /* Removed plus sign */ }
.feature .counters p {
    color: var(--on-surface); /* USE VARIABLE */
    font-size: 1em; margin: 0; font-weight: 500; /* Slightly bolder */
    opacity: 0.9; line-height: 1.2; margin-top: 5px;
    transition: color var(--transition-speed) ease;
}
.counters-text { text-align: left; } /* Align text left */

@media (max-width: 767px) {
    .feature .counters .col-6 { flex-direction: column; text-align: center; } /* Stack on mobile */
    .feature .counters i { padding: 0 0 10px 0; font-size: 2em; }
    .feature .counters h2 { font-size: 2em; }
    .feature .counters p { font-size: 0.9em; }
    .counters-text { text-align: center; }
}


/*******************************/
/********* About/Service CSS *********/
/*******************************/
.services.page_section { padding: 45px 0; }
.section_title { margin-bottom: 30px; }
.section_title h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem); /* Responsive title */
    color: var(--on-surface); /* USE VARIABLE */
    text-align: center; margin-bottom: 20px;
    transition: color var(--transition-speed) ease;
}
.image-text-container { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; /* Allow wrapping */ }
.image-text-container > div { flex: 1; min-width: 280px; /* Minimum width before wrapping */ }
.image-text-container video { width: 100%; display: block; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);}
.image-text-container .text p {
    font-size: 1.1em; /* Adjust size */ line-height: 1.7;
    color: var(--on-surface); /* USE VARIABLE */
    font-family: 'Lato', sans-serif; /* Use body font */
    opacity: 0.9;
     transition: color var(--transition-speed) ease;
}


/*******************************/
/********* Testimonial CSS *********/
/*******************************/
#testimonial {
    background-color: var(--background); /* Use page background */
    padding: 50px 20px; text-align: center;
    transition: background-color var(--transition-speed) ease;
}
.testimonial-container { max-width: 800px; margin: 0 auto; }
#testimonial h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--on-surface); /* USE VARIABLE */
    margin-bottom: 20px; font-weight: 600;
    transition: color var(--transition-speed) ease;
}
#testimonial p {
    font-size: 1.1em; color: var(--on-surface); /* USE VARIABLE */
    margin-bottom: 30px; opacity: 0.9; line-height: 1.6;
     transition: color var(--transition-speed) ease;
}
.video-container {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; max-width: 100%; background-color: #000; /* Black bg for video */
    border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }


/*******************************/
/********* Footer CSS **********/
/*******************************/
.footer {
    position: relative; margin-top: 45px; padding-top: 60px; /* Reduced padding */
    background: var(--surface); /* USE VARIABLE */
    border-top: var(--border-width) var(--border-style) var(--border-color); /* Add border */
     transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
    /* Remove gradient */
    /* background-image: linear-gradient(to right, white 20%, var(--navbar-bg-color) 50%) !important; */
}

.footer .footer-contact,
.footer .footer-link,
.footer .footer-newsletter,
.footer .footer-inquiry { /* Added .footer-inquiry */
    position: relative; margin-bottom: 35px; /* Reduced margin */
}

.footer h2 { /* Target all h2 in footer */
    position: relative; margin-bottom: 20px; padding-bottom: 8px;
    font-size: 1.2em; font-weight: 500; /* Adjusted weight */
    letter-spacing: 0.5px; color: var(--on-surface); /* USE VARIABLE */
    opacity: 0.9; transition: color var(--transition-speed) ease;
}
.footer h2::after {
    position: absolute; content: ""; width: 40px; height: 2px;
    bottom: 0; left: 0; background: var(--primary); /* USE VARIABLE */
    transition: background-color var(--transition-speed) ease;
}

.footer .footer-link a {
    display: block; margin-bottom: 8px;
    color: var(--on-surface); /* USE VARIABLE */
    opacity: 0.8; transition: all var(--transition-speed) ease;
    font-size: 0.95em;
}
.footer .footer-link a::before {
    position: relative; content: "\f105"; font-family: "Font Awesome 5 Free";
    font-weight: 900; margin-right: 8px; color: var(--primary);
}
.footer .footer-link a:hover { color: var(--primary); opacity: 1; letter-spacing: 0.5px; }

.footer .footer-contact p {
    margin-bottom: 10px; color: var(--on-surface); /* USE VARIABLE */
    opacity: 0.8; font-size: 0.95em; line-height: 1.5;
    transition: color var(--transition-speed) ease;
}
.footer .footer-contact p i { width: 20px; color: var(--primary); margin-right: 5px; /* USE VARIABLE */}
.footer .footer-contact .logo-images img { max-width: 200px; height: auto; margin-top: 10px; } /* Style logo */

/* Footer Newsletter/Contact Info */
.footer .footer-newsletter p, .footer .footer-inquiry p { /* Combined styles */
     margin-bottom: 10px; color: var(--on-surface); opacity: 0.8; font-size: 0.95em;
     transition: color var(--transition-speed) ease;
}
.footer .footer-newsletter p i, .footer .footer-inquiry p i {
    width: 20px; color: var(--primary); margin-right: 5px;
}

/* Copyright Area */
.copyright {
    padding: 25px 15px; margin-top: 30px; /* Add margin top */
    background-color: var(--background); /* USE VARIABLE */
    border-top: var(--border-width) var(--border-style) var(--border-color); /* USE VARIABLES */
     transition: background-color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}
.copyright p {
    margin: 0; color: var(--on-surface); /* USE VARIABLE */
    font-size: 0.9em; opacity: 0.7;
    transition: color var(--transition-speed) ease;
}
.copyright .col-md-6:last-child p { text-align: right; }
.copyright p a { color: var(--primary); opacity: 0.9; } /* USE VARIABLE */
.copyright p a:hover { opacity: 1; }

@media (max-width: 767.98px) {
    .footer { padding-top: 40px; }
    .footer h2 { font-size: 1.1em; }
    .footer .footer-contact, .footer .footer-link, .footer .footer-newsletter, .footer .footer-inquiry { text-align: center; } /* Center align on mobile */
    .footer h2::after { left: 50%; transform: translateX(-50%); } /* Center the underline */
    .footer .footer-contact .logo-images img { margin-left: auto; margin-right: auto; display: block; }
    .copyright { padding: 20px 15px; margin-top: 20px; }
    .copyright p, .copyright .col-md-6:last-child p { text-align: center; margin: 5px 0; }
}

/*--------------------------------*/
/*--- Mobile View Adjustments ----*/
/*--------------------------------*/
@media only screen and (max-width: 600px) {
    /* Body font size is handled globally now by script.js modifying body */

    /* Headings - Adjust base size, em will scale */
    h1 { font-size: 1.6em; padding: 8px; }
    h2 { font-size: 1.3em; padding: 4px; }

    /* Navbar */
    .navbar { padding: 8px 10px; }
    .navbar .logo img { max-width: 120px; }

    /* Main */
    main { padding: 10px; }

    /* Sections */
    .section { max-width: 100%; margin: 10px 0; } /* Full width */

    /* Top Bar */
    .top-bar { flex-direction: column; padding: 10px; }
    .top-bar .top-bar-left, .top-bar .top-bar-right { justify-content: center; width: 100%; }
    .top-bar .text { border: none; padding: 5px 0; }
    .top-bar .text:last-child { border: none; }

    /* Other specific mobile tweaks */
    .feature { padding: 50px 0 20px 0; }
}