/* ----- RESET / BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #eef3f9;
    color: #07172f;
    font-size: 16px;
    line-height: 1.6;
}

/* ============================================================
   SPACING SYSTEM
   ============================================================ */
:root {
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 80px;
    --section-padding-desktop: 80px 0;
    --section-padding-tablet: 60px 0;
    --section-padding-mobile: 40px 0;
}

@media (max-width: 1024px) {
    :root {
        --section-padding-desktop: 60px 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding-desktop: 40px 0;
        --spacing-3xl: 48px;
        --spacing-2xl: 32px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding-desktop: 32px 0;
        --spacing-xl: 24px;
        --spacing-lg: 16px;
    }
}

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */
.text-base { font-size: 16px; line-height: 1.6; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-xs { font-size: 12px; line-height: 1.5; }
.text-xxs { font-size: 11px; line-height: 1.45; }

.description { font-size: 16px; line-height: 1.7; color: #24364a; }
.card-description { font-size: 14px; line-height: 1.55; color: #536276; }
.card-description-sm { font-size: 12px; line-height: 1.45; color: #536276; }
.text-meta { font-size: 13px; line-height: 1.4; color: #405268; font-weight: 500; }
.text-label { font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: 0.15px; text-transform: uppercase; }

/* ----- TAILWIND-STYLE CONTAINER ----- */
.container {
    width: 100%;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1280px; } }
@media (min-width: 1536px) { .container { max-width: 1536px; } }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    width: 100%;
    background: #ffffff;
    /* border-bottom: 1px solid #e8edf2; */
    padding:  1rem 0;
    /* padding:0 1rem; */
    position: sticky;
    top: 0px;
    z-index: 999;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* padding: 0; */
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo h1 {
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #07172f;
    letter-spacing: -0.5px;
}

.logo p {
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #53627a;
    letter-spacing: 0.3px;
}

/* Navigation */
.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.nav-link {
    position: relative;
    color: #07172f;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.nav-link:hover {
    color: #1976d2;
}

.nav-link.active {
    color: #1976d2;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #1976d2;
    border-radius: 2px;
}

/* ============================================================
    MEGAMENU
    ============================================================ */
.nav-item-with-megamenu {
    position: relative;
}

.nav-item-with-megamenu .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item-with-megamenu .nav-link i {
    font-size: 10px;
    color: #53627a;
    transition: transform 0.3s ease;
}

.nav-item-with-megamenu:hover .nav-link i {
    transform: rotate(180deg);
    color: #1976d2;
}

.megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 600px;
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 25px 30px;
}

.nav-item-with-megamenu:hover .megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.megamenu-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.megamenu-column h4 {
    margin: 0 0 15px;
    color: #07172f;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    border-bottom: 2px solid #1976d2;
    padding-bottom: 8px;
}

.megamenu-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.megamenu-column li {
    margin: 0 0 10px;
}

.megamenu-column a {
    color: #536276;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.megamenu-column a:hover {
    color: #1976d2;
    transform: translateX(5px);
}

/* Megamenu responsive adjustments */
@media (max-width: 1024px) {
    .megamenu {
        min-width: 500px;
        padding: 20px 25px;
    }

    .megamenu-container {
        gap: 25px;
    }

    .megamenu-column h4 {
        font-size: 15px;
    }

    .megamenu-column a {
        font-size: 13px;
    }
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}

.header-icons a {
    color: #07172f;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.2s ease;
}

.header-icons a:hover {
    color: #1976d2;
}

/* ---- header responsive ---- */
@media (max-width: 1024px) {
    .navigation {
        gap: 18px;
    }

    .nav-link {
        font-size: 14px;
    }

    .nav-item-with-megamenu .nav-link i {
        font-size: 9px;
    }

    .logo img {
        height: 45px;
    }
}

@media (max-width: 768px) {
    .header-container {
        /* flex-direction: column; */
        align-items: center;
        
        gap: 8px;
        /* padding: 14px 0; */
    }

    .navigation {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
        gap: 16px;
    }

    .nav-link {
        font-size: 13px;
        white-space: nowrap;
    }

    .header-icons {
        margin-left: 0;
        gap: 20px;
    }

    .logo img {
        height: 40px;
    }

    .logo h1 {
        font-size: 26px;
    }

    .logo p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 35px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .logo p {
        font-size: 11px;
    }

    .header-icons {
        gap: 16px;
    }

    .header-icons a {
        font-size: 17px;
    }

    .nav-link {
        font-size: 12px;
    }
}

/* ============================================================
    MOBILE TOGGLE BUTTON
    ============================================================ */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger {
    width: 100%;
    height: 3px;
    background: #07172f;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-toggle:hover .hamburger {
    background: #1976d2;
}

.mobile-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================================
    SIDEBAR OVERLAY
    ============================================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
    SIDEBAR
    ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e8edf2;
}

.sidebar-logo img {
    height: 45px;
    width: auto;
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f7fb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #53627a;
    font-size: 18px;
}

.sidebar-close:hover {
    background: #e8edf2;
    color: #1976d2;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-link {
    display: block;
    padding: 14px 24px;
    color: #07172f;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f7fbff;
    color: #1976d2;
    border-left-color: #1976d2;
}

.sidebar-link.active {
    color: #1976d2;
    background: #f7fbff;
    border-left-color: #1976d2;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e8edf2;
}

.sidebar-social {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.sidebar-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #53627a;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
}

.sidebar-social a:hover {
    background: #1976d2;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ============================================================
    RESPONSIVE - SHOW TOGGLE AT 991px
    ============================================================ */
@media (max-width: 991px) {
    .mobile-toggle {
        display: flex;
    }

    .navigation {
        display: none;
    }

    .nav-item-with-megamenu .nav-link i {
        display: none;
    }
}

/* ============================================================
    SIDEBAR DROPDOWN
    ============================================================ */
.sidebar-dropdown {
    position: relative;
}

.sidebar-link.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 20px;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #53627a;
}

.sidebar-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f7fbff;
}

.sidebar-dropdown.active .sidebar-dropdown-content {
    max-height: 500px;
}

.sidebar-dropdown-section {
    padding: 15px 24px 15px 44px;
    border-bottom: 1px solid #e8edf2;
}

.sidebar-dropdown-section:last-child {
    border-bottom: none;
}

.sidebar-dropdown-section h5 {
    margin: 0 0 10px;
    color: #07172f;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sidebar-dropdown-section a {
    display: block;
    padding: 6px 0;
    color: #536276;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-dropdown-section a:hover {
    color: #1976d2;
    transform: translateX(5px);
}

/* ============================================================
    RESPONSIVE - SIDEBAR ADJUSTMENTS
    ============================================================ */
@media (max-width: 480px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-logo img {
        height: 40px;
    }

    .sidebar-link {
        padding: 12px 20px;
        font-size: 15px;
    }

    .sidebar-footer {
        padding: 16px;
    }

    .sidebar-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .sidebar-dropdown-section {
        padding: 12px 20px 12px 40px;
    }

    .sidebar-dropdown-section h5 {
        font-size: 12px;
    }

    .sidebar-dropdown-section a {
        font-size: 12px;
    }
}

/* Back to top button visibility */
.safikul-back-top { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.safikul-back-top.visible { opacity: 1; visibility: visible; }
