/* =========================================================
   BASE TEMPLATE — GLOBAL STYLES
   ========================================================= */

@import url('https://fonts.googleapis.com');

@import url('https://fonts.gstatic.com');

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root {
    --dark: #0A0D16;
    --dark-2: #12162A;
    --on-dark: #EDEFF7;
    --on-dark-soft: #9AA1C0;

    --bg: #F5F4F1;
    --surface: #FFFFFF;
    --ink: #12141C;
    --ink-soft: #5B6072;
    --muted: #90939F;

    --line: #E4E2DC;
    --line-dark: #232840;

    --accent: #3F51D9;
    --accent-bright: #6C7BFF;
    --accent-soft: #E9EBFB;
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    border-radius: 10px;
}

::selection {
    background: var(--accent);
    color: #fff;
}


/* =========================================================
   COMMON WRAPPER
   ========================================================= */

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}


/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(245, 244, 241, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    height: 80px;

    display: flex;
    align-items: center;
    gap: 44px;
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    display: flex;
    align-items: baseline;
    gap: 2px;

    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.01em;
    white-space: nowrap;

    height: 55px;
    width: 150px;
}

.logo .mark {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;

    display: inline-block;

    margin-right: 9px;
    transform: translateY(-1px);
}

.logo .it {
    color: var(--accent);
}


/* =========================================================
   DESKTOP NAV LINKS
   ========================================================= */

.nav-links {
    list-style: none;

    display: flex;
    align-items: center;

    gap: 6px;
    margin: 0;
    padding: 0;

    flex: 1;
}

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

.nav-link,
.nav-toggle {
    position: relative;

    display: flex;
    align-items: center;

    gap: 6px;

    padding: 8px 15px;

    font-size: 14px;
    font-weight: 500;

    color: var(--ink-soft);

    background: none;
    border: none;

    cursor: pointer;
}

.nav-link::after,
.nav-toggle::after {
    content: '';

    position: absolute;

    left: 15px;
    right: 15px;
    bottom: 2px;

    height: 1px;

    background: var(--accent);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform .18s ease;
}

.nav-link:hover,
.nav-toggle:hover,
.nav-toggle.open {
    color: var(--ink);
}

.nav-link:hover::after,
.nav-toggle:hover::after,
.nav-toggle.open::after {
    transform: scaleX(1);
}

.nav-toggle svg {
    width: 10px;
    height: 10px;

    transition: transform .2s ease;
}

.nav-toggle.open svg {
    transform: rotate(180deg);
}


/* =========================================================
   HAMBURGER
   ========================================================= */

.hamburger {
    display: none;

    background: none;
    border: none;

    cursor: pointer;

    width: 30px;
    height: 30px;

    flex-direction: column;
    justify-content: center;

    gap: 5px;
}

.hamburger span {
    height: 1.5px;
    background: var(--ink);
}

.hamburger span:nth-child(1) {
    width: 20px;
}

.hamburger span:nth-child(2) {
    width: 20px;
}

.hamburger span:nth-child(3) {
    width: 12px;
    align-self: flex-end;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
    width: 20px;
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
    width: 20px;
    align-self: flex-start;
}


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

.dropdown {
    position: absolute;

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

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

    width: 460px;

    background: var(--surface);
    border: 1px solid var(--line);

    box-shadow: 0 24px 60px rgba(10, 13, 22, 0.14);

    padding: 10px;

    opacity: 0;
    pointer-events: none;

    transition:
        opacity .16s ease,
        transform .16s ease;
}

.dropdown.open {
    opacity: 1;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 2px;
}

.dropdown-item {
    display: block;

    padding: 12px;

    transition: background .12s ease;
}

.dropdown-item:hover {
    background: var(--accent-soft);
}

.dropdown-item .name {
    font-size: 13.5px;
    font-weight: 600;

    margin-bottom: 2px;
}

.dropdown-item .desc {
    font-size: 12px;

    color: var(--muted);

    line-height: 1.4;
}

.dropdown-foot {
    border-top: 1px solid var(--line);

    margin-top: 6px;

    padding: 10px 12px 4px;
}

.dropdown-foot a {
    font-size: 13px;
    font-weight: 600;

    color: var(--accent);
}


/* =========================================================
   MOBILE PANEL
   ========================================================= */

.mobile-panel {
    display: none;

    position: fixed;

    top: 80px;
    left: 0;
    right: 0;

    background: var(--bg);

    z-index: 59;

    padding: 8px 24px 32px;

    max-height: calc(100vh - 80px);

    overflow-y: auto;

    transform: translateY(-8px);
    opacity: 0;

    pointer-events: none;

    transition:
        opacity .18s ease,
        transform .18s ease;
}

.mobile-panel {
    scrollbar-width: thin;
}

.mobile-panel::-webkit-scrollbar {
    width: 5px;
}

.mobile-panel::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 10px;
}

.mobile-panel.open {
    opacity: 1;

    transform: translateY(0);

    pointer-events: auto;
}


/* =========================================================
   MOBILE NAV LINKS
   ========================================================= */

.m-link {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 18px 4px;

    font-size: 16px;
    font-weight: 600;

    border-bottom: 1px solid var(--line);
}

.m-link svg {
    width: 11px;
    height: 11px;

    color: var(--muted);

    transition: transform .2s ease;
}

.m-link.open svg {
    transform: rotate(180deg);
}

.m-sub {
    max-height: 0;

    overflow: hidden;

    transition: max-height .22s ease;
}

.m-sub.open {
    max-height: 400px;
}

.m-sub-item {
    display: block;

    padding: 12px 4px 12px 14px;

    font-size: 14px;

    color: var(--ink-soft);

    border-bottom: 1px solid var(--line);
}


/* =========================================================
   ICON
   ========================================================= */

.icon {
    height: 15px;
    width: 15px;
}

/* =========================
   DJANGO MESSAGES
========================= */

.message-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    width: min(420px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    animation: messageSlideIn 0.3s ease;
}

.message-text {
    flex: 1;
    overflow-wrap: anywhere;
}

/* Success */
.message-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
    border-left: 4px solid #10b981;
}

/* Error */
.message-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    border-left: 4px solid #ef4444;
}

/* Warning */
.message-alert.warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
    border-left: 4px solid #f59e0b;
}

/* Info */
.message-alert.info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
    border-left: 4px solid #3b82f6;
}

/* Close button */
.message-close {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.7;
    flex-shrink: 0;
}

.message-close:hover {
    opacity: 1;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 576px) {
    .message-container {
        top: 76px;
        right: 12px;
        width: calc(100% - 24px);
    }

    .message-alert {
        padding: 13px 14px;
    }
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    background: var(--dark);

    color: var(--on-dark-soft);

    padding: 80px 0 0;
}

.footer-top {
    display: grid;

    grid-template-columns: 1.4fr 1fr 1fr 1fr;

    gap: 40px;

    padding-bottom: 60px;

    border-bottom: 1px solid var(--line-dark);
}

.footer-brand .logo {
    margin-bottom: 16px;
    color: #fff;
}

.footer-brand .logo .it {
    color: var(--accent-bright);
}

.footer-brand p {
    font-size: 13.5px;
    line-height: 1.6;

    max-width: 32ch;
}

.footer-col h4 {
    font-size: 12.5px;
    font-weight: 600;

    margin: 0 0 18px;

    color: #fff;
}

.footer-col a {
    display: block;

    font-size: 13.5px;

    margin-bottom: 13px;

    transition: color .15s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 26px 0;

    flex-wrap: wrap;

    gap: 12px;

    font-size: 12.5px;
}

.footer-legal {
    display: flex;

    gap: 20px;
}

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


/* =========================================================
   FOOTER LOGO IMAGE
   ========================================================= */

.logo-footer {
    max-height: 150px;
    max-width: 150px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .nav-links,
    .cta-btn {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-panel {
        display: block;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        row-gap: 36px;
    }
}


@media (max-width: 700px) {

    .wrap,
    .nav-inner {
        padding: 0 24px;
    }
}


@media (max-width: 800px) {

    .footer-top {
        grid-template-columns: 1fr 1fr;
        row-gap: 36px;
    }
}