@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --font-display: font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;;
    --font-body: font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;;

    --color-primary: #193C80;
    --color-accent: #CB4856;
    --color-black: #111111;
    --color-surface: #f7f7f5;
    --color-border: rgba(0, 0, 0, 0.1);
    --color-muted: #888;

    --radius: 6px;
    --nav-height: 60px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--color-surface);
    color: var(--color-black);
}

#root {
    width: 100%;
}


/* ─── NAV ─────────────────────────────────────── */
nav {
    width: 100%;
    height: var(--nav-height);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    inset: 0;
    bottom: auto;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid var(--color-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo img {
    height: 30px;
    aspect-ratio: 1/1;
}
.logo span {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

nav .links {
    display: flex;
    gap: 15px;
}
nav .links a {
    text-decoration: none;
    color: black;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: opacity var(--transition);
}
nav .links a:hover {
    opacity: 1;
}

nav .access {
    display: flex;
    align-items: center;
    gap: 15px;
}
nav .access #subscribe {
    background: var(--color-accent);
    height: 32px;
    padding: 0 18px;
    border-radius: var(--radius);
    color: white;
    border: none;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity var(--transition);
}
nav .access #subscribe:hover {
    opacity: 0.85;
}
nav .access #menuOpen {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}
nav .access #menuOpen svg {
    fill: var(--color-black);
}
nav .access #menuOpen .close {
    display: none;
}
#root.menuOpen nav .access #menuOpen .open { display: none; }
#root.menuOpen nav .access #menuOpen .close { display: block; }


/* ─── MOBILE MENU ─────────────────────────────── */
#mobileMenu {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-height) + 20px) 24px 30px;
    translate: 0 100%;
    transition: translate 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#root.menuOpen #mobileMenu {
    translate: 0 0;
}
#mobileMenu .search {
    height: 44px;
    margin-top: 10px;
}
#mobileMenu .divider {
    height: 1px;
    background: var(--color-border);
    margin-top: 12px;
    display: inline-block;
    width: 100%;
}
#mobileMenu .links {
    display: flex;
    flex-direction: column;
    margin-top: 24px;
}
#mobileMenu .links a {
    text-decoration: none;
    padding: 14px 4px;
    color: var(--color-black);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background var(--transition), padding var(--transition);
}
#mobileMenu .links a:first-child {
    border-top: 1px solid var(--color-border);
}
#mobileMenu .links a:hover {
    padding-left: 12px;
    background: var(--color-surface);
}
#mobileMenu .links a svg {
    width: 16px;
    aspect-ratio: 1/1;
    opacity: 0.4;
    z-index: -5;
}
#mobileMenu .links:hover a svg {
    z-index: 10;
}


.search-results{
    position:absolute;
    top:48px;
    left:0;
    width:100%;
    background:#fff;
    border:1px solid #ddd;
    border-radius:6px;
    display:none;
    max-height:350px;
    overflow-y:auto;
    z-index:9999;
}

.search-item{

    display:flex;
    gap:12px;
    padding:10px;
    text-decoration:none;
    color:black;
    border-bottom:1px solid #eee;

}

.search-item:hover{

    background:#f5f5f5;

}

.search-item img{

    width:70px;
    height:50px;
    object-fit:cover;
    border-radius:5px;

}

.search-item h4{

    margin:0;
    font-size:15px;

}

.search-item small{

    color:gray;

}


.search-heading{

    padding:12px;

    background:#f5f5f5;

    font-size:13px;

    font-weight:600;

    color:#666;

    border-bottom:1px solid #eee;

}

mark{

    background:#ffe46b;

    color:black;

    padding:0 2px;

    border-radius:2px;

}

/* ─── HERO ────────────────────────────────────── */
#hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--nav-height);
    text-align: center;
    color: white;
    padding: 40px 20px 40px;
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('hero-bg.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}
#hero .header {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    z-index: 5;
    min-height: 1.3em;
}
#hero .tagline {
    margin-top: 14px;
    font-size: 0.95rem;
    font-weight: 400;
    /* opacity: 0.85; */
    z-index: 5;
    max-width: 480px;
    margin-inline: auto;
    line-height: 1.6;
}
#hero .read-more {
    margin-top: 24px;
    font-size: 0.6rem;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px 24px;
    border: none;
    background: black;
    color: white;
    border-radius: var(--radius);
    cursor: pointer;
    z-index: 5;
    transition: opacity var(--transition);
}
#hero .read-more:hover {
    opacity: 0.85;
}

#typing::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}


/* ─── MAIN ────────────────────────────────────── */
#main {
    width: 100%;
    padding: 32px 40px;
}
#main .banner {
    display: flex;
    gap: 40px;
    margin-top: 10px;
}
#main .left {
    width: 60%;
    display: flex;
    flex-direction: column;
}
#main .right {
    width: 40%;
}


/* ─── SECTION HEADERS ─────────────────────────── */
#main .header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
}
#main .header h1 {
    font-family: var(--font-display);
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.3px;
}
#main .header span.line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
    margin-top: 3px;
}


/* ─── BLOG GRID ───────────────────────────────── */
#main .blogs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 14px;
}
#main .blog {
    width: 100%;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}
#main .blog .image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius);
    overflow: hidden;
}
#main .blog .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
#main .blog:hover .image img {
    transform: scale(1.03);
}
#main .blog h1 {
    font-family: var(--font-display);
    font-size: clamp(14px, 4vw, 17px);
    font-weight: 600;
    margin-top: 12px;
}
#main .blog .tags {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    color: var(--color-muted);
}
#main .blog .blog-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}
#main .blog .blog-bottom-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
#main .blog .blog-bottom .socials {
    display: flex;
    gap: 5px;
}
#main .blog .blog-bottom .socials a {
    width: 34px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: opacity var(--transition);
}
#main .blog .blog-bottom .socials a:hover {
    opacity: 0.8;
}
#main .blog .blog-bottom .socials a:nth-child(1) { background: #1751c5; }
#main .blog .blog-bottom .socials a:nth-child(2) { background: #6d99f1; }
#main .blog .blog-bottom .socials a:nth-child(3) { background: #2d9e3d; }
#main .blog .date {
    font-size: 0.72rem;
    color: var(--color-muted);
    font-weight: 500;
}


/* ─── EXPANDABLE TEXT ──────────────────────────────────── */
.cutoff-text {
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;
    position: relative;
}
.cutoff-text::after {
    content: '›››';
    position: absolute;
    right: 0;
    top: 50%;
    translate: 0 -50%;
    padding-left: 20px;
    background: linear-gradient(to right, transparent, white 40%);
    color: black;
    font-size: 1.3em;
    font-weight: 700;
}
.cutoff-text.expanded {
    white-space: normal;
    overflow: visible;
}
.cutoff-text.expanded::after {
    content: '';
}


/* ─── SEARCH ──────────────────────────────────── */
.search {
    width: 100%;
    height: 42px;
    position: relative;
}
.search input {
    width: 100%;
    height: 100%;
    padding: 0 16px 0 40px;
    border-radius: var(--radius);
    border: 1.5px solid var(--color-border);
    font-family: var(--font-body);
    font-size: 0.85rem;
    background: white;
    transition: border-color var(--transition);
}
.search input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.search input::placeholder {
    color: var(--color-muted);
}
.search svg, .search i {
    position: absolute;
    height: 16px;
    left: 12px;
    top: 50%;
    translate: 0 -50%;
    fill: var(--color-muted);
    color: var(--color-muted);
    font-size: 14px;
}


/* ─── CATEGORIES ──────────────────────────────── */
#main .right .header.categories {
    margin-top: 28px;
}
#main .category-buttons {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#main .category-buttons button {
    border: none;
    border-radius: 5px;
    padding: 5px 16px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
}
#main .category-buttons button:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
#main .category-buttons button:nth-child(1) { background: var(--color-primary); }
#main .category-buttons button:nth-child(2) { background: #F1A748; }
#main .category-buttons button:nth-child(3) { background: #70BF63; }
#main .category-buttons button:nth-child(4) { background: var(--color-accent); }
#main .category-buttons button:nth-child(5) { background: var(--color-black); }
#main .category-buttons button:nth-child(6) { background: var(--color-primary); }
#main .category-buttons button:nth-child(7) { background: #F1A748; }
#main .category-buttons button:nth-child(8) { background: #70BF63; }

/* ─── POPULAR POSTS ───────────────────────────── */
#main .right .header.popular {
    margin-top: 28px;
}
#main .right .popular-post {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    width: 100%;
}
#main .right .popular-post .image {
    width: 80px;
    height: 56px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}
#main .right .popular-post .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
#main .right .popular-post:hover .image img {
    transform: scale(1.05);
}
#main .right .popular-post .info h3 {
    width: 250px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
#main .right .popular-post .info span {
    width: 250px;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 3px;
    display: block;
}


/* ─── ADVERTISEMENT ───────────────────────────── */
#main .right .advertisement {
    background: #efefed;
    border: 1.5px dashed #ccc;
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--color-muted);
    font-size: 0.8rem;
    margin-top: 8px;
}


/* ─── DIVIDER ─────────────────────────────────── */
.divider {
    width: 100%;
    height: 1px;
    background: var(--color-border);
    margin-top: 20px;
    display: inline-block;
}


/* ─── FOLLOW SOCIALS ──────────────────────────── */
#main .right .header.follow {
    margin-top: 20px;
}
#main .right .mainSocials .socials {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
#main .right .mainSocials .socials a {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: opacity var(--transition), transform var(--transition);
}
#main .right .mainSocials .socials a:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}
#main .right .mainSocials .socials a:nth-child(1) { background: #1751c5; }
#main .right .mainSocials .socials a:nth-child(2) { background: #1da1f2; }
#main .right .mainSocials .socials a:nth-child(3) { background: #2d9e3d; }


/* ─── FEATURED POST ───────────────────────────── */
#main .featured-post {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 32px;
    background-image: url('featured-post.webp');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    color: white;
    margin-top: 24px;
    position: relative;
}
#main .featured-post h1 {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.5rem);
}
#main .featured-post p {
    margin-top: 6px;
    font-size: 0.85rem;
    opacity: 0.8;
}
#main .featured-post a {
    width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    margin-top: 10px;
    background: var(--color-accent);
    border-radius: var(--radius);
    color: white;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
    transition: opacity var(--transition);
}
#main .featured-post a:hover {
    opacity: 0.85;
}

.mobile-search {
    display: none;
}

/* ─── MEDIA QUERIES ───────────────────────────── */
@media screen and (max-width: 1020px) {
    #main {
        padding: 24px 20px;
    }
    #main .banner {
        flex-direction: column;
        gap: 30px;
    }
    #main .left, #main .right {
        width: 100%;
    }

    .desktop-search {
        display: none;
    }
    .mobile-search {
        display: block;
    }
}

@media screen and (max-width: 620px) {
    nav {
        padding: 0 16px;
    }
    nav .links {
        display: none;
    }
    nav .access #menuOpen {
        display: flex;
    }
    #main .featured-post {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }
    #main .featured-post a {
        position: relative;
        left: 0;
        transform: none;
        margin-top: 16px;
    }
}