/*
 * ABBEP ke apne styles. Template ka style.css chhua nahi gaya hai taki
 * template update karna aasan rahe - hamara sab kuch yahan.
 */

/* ---------- Global Fonts (Hindi & English) ---------- */
body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4 {
    font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Loading spinner clicks na khaaye ---------- */
/*
 * Spinner poore viewport pe `position-fixed` + `z-index: 99999` par baitha hai.
 * Template use sirf fade karta hai (opacity + visibility), `pointer-events`
 * kabhi nahi hataata - is wajah se fade ke poore 0.5s tak har click spinner pe
 * jaata tha, aur agar main.js dair se chala to uske baad bhi. Ab click sirf
 * tab rukta hai jab spinner sach me dikh raha ho.
 */
#spinner {
    pointer-events: none;
}

#spinner.show {
    pointer-events: auto;
}

/* ---------- Accessibility ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--bs-primary);
    color: #fff;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
}

/* Keyboard focus har jagah dikhna chahiye - template ne kai jagah hata diya tha */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid var(--bs-secondary);
    outline-offset: 2px;
}

/* ---------- object-fit utilities (Bootstrap 5.0 me nahi hain) ---------- */
/*
 * Cards `object-fit-cover` class use kar rahe the, par ye utility Bootstrap 5.3
 * me aayi thi aur yahan 5.0.0 bundled hai - class ka koi asar hi nahi tha.
 * Default `fill` ki wajah se har image apne box me khinch kar distort ho rahi
 * thi. Utility yahan back-port kar di hai taki markup jaisa likha hai waisa
 * hi behave kare.
 */
.object-fit-contain { object-fit: contain; }
.object-fit-cover { object-fit: cover; }
.object-fit-fill { object-fit: fill; }
.object-fit-scale { object-fit: scale-down; }
.object-fit-none { object-fit: none; }

/* ---------- Broken image placeholder ---------- */
img.is-placeholder {
    object-fit: contain !important;
    background: var(--bs-light);
}

/* ---------- News ticker ---------- */
.news-ticker {
    background: var(--bs-dark);
    color: #fff;
    overflow: hidden;
}

.news-ticker .ticker-label {
    background: var(--bs-primary);
    color: #fff;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.news-ticker .ticker-viewport {
    overflow: hidden;
    position: relative;
    flex: 1 1 auto;
}

.news-ticker .ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: abbep-ticker 42s linear infinite;
}

.news-ticker .ticker-track a {
    color: #fff;
    text-decoration: none;
    padding: 0 28px;
    position: relative;
}

.news-ticker .ticker-track a::after {
    content: "•";
    position: absolute;
    right: -4px;
    color: var(--bs-secondary);
}

.news-ticker .ticker-track a:hover,
.news-ticker .ticker-track a:focus {
    color: var(--bs-secondary);
    text-decoration: underline;
}

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

/* Motion sensitivity ka respect */
@media (prefers-reduced-motion: reduce) {
    .news-ticker .ticker-track {
        animation: none;
    }

    .news-ticker .ticker-viewport {
        overflow-x: auto;
    }
}

/* ---------- Hero carousel ---------- */
/*
 * Template `.header-carousel-item img` pe fixed `height: 700px` + `object-fit:
 * cover` tha. Admin ke asli banners 4:3 aur 3:2 ke hain, aur container ka ratio
 * ~1.8 tha - is wajah se har banner upar-neeche se kat raha tha.
 *
 * `contain` ke saath image kabhi crop nahi hoti. Container ko ek fixed ratio
 * diya hai taki slide badalne pe hero ki height na kude; jis banner ka ratio
 * alag ho uske kinare par backdrop dikh jaata hai.
 */
.header-carousel .header-carousel-item {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 82vh;
    overflow: hidden;
    background: #111;
}

.header-carousel .header-carousel-item .hero-backdrop,
.header-carousel .header-carousel-item .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    /* Item pehle hi navbar ka offset le chuka hai - warna image andar khisak jaati hai */
    margin-top: 0;
}

/* Bars bharne wali blurred copy - scale se blur ke phike kinare bahar chale jaate hain */
.header-carousel .header-carousel-item .hero-backdrop {
    object-fit: cover;
    filter: blur(26px) brightness(0.5);
    transform: scale(1.15);
}

/* Asli banner: poora dikhta hai, kabhi crop nahi hota */
.header-carousel .header-carousel-item .hero-image {
    object-fit: contain;
}

/* Template ne arrows ko 700px hero ke hisaab se 630px pe pin kiya tha; ab hero
   ki height screen ke saath badalti hai, isliye seedha beech me. */
@media (max-width: 576px) {
    .header-carousel .owl-nav .owl-prev,
    .header-carousel .owl-nav .owl-next {
        top: 50%;
    }
}

/* ---------- Hero carousel captions (DB-driven banners) ---------- */
.header-carousel .header-carousel-item .carousel-caption-content h1,
.header-carousel .header-carousel-item .carousel-caption-content .hero-title {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.header-carousel .header-carousel-item .carousel-caption-content p {
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

/* Template ki display-1 mobile pe hero se bahar nikal jaati thi */
@media (max-width: 768px) {
    .header-carousel .header-carousel-item .carousel-caption-content .hero-title {
        font-size: calc(1.5rem + 1.8vw);
    }

    .header-carousel .header-carousel-item .carousel-caption-content p {
        font-size: 1rem !important;
    }
}

/* ---------- Cards ---------- */
.abbep-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.abbep-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.abbep-card .abbep-card-media {
    position: relative;
    overflow: hidden;
    background: var(--bs-light);
}

.abbep-card .abbep-card-media img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.abbep-card:hover .abbep-card-media img {
    transform: scale(1.06);
}

.abbep-card .abbep-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
}

/* Heading ko 2 line pe kaat do - warna cards ki height alag-alag ho jaati hai */
.abbep-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.abbep-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Listing card media: sab jagah ek jaisa size ---------- */
/*
 * Grid/list cards ki images ka size headline ya excerpt ki lambai ke saath
 * badal raha tha, kyunki media `h-100` thi aur uske bagal ka text column
 * row ki height decide karta tha. Fixed ratio se har card ki image ek jaisi
 * rehti hai, chahe uska text kitna bhi ho.
 */
.news-horizontal-card .news-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.blog-magazine-card .card-img {
    aspect-ratio: 3 / 4;
}

@media (min-width: 992px) {
    .blog-magazine-card .card-img {
        aspect-ratio: 4 / 5;
    }
}

/* ---------- Gallery ---------- */
.abbep-gallery-tile {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bs-light);
}

.abbep-gallery-tile img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.abbep-gallery-tile:hover img {
    transform: scale(1.08);
}

.abbep-gallery-tile .tile-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0) 55%);
    color: #fff;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.abbep-gallery-tile:hover .tile-overlay,
.abbep-gallery-tile:focus-visible .tile-overlay {
    opacity: 1;
}

/* ---------- Publications / sahitya ---------- */
.abbep-pub-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    background: #fff;
    height: 100%;
}

.abbep-pub-item img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    background: var(--bs-light);
}

/* ---------- Admin-managed banner slots (sidebar / inner) ---------- */
/*
 * Banner ek ad hai - use crop karna uska matlab hi khatam kar deta hai, aur
 * admin har baar "sahi" ratio ki image nahi degi. Isliye kahin bhi `cover`
 * nahi: image apne natural ratio me rehti hai, aur sirf ek height cap lagaya
 * hai taki ek portrait banner poora page na ghere. Cap lagne par `contain`
 * image ko andar fit kar deta hai - kabhi kuch kata hua nahi dikhta.
 */
.abbep-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    background: #fff;
}

/* Sidebar: sticky column ki chaudai me, ek ke neeche ek */
.abbep-banners--sidebar {
    display: grid;
    gap: 16px;
}

.abbep-banners--sidebar .abbep-banner img {
    max-height: 460px;
}

/* Inner: content ke aakhir me patti; do ya zyada ho to desktop pe do column */
.abbep-banners--inner {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

.abbep-banners--inner .abbep-banner img {
    max-height: 260px;
}

@media (min-width: 768px) {
    .abbep-banners--inner:has(.abbep-banner:nth-child(2)) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Advertisement strip ---------- */
.abbep-ad img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.07);
}

/* ---------- Long-form content (blog/news body) ---------- */
.abbep-prose {
    line-height: 1.9;
    word-break: break-word;
}

.abbep-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.abbep-prose iframe,
.abbep-prose table {
    max-width: 100%;
}

/* WordPress import me tables aksar wide hoti hain */
.abbep-prose table {
    display: block;
    overflow-x: auto;
}

.abbep-prose h1,
.abbep-prose h2,
.abbep-prose h3 {
    margin-top: 1.6rem;
    margin-bottom: 0.8rem;
}

.abbep-prose blockquote {
    border-left: 4px solid var(--bs-secondary);
    padding: 8px 0 8px 18px;
    color: #555;
    font-style: italic;
}

/* ---------- Sticky sidebar ---------- */
@media (min-width: 992px) {
    .abbep-sticky {
        position: sticky;
        top: 100px;
    }
}

/* ==================================================================
   Home page
   ================================================================== */

/*
 * Section rhythm. Template har section pe `py-5` do baar laga raha tha
 * (container-fluid + container = 6rem upar-neeche), jisse page bahut lamba
 * aur monotonous lagta tha. Ek hi scale se spacing predictable rehti hai.
 */
.abbep-section {
    padding: 4.5rem 0;
}

.abbep-section--tight {
    padding: 3rem 0;
}

/* Alternating surface, taki lagataar sections ek doosre me na ghul jaayein */
.abbep-section--tint {
    background: var(--bs-light);
}

@media (max-width: 767.98px) {
    .abbep-section {
        padding: 3rem 0;
    }

    .abbep-section--tight {
        padding: 2rem 0;
    }
}

/* ---------- Section eyebrow ---------- */
/* Template me .section-title ka koi CSS tha hi nahi - heading ke upar wala
   chhota label bilkul plain text dikh raha tha. */
.section-title {
    position: relative;
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 0.82rem !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.6rem !important;
}

.section-title::before,
.section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 26px;
    border-top: 2px solid var(--bs-secondary);
}

.section-title::before {
    left: -26px;
}

.section-title::after {
    right: -26px;
}

/* Chhoti screen pe dono taraf ki lines heading se takra jaati thi */
@media (max-width: 575.98px) {
    .section-title::before,
    .section-title::after {
        display: none;
    }
}

/* ---------- Intro: image frame ---------- */
.abbep-media-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.abbep-media-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Peeche khiska hua accent border - sirf decorative hai */
@media (min-width: 992px) {
    .abbep-media-accent {
        position: relative;
    }

    .abbep-media-accent::before {
        content: "";
        position: absolute;
        inset: 20px -20px -20px 20px;
        border: 3px solid var(--bs-secondary);
        border-radius: 16px;
        z-index: 0;
    }

    .abbep-media-accent > * {
        position: relative;
        z-index: 1;
    }
}

/* ---------- Intro: feature tiles ---------- */
.abbep-feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    height: 100%;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.abbep-feature:hover {
    transform: translateY(-3px);
    border-color: rgba(246, 70, 108, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.abbep-feature-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(246, 70, 108, 0.1);
    color: var(--bs-primary);
    font-size: 1.05rem;
}

/* ---------- Stats band ---------- */
/*
 * Template `.counter-facts` pe ek fixed background photo lagata tha. Hata di:
 * background-attachment: fixed mobile pe janky tha, aur photo ke upar text ka
 * contrast har image ke saath bharosemand nahi rehta. Ab soft gradient hai.
 */
/*
 * Brand gradient band. Pehla version safed cards safed background pe tha -
 * page ke bold pink/orange theme ke aage bilkul dhula hua lagta tha. Ab ye
 * band CTA ke saath page ke do sire banata hai.
 */
.counter-facts {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #f2683f 55%, var(--bs-secondary) 100%);
    background-attachment: scroll;
}

/* Halke circles - flat gradient me thoda depth */
.counter-facts::before,
.counter-facts::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.counter-facts::before {
    width: 320px;
    height: 320px;
    top: -140px;
    right: -80px;
}

.counter-facts::after {
    width: 220px;
    height: 220px;
    bottom: -120px;
    left: -60px;
}

.counter-facts > * {
    position: relative;
}

/* Gradient ke upar heading safed honi chahiye */
.counter-facts .section-title {
    color: #fff;
}

.counter-facts .section-title::before,
.counter-facts .section-title::after {
    border-top-color: rgba(255, 255, 255, 0.65);
}

.counter-facts h2 {
    color: #fff;
}

.abbep-stat {
    height: 100%;
    padding: 28px 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    backdrop-filter: blur(2px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.abbep-stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.22);
}

.abbep-stat-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--bs-primary);
    font-size: 1.3rem;
}

.abbep-stat-value {
    margin: 0;
    font-size: clamp(1.85rem, 1.2rem + 1.7vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.abbep-stat-label {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

/* ---------- Membership CTA ---------- */
.abbep-cta {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--bs-secondary) 0%, #d97a00 100%);
    color: #fff;
}

/* Do halke circles - flat orange block se thoda depth aa jaata hai */
.abbep-cta::before,
.abbep-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.abbep-cta::before {
    width: 280px;
    height: 280px;
    top: -110px;
    right: -70px;
}

.abbep-cta::after {
    width: 180px;
    height: 180px;
    bottom: -90px;
    left: -50px;
}

.abbep-cta > * {
    position: relative;
}

/* ---------- Sponsor strip ---------- */
.abbep-strip-label {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.abbep-strip-label::before,
.abbep-strip-label::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ---------- Bootstrap paginator ko theme ke rang dena ---------- */
.pagination .page-link {
    color: var(--bs-dark);
    border-radius: 6px;
    margin: 0 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pagination .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.pagination .page-link:hover {
    background: var(--bs-light);
    color: var(--bs-primary);
}
