/* ============================================================
   IMG — Institut de Management et de Gestion
   Classic, smooth & animated landing — palette from img-logo.svg
   navy #022A59 · gold #D4A017 · cream #F8F7F4
   ============================================================ */

:root {
    --img-navy: #022A59;
    --img-navy-2: #0A4A8F;
    --img-navy-3: #063a75;
    --img-ink: #13263E;
    --img-gold: #D4A017;
    --img-gold-2: #E8BE4D;
    --img-gold-soft: #FBF3DF;
    --img-cream: #F8F7F4;
    --img-border: #E9E4D8;
    --img-white: #FFFFFF;
    --img-muted: #5C6B7E;
    --img-serif: "EB Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
    --img-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --img-shadow: 0 18px 50px -18px rgba(2, 42, 89, 0.28);
    --img-shadow-lg: 0 30px 70px -20px rgba(2, 42, 89, 0.35);
}

html[dir="rtl"] body {
    --img-sans: "Cairo", "Inter", "Segoe UI", system-ui, sans-serif;
    --img-serif: "Cairo", "Playfair Display", Georgia, serif;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    font-family: var(--img-sans);
    color: var(--img-ink);
    background: var(--img-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Buttons ---------- */
.btn-gold {
    --bs-btn-bg: var(--img-gold);
    --bs-btn-border-color: var(--img-gold);
    --bs-btn-color: var(--img-navy);
    --bs-btn-hover-bg: var(--img-gold-2);
    --bs-btn-hover-border-color: var(--img-gold-2);
    --bs-btn-hover-color: var(--img-navy);
    --bs-btn-active-bg: var(--img-gold-2);
    --bs-btn-active-border-color: var(--img-gold-2);
    --bs-btn-active-color: var(--img-navy);
    font-weight: 700;
    border-radius: 50rem;
    box-shadow: 0 10px 24px -10px rgba(212, 160, 23, 0.65);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -12px rgba(212, 160, 23, 0.75);
}

.btn-outline-navy {
    --bs-btn-color: var(--img-navy);
    --bs-btn-border-color: var(--img-navy);
    --bs-btn-hover-bg: var(--img-navy);
    --bs-btn-hover-border-color: var(--img-navy);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--img-navy-2);
    --bs-btn-active-border-color: var(--img-navy-2);
    --bs-btn-active-color: #fff;
    font-weight: 600;
    border-radius: 50rem;
    transition: transform .25s ease, background .25s ease;
}

.btn-outline-navy:hover {
    transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
.img-navbar {
    padding: 18px 0;
    transition: padding .35s ease, background .35s ease, box-shadow .35s ease;
}

.img-navbar.scrolled {
    padding: 10px 0;
    background: rgba(2, 42, 89, 0.97);
    box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.img-navbar-logo {
    background: #fff;
    padding: 5px;
    border-radius: 9px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.img-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.img-brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 0.08em;
}

.img-brand-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.img-nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem !important;
    position: relative;
}

.img-nav-link::after {
    content: "";
    position: absolute;
    bottom: 4px;
    inset-inline-start: 0.9rem;
    width: 0;
    height: 2px;
    background: var(--img-gold);
    transition: width .3s ease;
}

.img-nav-link:hover::after,
.img-nav-link:focus::after {
    width: calc(100% - 1.8rem);
}

.img-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 6px 10px;
}

.img-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.img-toggler:focus {
    box-shadow: none;
}

.img-nav-cta {
    border-radius: 50rem;
    padding: 0.55rem 1.4rem;
    font-size: 0.92rem;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(2, 42, 89, 0.5);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 16px;
        padding: 1rem 1.25rem;
        margin-top: 0.9rem;
        box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.55);
    }

    .img-nav-cta {
        width: 100%;
    }
}

.img-lang-menu {
    border-radius: 14px;
    border: 1px solid var(--img-border);
    box-shadow: var(--img-shadow);
    min-width: 10rem;
}

.img-lang-menu .dropdown-item {
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 1.1rem;
}

.img-lang-menu .dropdown-item.active {
    background: var(--img-navy);
}

/* ---------- Hero ---------- */
.img-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.img-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("../images/img-images/img-1.jpg");
    background-size: cover;
    background-position: center;
}

@media (max-width: 1199px) {
    .img-hero-bg { background-image: url("../images/img-images/img-1-1280.jpg"); }
}

/* mobile: the 9:16 reel shot fits a phone screen better than the
   landscape photo — portrait framing, object-fit handles the crop */
@media (max-width: 575px) {
    .img-hero-bg {
        background-image: url("../images/img-images/shot-from-reel-img-1.jpg");
        background-position: center 30%;
    }
}

.img-hero-content {
    position: relative;
    z-index: 2;
    padding-top: clamp(118px, 19vh, 165px);
    padding-bottom: 80px;
    text-align: center;
}

.img-hero-card {
    background: transparent;
    border-radius: 0;
    padding: clamp(1.5rem, 3.2vw, 2.15rem);
    max-width: 620px;
    margin-inline: auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.img-hero-title {
    font-family: var(--img-serif);
    font-weight: 700;
    font-size: clamp(1.95rem, 4.4vw, 3rem);
    line-height: 1.18;
    color: #fff;
    text-shadow: 0 2px 20px rgba(2, 42, 89, 0.8), 0 1px 3px rgba(2, 42, 89, 0.5);
    margin-bottom: 0.85rem;
}

.img-hero-subtitle {
    font-size: clamp(0.98rem, 1.7vw, 1.1rem);
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 14px rgba(2, 42, 89, 0.85), 0 1px 3px rgba(2, 42, 89, 0.5);
    max-width: 520px;
    margin-inline: auto;
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

.img-hero-cta {
    margin-bottom: 1.35rem;
}

.img-hero-divider {
    width: 76px;
    height: 3px;
    border: none;
    background: linear-gradient(90deg, var(--img-gold), transparent);
    margin: 0 auto 1.15rem;
    opacity: 1;
    border-radius: 3px;
}

html[dir="rtl"] .img-hero-divider {
    background: linear-gradient(-90deg, var(--img-gold), transparent);
}

.img-hero-stats .img-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.img-stat-value {
    font-family: var(--img-serif);
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff;
    text-shadow: 0 1px 12px rgba(2, 42, 89, 0.85), 0 1px 2px rgba(2, 42, 89, 0.5);
    line-height: 1;
}

.img-stat-value i {
    color: var(--img-gold);
}

.img-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.02em;
}

/* secondary CTA turns white-outline over the photo */
.img-hero .btn-outline-navy {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, 0.75);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
    --bs-btn-hover-color: var(--img-navy);
    --bs-btn-active-bg: #fff;
    --bs-btn-active-border-color: #fff;
    --bs-btn-active-color: var(--img-navy);
}

.img-scroll-hint {
    position: absolute;
    bottom: 26px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.4rem;
    z-index: 2;
    animation: imgBounce 2s ease-in-out infinite;
    transition: color .25s ease;
}

html[dir="rtl"] .img-scroll-hint {
    transform: translateX(50%);
}

.img-scroll-hint:hover {
    color: var(--img-gold-2);
}

@keyframes imgBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 10px); }
}

html[dir="rtl"] .img-scroll-hint {
    animation-name: imgBounceRtl;
}

@keyframes imgBounceRtl {
    0%, 100% { transform: translate(50%, 0); }
    50%      { transform: translate(50%, 10px); }
}

/* Entrance reveal (above-the-fold, CSS only) */
.reveal {
    opacity: 0;
    animation: imgReveal .9s cubic-bezier(.22, .8, .36, 1) forwards;
}

.reveal-1 { animation-delay: .15s; }
.reveal-2 { animation-delay: .35s; }
.reveal-3 { animation-delay: .55s; }

@keyframes imgReveal {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; animation: none; }
    .img-hero-bg { animation: none; }
    html { scroll-behavior: auto; }
    .img-marquee-track { animation-duration: 120s; }
}

/* ---------- Marquee strip ---------- */
.img-marquee {
    background: var(--img-navy);
    border-block: 2px solid var(--img-gold);
    overflow: hidden;
    padding: 0.8rem 0;
}

.img-marquee-track {
    display: flex;
    width: max-content;
    animation: imgMarquee 36s linear infinite;
}

html[dir="rtl"] .img-marquee-track {
    animation-direction: reverse;
}

.img-marquee-group {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    padding-inline-end: 2.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.img-marquee-sep {
    color: var(--img-gold);
}

@keyframes imgMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

html[dir="rtl"] .img-marquee-track {
    animation-name: imgMarqueeRtl;
}

@keyframes imgMarqueeRtl {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

/* ---------- Sections ---------- */
.img-section {
    padding: clamp(4.5rem, 9vw, 7rem) 0;
}

.img-section-cream {
    background: var(--img-cream);
}

.img-section-navy {
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(10, 74, 143, 0.55), transparent 60%),
        radial-gradient(900px 420px at 10% 110%, rgba(212, 160, 23, 0.14), transparent 60%),
        linear-gradient(150deg, var(--img-navy) 0%, var(--img-navy-3) 55%, #011d3d 100%);
}

.img-section-head {
    margin-bottom: 3.4rem;
}

.img-kicker {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--img-gold);
    margin-bottom: 0.9rem;
}

.img-kicker::before,
.img-kicker::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1.5px;
    background: currentColor;
    vertical-align: middle;
    margin-inline: 0.6rem;
    opacity: 0.7;
}

.img-kicker-gold {
    color: var(--img-gold-2);
}

.img-title {
    font-family: var(--img-serif);
    font-weight: 800;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
    color: var(--img-navy);
    margin-bottom: 1rem;
}

.img-title-light {
    color: #fff;
}

.img-subtitle {
    color: var(--img-muted);
    font-size: 1.05rem;
    max-width: 640px;
    line-height: 1.75;
    margin-bottom: 0;
}

.img-subtitle-light {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Why choose us ---------- */
.img-feature {
    background: var(--img-white);
    border: 1px solid var(--img-border);
    border-radius: 20px;
    padding: 2.1rem 1.7rem;
    height: 100%;
    text-align: center;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.img-feature:hover {
    transform: translateY(-8px);
    box-shadow: var(--img-shadow);
    border-color: rgba(212, 160, 23, 0.45);
}

.img-feature-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #fff;
    background: linear-gradient(140deg, var(--img-navy), var(--img-navy-2));
    border-radius: 18px;
    box-shadow: 0 12px 26px -10px rgba(2, 42, 89, 0.55);
    transition: transform .35s ease;
}

.img-feature:hover .img-feature-icon {
    transform: rotate(-6deg) scale(1.06);
}

.img-feature-title {
    font-family: var(--img-serif);
    font-weight: 700;
    font-size: 1.22rem;
    color: var(--img-navy);
    margin-bottom: 0.6rem;
}

.img-feature-text {
    color: var(--img-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ---------- Photo-backed section (why) ---------- */
.img-section-photo {
    position: relative;
    overflow: hidden;
}

.img-section-photo-bg {
    position: absolute;
    inset: 0;
    background-image: url("../images/img-images/img-2.jpg");
    background-size: cover;
    background-position: center;
}

@media (max-width: 1199px) {
    .img-section-photo-bg {
        background-image: url("../images/img-images/img-2-1280.jpg");
    }
}

@media (max-width: 575px) {
    .img-section-photo-bg {
        background-image: url("../images/img-images/img-2-800.jpg");
    }
}

.img-section-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 42, 89, 0.85) 0%, rgba(2, 42, 89, 0.6) 45%, rgba(2, 42, 89, 0.82) 100%);
}

.img-section-photo-content {
    position: relative;
    z-index: 1;
}

/* Campus section: img-3 photo background (same overlay treatment as why) */
.img-section-photo-campus .img-section-photo-bg {
    background-image: url("../images/img-images/img-3.jpg");
}

@media (max-width: 1199px) {
    .img-section-photo-campus .img-section-photo-bg {
        background-image: url("../images/img-images/img-3-1280.jpg");
    }
}

@media (max-width: 575px) {
    .img-section-photo-campus .img-section-photo-bg {
        background-image: url("../images/img-images/img-3-800.jpg");
    }
}

/* ---------- Formations ---------- */
.img-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.img-filter-btn {
    border: 1px solid var(--img-border);
    background: var(--img-white);
    color: var(--img-ink);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1.3rem;
    border-radius: 50rem;
    transition: all .25s ease;
}

.img-filter-btn:hover {
    border-color: var(--img-navy);
    color: var(--img-navy);
}

.img-filter-btn.active {
    background: var(--img-navy);
    border-color: var(--img-navy);
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(2, 42, 89, 0.6);
}

.img-formation {
    background: var(--img-white);
    border: 1px solid var(--img-border);
    border-radius: 20px;
    padding: 1.7rem 1.6rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.img-formation::before {
    content: "";
    position: absolute;
    top: 1.15rem;
    bottom: 1.15rem;
    inset-inline-start: 0;
    width: 5px;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(180deg,
        var(--img-gold) 0%,
        rgba(212, 160, 23, 0.55) 45%,
        rgba(212, 160, 23, 0) 100%);
    box-shadow: 0 0 16px rgba(212, 160, 23, 0.5);
    opacity: 0.95;
    transition: opacity .3s ease, box-shadow .3s ease, width .3s ease;
}

html[dir="rtl"] .img-formation::before {
    border-radius: 6px 0 0 6px;
}

.img-formation:hover {
    transform: translateY(-7px);
    box-shadow: var(--img-shadow);
    border-color: rgba(212, 160, 23, 0.4);
}

.img-formation:hover::before {
    opacity: 1;
    width: 7px;
    box-shadow: 0 0 26px rgba(212, 160, 23, 0.75);
}

.img-formation-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.img-formation-level {
    background: var(--img-gold-soft);
    color: #8a6410;
    border: 1px solid rgba(212, 160, 23, 0.35);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.32rem 0.9rem;
    border-radius: 50rem;
}

.img-formation-code {
    font-family: "SF Mono", ui-monospace, Menlo, monospace;
    font-size: 0.75rem;
    color: var(--img-muted);
    letter-spacing: 0.05em;
}

.img-formation-name {
    font-family: var(--img-serif);
    font-weight: 700;
    font-size: 1.18rem;
    line-height: 1.4;
    color: var(--img-navy);
    margin-bottom: 0.35rem;
}

.img-formation-name-alt {
    font-size: 0.82rem;
    color: var(--img-muted);
    margin-bottom: 1.2rem;
    direction: ltr;
    text-align: start;
}

html[dir="rtl"] .img-formation-name-alt {
    direction: ltr;
    text-align: start;
}

html[dir="rtl"] .img-formation-name-alt[lang="fr"] {
    direction: ltr;
}

.img-formation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.3rem;
    font-size: 0.83rem;
    color: var(--img-muted);
    margin-bottom: 1.35rem;
}

.img-formation-meta i {
    color: var(--img-gold);
    margin-inline-end: 0.3rem;
}

.img-formation-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--img-navy);
    text-decoration: none;
    border-top: 1px dashed var(--img-border);
    padding-top: 1.05rem;
    transition: color .25s ease, gap .25s ease;
}

.img-formation-link:hover {
    color: var(--img-gold);
    gap: 0.75rem;
}

.img-formation-col[hidden] {
    display: none;
}

/* ---------- Preregistration / Tally ---------- */
.img-register-card {
    background: var(--img-white);
    border-radius: 24px;
    padding: clamp(0.8rem, 2vw, 1.6rem);
    max-width: 860px;
    margin-inline: auto;
    box-shadow: var(--img-shadow-lg);
}

.img-register-card iframe {
    border-radius: 16px;
    display: block;
}

.img-trust {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    font-weight: 600;
}

.img-trust i {
    color: var(--img-gold-2);
    margin-inline-end: 0.4rem;
}

/* ---------- Footer ---------- */
.img-footer {
    background: #01121f;
    color: rgba(255, 255, 255, 0.75);
    border-top: 3px solid var(--img-gold);
}

.img-footer-brand {
    text-decoration: none;
}

.img-footer-brand img {
    background: #fff;
    padding: 4px;
    border-radius: 8px;
}

.img-footer-name {
    font-weight: 800;
    color: #fff;
    font-size: 1.02rem;
}

.img-footer-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.img-footer-heading {
    font-family: var(--img-serif);
    font-size: 1.05rem;
    color: var(--img-gold-2);
    margin-bottom: 1.1rem;
}

.img-footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.img-footer-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.img-footer-list i {
    color: var(--img-gold);
    margin-top: 0.2rem;
}

.img-footer-list a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: color .2s ease, border-color .2s ease;
}

.img-footer-list a:hover {
    color: var(--img-gold-2);
    border-color: var(--img-gold-2);
}

.img-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.img-footer-langs a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 700;
    padding: 0 0.15rem;
}

.img-footer-langs a:hover,
.img-footer-langs a.active {
    color: var(--img-gold-2);
}

/* ---------- AOS tuning ---------- */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}
