
/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #1a1a1a;
}

a {
    color: inherit;
}

.mobile-only {
    display: none  !important;
}


.desktop-only {
    display: inline-flex  !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none   !important;
    }


    .mobile-only {
        display: block  !important;
    }
}




/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background:#f1f1f1;
    padding: 14px 40px;
    box-shadow: 0 4px 20px rgba(13, 59, 143, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    border-bottom: 1px solid rgba(23, 105, 210, 0.08);
}

.navbar.navbar-scrolled {
    padding: 8px 40px;
    background:#ececec;
    box-shadow: 0 6px 24px rgba(13, 59, 143, 0.12);
}

/* ===== Navbar Actions (phone + CTA) ===== */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.navbar-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding-right: 20px;
    border-right: 1px solid #e3e8ee;
}

.navbar-phone-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(23, 105, 210, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.navbar-phone:hover .navbar-phone-icon {
    background-color: #1769d2;
    transform: scale(1.08) rotate(-8deg);
}

.navbar-phone:hover .navbar-phone-icon span {
    filter: brightness(3);
}

.navbar-phone-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    color: #102a43;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.navbar-phone-text small {
    color: #8a8f96;
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.navbar-cta {
    display: inline-block;
    background-color: #1769d2;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 11px 24px;
    border-radius: 30px;
    white-space: nowrap;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.navbar-cta:hover {
    background-color: #0f52ad;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(30, 111, 217, 0.3);
}

@media (max-width: 992px) {
    .navbar-phone {
        display: none;
    }
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #102a43;
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.logo a:hover img {
    transform: rotate(-8deg) scale(1.06);
}

.logo span {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #102a43;
    transition: color 0.25s ease;
}

.logo a:hover span {
    color: #1769d2;
}

/* =========================================================
   COURSES DROPDOWN
========================================================= */

.nav-links .dropdown {
    position: relative;
}


/* Courses link */

.nav-links .dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* =========================================================
   DROPDOWN MENU
========================================================= */

.nav-links .dropdown-menu {

    position: absolute;

    top: calc(100% + 8px);
    left: 50%;

    transform: translateX(-50%) translateY(10px);

    min-width: 230px;

    margin: 0;
    padding: 10px;

    list-style: none;

    background: rgba(255, 255, 255, 0.98);

    border: 1px solid rgba(37, 99, 235, 0.12);

    border-radius: 14px;

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.15);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 9999;

}


/* =========================================================
   INVISIBLE BRIDGE
   Keeps dropdown open while moving mouse down
========================================================= */

.nav-links .dropdown-menu::before {

    content: "";

    position: absolute;

    top: -12px;

    left: 0;

    width: 100%;

    height: 12px;

}


/* =========================================================
   SHOW DROPDOWN ON HOVER
========================================================= */

.nav-links .dropdown:hover .dropdown-menu {

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform:
        translateX(-50%)
        translateY(0);

}


/* =========================================================
   DROPDOWN ITEMS
========================================================= */

.nav-links .dropdown-menu li {

    width: 100%;

}


.nav-links .dropdown-menu li a {

    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    border-radius: 9px;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;

}


/* =========================================================
   ITEM HOVER
========================================================= */

.nav-links .dropdown-menu li a:hover {

    background: #eff6ff;
    color:#2563eb;
    padding-left: 20px;
}


/* =========================================================
   SMALL BLUE LINE
========================================================= */

.nav-links .dropdown-menu li a::before {

    content: "";
    width: 0;
    height: 2px;
    margin-right: 0;
    border-radius: 5px;
    background: #2563eb;
    transition:
        width 0.25s ease,
        margin-right 0.25s ease;
}


.nav-links .dropdown-menu li a:hover::before {
    width: 5px;
    margin-right: 8px;

}

@media (max-width: 768px) {
    #coursesDropdown {
        display: none;
    }
}
.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
    
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 4px;
    position: relative;
    transition: color 0.25s ease;
}

.nav-links > li > a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #1769d2;
    transition: width 0.25s ease;
}

.nav-links > li > a:hover {
    color: #1769d2;
}

.nav-links > li > a:hover::after {
    width: 100%;
}
.nav-links .dropdown {
    position: relative;
}


/* CSS-drawn dropdown arrow (fixed spacing, no reliance on glyph padding) */
.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 4px !important;
}


.dropdown-trigger::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-top: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.dropdown:hover .dropdown-trigger::after {
    transform: rotate(180deg);
}

/* ===== Dropdown ===== */
.dropdown-menu {
      display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    list-style: none;
    padding: 6px 0;
    margin-top: 14px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 42, 67, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}


.dropdown-menu li a {
   display: block;
    padding: 10px 20px;
    color: #33404d;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.dropdown-menu li a:hover {
    background-color: #edf5ff;
    color: #1769d2;
    
}

.dropdown-divider {
    height: 1px;
    background: #edf1f6;
    margin: 6px 4px;
}
.dropdown-view-all {
    justify-content: space-between;
    font-weight: 600;
    color: #1769d2;
}

.dropdown-view-all i {
    color: #1769d2;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        margin-top:4px;
        padding: 0 0 0 14px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown.is-open .dropdown-menu {
        max-height: 400px;
    }

    .dropdown-menu li a {
        padding: 10px 8px;
        border-radius: 6px;
    }

    .dropdown-menu li a:hover {
        padding-left: 8px;
    }
}


/* ===== Buttons (shared across pages) ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #1769d2;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0f52ad;
}

.btn-outline {
    border: 2px solid #ffffff;
    color: #fff;
    background: transparent;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: #102a43;
}

/* ===== Shared Section Titles (used on multiple pages) ===== */
.section-tag {
    text-align: center;
    color: #1769d2;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.section-title {
    text-align: center;
    font-size: 1.9rem;
    color: #102a43;
    margin: 10px 0 40px;
}

/* ===== Django Messages ===== */
.messages-wrapper {
    max-width: 700px;
    margin: 20px auto 0;
    padding: 0 20px;
}

.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #e5f6e8;
    color: #1e7a34;
    border: 1px solid #b7e3bf;
}

.alert-error {
    background-color: #fdecec;
    color: #b3261e;
    border: 1px solid #f5b8b4;
}

/* ===== Footer ===== */
.site-footer {
    background-color: #102a43;
    color: #d5e3f2;
    margin-top:3px;
    font-size: 0.92rem;
}

/* -- Newsletter strip -- */
.footer-newsletter {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.newsletter-text h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.newsletter-text p {
    color: #a9bdd2;
    font-size: 0.9rem;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-form input {
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    min-width: 240px;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: #91a8be;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #1769d2;
}

/* -- Main columns -- */
.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 40px 30px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
    gap: 32px;
}

.footer-col h5 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 18px;
    letter-spacing: 0.3px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #b5c8db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col ul li a:hover {
    color: #78b8ff;
    padding-left: 3px;
}

.footer-brand .footer-logo {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 14px;
}

.footer-brand p {
    color: #a9bdd2;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #d5e3f2;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.footer-social a:hover {
    background-color: #1769d2;
    color: #fff;
    transform: translateY(-3px);
}

.footer-contact .contact-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-label {
    color: #7189a1;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.footer-contact .contact-list a {
    color: #b5c8db;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-contact .contact-list a:hover {
    color: #78b8ff;
}

/* -- Bottom bar -- */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #91a8be;
}

.footer-legal {
    display: flex;
    list-style: none;
    gap: 24px;
}

.footer-legal a {
    color: #91a8be;
    text-decoration: none;
}

.footer-legal a:hover {
    color: #78b8ff;
}

/* -- Footer responsive -- */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-newsletter {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter-form {
        width: 100%;
    }

    .newsletter-form input {
        flex: 1;
        min-width: 0;
    }

    .footer-main {
        grid-template-columns: 1fr;
        padding: 40px 20px 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

/* ===== Mobile Nav Toggle (hamburger) ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #102a43;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #1769d2;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(30, 111, 217, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.25s ease, visibility 0.3s;
    z-index: 999;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #0f52ad;
    transform: translateY(-3px);
}

/* ===== Responsive Navbar ===== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 14px 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        flex-basis: 100%;
        flex-direction: column;
        gap: 4px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    .nav-links.is-open {
        max-height: 500px;
        opacity: 1;
        margin-top: 16px;
    }

    .nav-links > li {
        width: 100%;
    }

    .nav-links > li > a {
        display: block;
        padding: 12px 4px;
        border-bottom: 1px solid #dfeaf7;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 0;
        padding-left: 12px;
        opacity: 1;
        transform: none;
        display: none;
    }

    .dropdown.is-open .dropdown-menu {
        display: block;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}


.button {
    display: inline-flex;
    align-items: center;
    height:42px;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    width: fit-content;
    font-size: 1rem;
    font-weight:500;
    color: #ffffff;
    background: #2563eb;
    border: none;
    border-radius: 0.75rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}


.button:hover {
  background-color: #000;
}



/* =========================================================
   MOBILE COURSES DROPDOWN
========================================================= */

@media (max-width: 769px) {

    .nav-links .dropdown {
        position: relative;
    }

    .nav-links .dropdown > a {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* Disable desktop positioning on mobile */

    .nav-links .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 230px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 9999;

     

    }


    /* Open when JS adds .mobile-open */

    .nav-links .dropdown.mobile-open .dropdown-menu,
    .nav-links .dropdown.is-open .dropdown-menu {

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        max-height: 400px;

    }


    /* Remove desktop invisible bridge */

    .nav-links .dropdown-menu::before {
    content: "";    
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px
    }


    /* Dropdown links */

    .nav-links .dropdown-menu li a {

        display: block;

        padding: 12px 15px;

        color: #334155;

        font-size: 0.9rem;

        border-radius: 8px;

    }


    .nav-links .dropdown-menu li a:hover {

        padding-left: 15px;

        background: #eff6ff;

        color: #2563eb;

    }


    /* Arrow */

    .dropdown-arrow {

        font-size: 0.7rem;

        transition: transform 0.3s ease;

    }


    .dropdown.mobile-open .dropdown-arrow {

        transform: rotate(180deg);

    }

}





@media (max-width: 480px) {
    .navbar {
        padding: 12px 16px;
    }

    .logo span {
        font-size: 1.1rem;
    }

    .navbar-cta {
        padding: 9px 16px;
        font-size: 0.82rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin: 8px 0 28px;
    }

    .section-tag {
        font-size: 0.78rem;
    }

    .footer-newsletter {
        padding: 24px 20px;
    }

    .newsletter-text h3 {
        font-size: 1.05rem;
    }

    .newsletter-form input {
        min-width: 0;
        padding: 10px 14px;
    }

    .footer-main {
        padding: 30px 16px 16px;
        gap: 24px;
    }

    .footer-bottom {
        padding: 16px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}