body.template-modern {
    margin: 0;
    color: #182230;
    background: linear-gradient(180deg, #eef3f9 0, #f8fafc 420px, #fff 100%);
    font-family: Roboto, Arial, sans-serif;
}

/* Use the complete browser width on desktop as well as mobile. */
body.template-modern #wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 18px 54px rgba(15, 23, 42, .12);
}

body.template-modern #header {
    width: 100% !important;
    max-width: none !important;
    color: #fff;
    background: linear-gradient(115deg, #bd3214 0%, #9d2b18 42%, #202650 100%) !important;
    border-bottom: 0 !important;
}

body.template-modern #header .header-topbar {
    min-height: 72px;
}

body.template-modern #header .header-logo,
body.template-modern #header .header-logo-fallback {
    border-radius: 12px !important;
}

body.template-modern #main_nav,
body.template-modern #header .nav {
    background: linear-gradient(100deg, #c73312 0%, #a72c17 48%, #202650 100%) !important;
}

body.template-modern .template-intro {
    padding: 64px 24px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-color, #2563eb), #172554);
}

body.template-modern .template-intro span {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

body.template-modern .template-intro h1 {
    margin: 12px 0;
    color: #fff !important;
    font-size: clamp(30px, 5vw, 56px);
    line-height: 1.1;
}

body.template-modern .template-intro p {
    font-size: 18px;
    opacity: .9;
}

body.template-modern .template-intro a {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    color: var(--theme-color, #2563eb);
    background: #fff;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

body.template-modern .template-home-shell {
    width: 100%;
    max-width: none;
    margin: auto;
    padding: 0;
}

body.template-modern .index-banner-carousel {
    width: calc(100% - 40px) !important;
    margin: 18px auto 24px !important;
    border: 0 !important;
    border-radius: 22px !important;
    overflow: hidden;
    background: #e2e8f0 !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .14);
}

body.template-modern .index-banner-carousel img {
    border: 0 !important;
    border-radius: 22px;
}

body.template-modern .index-banner-carousel .banner-slide img {
    width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    object-fit: cover !important;
    object-position: center 24% !important;
}

body.template-modern .search_main_content {
    width: calc(100% - 40px) !important;
    margin: 0 auto 24px !important;
}

body.template-modern .latest-profile-section {
    width: calc(100% - 40px) !important;
    margin: 24px auto !important;
    padding: 28px !important;
    border: 1px solid #e7edf5 !important;
    border-radius: 22px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .08) !important;
}

body.template-modern .latest-title-row {
    border-bottom: 0 !important;
    padding-bottom: 14px !important;
}

body.template-modern .latest-title-row h2 {
    color: #172554 !important;
    font-size: clamp(20px, 3vw, 28px) !important;
}

body.template-modern .latest-all-btn,
body.template-modern .view-profile-btn {
    color: #fff !important;
    background: linear-gradient(135deg, var(--theme-color, #2563eb), #1d4ed8) !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 7px 16px rgba(37, 99, 235, .2);
}

body.template-modern .latest-grid {
    gap: 20px !important;
}

body.template-modern .latest-card {
    padding: 12px !important;
    text-align: left !important;
    background: #fff !important;
    border: 1px solid #e5eaf1 !important;
    border-radius: 18px !important;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .09) !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

body.template-modern .latest-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .15) !important;
}

body.template-modern .latest-photo {
    height: 260px !important;
    border: 0 !important;
    border-radius: 14px !important;
}

body.template-modern .latest-card h3 {
    color: #172554 !important;
    font-size: 18px !important;
}

@media (max-width: 768px) {
    body.template-modern #wrapper {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0;
    }

    body.template-modern .index-banner-carousel,
    body.template-modern .search_main_content,
    body.template-modern .latest-profile-section {
        width: calc(100% - 20px) !important;
        margin: 12px auto !important;
    }

    body.template-modern .latest-profile-section {
        padding: 16px 10px !important;
        border-radius: 16px !important;
    }

    body.template-modern .latest-photo {
        height: 210px !important;
    }

    body.template-modern .index-banner-carousel .banner-slide img {
        height: 220px !important;
        max-height: 220px !important;
        object-position: center 22% !important;
    }
}
