/* v2 skin for the older page CSS (main.css, pages.css, inline styles).
   Loaded last on every page that uses includes/header.php or blog-post.php,
   so these rules restyle existing pages without touching their markup.
   The homepage does not load this file (it has its own CSS). */

/* ---------- Palette and type: remap the old variables ---------- */
:root {
    /* main.css */
    --primary: #3346f5;
    --secondary: #6a4cf5;
    --accent: #ff6a2b;
    --dark: #0b1533;
    --gray: #475569;
    --light: #f6f7fc;
    /* pages.css */
    --ink: #0b1533;
    --ink-sub: #475569;
    --brand: #3346f5;
    --brand-l: #5163ff;
    --brand-xl: #8fa0ff;
    --surface: #f6f7fc;
    --surface-2: #eef1ff;
    --border: #e4e8f2;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(11, 21, 51, .06), 0 1px 1px rgba(11, 21, 51, .04);
    --shadow-md: 0 10px 30px -12px rgba(11, 21, 51, .18), 0 2px 6px rgba(11, 21, 51, .05);
    --shadow-lg: 0 30px 60px -24px rgba(23, 37, 112, .28), 0 8px 18px -8px rgba(11, 21, 51, .12);
    --font-display: "Plus Jakarta Sans", "Inter", sans-serif;
    --font-body: "Inter", sans-serif;

    --skin-mesh:
        radial-gradient(60% 80% at 8% 0%, #e7ebff 0%, rgba(231, 235, 255, 0) 60%),
        radial-gradient(45% 70% at 100% 10%, #ffe8dc 0%, rgba(255, 232, 220, 0) 60%),
        radial-gradient(50% 60% at 70% 100%, #dcf6f1 0%, rgba(220, 246, 241, 0) 60%),
        #f8f9ff;
    --skin-dark:
        radial-gradient(60% 90% at 0% 0%, rgba(106, 76, 245, .55) 0%, transparent 60%),
        radial-gradient(50% 80% at 100% 100%, rgba(0, 169, 155, .45) 0%, transparent 60%),
        #0a1230;
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
h1, h2, h3, h4, h5,
.feature-title, .pg-section-title, .pg-card__title, .section-title {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    letter-spacing: -.02em;
}
h1, h2 { font-weight: 800; }
/* Inline styles that asked for the old display font */
[style*="Poppins"] { font-family: "Plus Jakarta Sans", "Inter", sans-serif !important; }
main a:not([class]) { color: #3346f5; text-underline-offset: 3px; }
main a:not([class]):hover { color: #2333d6; }
::selection { background: rgba(51, 70, 245, .16); }
:focus-visible { outline: 3px solid rgba(51, 70, 245, .45); outline-offset: 2px; }

/* ---------- Page heroes: same mesh background as the homepage ---------- */
.page-hero, .pg-hero, .service-hero, .hero-section, .blog-header {
    position: relative;
    isolation: isolate;
}
.page-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background: var(--skin-mesh);
}
.page-hero { padding: 64px 0 48px !important; margin-bottom: 40px; }
.pg-hero { background: var(--skin-mesh); padding: 64px 0 52px; }
.pg-hero::before {
    top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; border-radius: 0;
    background-image: linear-gradient(rgba(51, 70, 245, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(51, 70, 245, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%);
    opacity: .6;
}
.pg-hero::after { display: none; }
.page-hero h1, .pg-hero h1 {
    font-size: clamp(30px, 4vw, 46px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em;
    color: #0b1533;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.page-hero p, .pg-hero .pg-subtitle { color: #5b6785; font-size: 1.12rem; max-width: 720px; }
.hero-buttons, .pg-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* Location pages: inline purple gradient → navy with soft colour glows */
.hero-location {
    background: var(--skin-dark) !important;
    padding: 64px 0 56px !important;
}
.hero-location h1 { color: #fff !important; font-size: clamp(28px, 3.6vw, 42px) !important; line-height: 1.15 !important; }

/* Eyebrows and badges */
.pg-badge {
    border-color: #e4e8f2;
    color: #0b1533;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: 0 1px 2px rgba(11, 21, 51, .06);
}
.pg-section-label {
    color: #3346f5 !important;
    background: none !important;
    padding: 0 !important;
    letter-spacing: .08em;
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn, .pg-btn, .cta-button, .hp-btn {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    border-radius: 12px;
    min-height: 46px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.2;
    text-align: center;
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
/* Primary actions are the orange conversion colour, as on the homepage */
.btn-primary, .pg-btn--primary, .cta-button, .hp-btn-primary {
    background: #ff6a2b !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 10px 22px -10px rgba(255, 106, 43, .75);
}
.btn-primary:hover, .pg-btn--primary:hover, .cta-button:hover, .hp-btn-primary:hover {
    background: #ec5516 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -10px rgba(255, 106, 43, .8);
}
.btn-outline, .pg-btn--outline, .btn-secondary, .hp-btn-secondary {
    background: #fff !important;
    color: #0b1533 !important;
    border: 1.5px solid #e4e8f2 !important;
}
.btn-outline:hover, .pg-btn--outline:hover, .btn-secondary:hover, .hp-btn-secondary:hover {
    border-color: #3346f5 !important;
    color: #3346f5 !important;
    background: #fff !important;
}
.btn-white, .pg-btn--white, .hp-btn-white { background: #fff !important; color: #0b1533 !important; border: 0; }
.btn-white:hover, .pg-btn--white:hover, .hp-btn-white:hover { background: #eef1ff !important; }
.btn-outline-white, .pg-btn--ghost, .hp-btn-ghost {
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, .3) !important;
}
.btn-outline-white:hover, .pg-btn--ghost:hover { background: rgba(255, 255, 255, .18) !important; }

/* ---------- Cards ---------- */
.pg-card, .service-card, .feature-card, .stat-card, .resource-card, .district-card, .city-card,
.post-card, .pricing-card, .pg-contact-card, .category-card, .strategy-card, .contact-card, .pg-plan {
    border: 1px solid #e4e8f2 !important;
    border-radius: 18px !important;
    box-shadow: 0 1px 2px rgba(11, 21, 51, .06), 0 1px 1px rgba(11, 21, 51, .04) !important;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pg-card:hover, .service-card:hover, .feature-card:hover, .resource-card:hover, .district-card:hover,
.city-card:hover, .post-card:hover, .category-card:hover {
    transform: translateY(-3px);
    border-color: #cfd6f6 !important;
    box-shadow: 0 10px 30px -12px rgba(11, 21, 51, .18), 0 2px 6px rgba(11, 21, 51, .05) !important;
}
.pg-card__icon { border-radius: 14px; }
.stat-number, .pg-stat__value { font-family: "Plus Jakarta Sans", "Inter", sans-serif; letter-spacing: -.03em; color: #0b1533; }
.pg-plan--featured, .pricing-card.featured, .pricing-card.popular { border: 2px solid #3346f5 !important; box-shadow: 0 30px 60px -24px rgba(23, 37, 112, .28) !important; }

/* ---------- CTA bands ---------- */
.cta-box, .pg-cta, .cta-section, .pg-section--cta, .hp-cta {
    background: var(--skin-dark) !important;
    color: rgba(255, 255, 255, .85);
}
.cta-box { border-radius: 24px; padding: 48px 32px; }
.cta-box h2, .pg-cta h2, .cta-section h2, .pg-section--cta h2 { color: #fff !important; }
.pg-section--dark { background: var(--skin-dark) !important; }
.pg-section--alt { background: #f6f7fc; }

/* ---------- Forms ---------- */
main input[type="text"], main input[type="email"], main input[type="tel"], main input[type="number"],
main input[type="url"], main input[type="search"], main select, main textarea,
.form-control, .pg-form input, .pg-form select, .pg-form textarea {
    border: 1.5px solid #e4e8f2;
    border-radius: 12px;
    min-height: 46px;
    padding: 10px 14px;
    font: 15.5px/1.4 "Inter", sans-serif;
    color: #0b1533;
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
main textarea, .form-control:is(textarea) { min-height: 110px; }
main input:focus, main select:focus, main textarea:focus, .form-control:focus {
    outline: none;
    border-color: #3346f5;
    box-shadow: 0 0 0 4px rgba(51, 70, 245, .12);
}
.form-label, .pg-form-label, main label { color: #0b1533; }

/* ---------- Tables ---------- */
main table { border-color: #e4e8f2; }
main table th { font-family: "Inter", sans-serif; }
main thead th { background-color: #f6f7fc; color: #0b1533; }
main table td, main table th { border-color: #e4e8f2; }

/* ---------- Code blocks keep a dark theme ---------- */
main pre { border-radius: 14px; }

/* Lead modal header (hidden by default) */
.modal-header { background: var(--skin-dark) !important; }

@media (max-width: 640px) {
    .page-hero, .pg-hero { padding: 44px 0 36px !important; }
    .hero-location { padding: 44px 0 40px !important; }
    .hero-buttons .btn, .pg-hero__actions .pg-btn { flex: 1 1 auto; }
}

/* ---------- Page-specific fixes found in the v2 design review ---------- */

/* Pages whose content has no container of its own (bulk-sms-india, otp-sms-india, sms-api-india) */
.main-content > .service-page { max-width: 1200px; margin: 0 auto; padding: 0 20px 64px; }
.service-hero { padding: 56px 0 40px; }
.service-hero::before {
    content: ""; position: absolute; z-index: -1; top: 0; bottom: 0;
    left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--skin-mesh);
}
.service-page .code-preview { border-radius: 18px !important; background: #0d1430 !important; }
.service-page .cta-section { border-radius: 24px !important; }

/* Letter / emoji icons in feature cards → soft tiles */
.feature-card .feature-icon {
    width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 16px;
    display: grid; place-items: center; font: 800 22px/1 "Plus Jakarta Sans", "Inter", sans-serif;
    color: #3346f5; background: #eef1ff;
}

/* Blog listing hero: was a dark image with low-contrast text */
.main-content > .hero {
    position: relative; isolation: isolate; text-align: center;
    padding: 64px 20px 48px !important; margin-bottom: 40px !important;
    background: var(--skin-mesh) !important; color: #0b1533;
}
.main-content > .hero h1 { color: #0b1533 !important; font-size: clamp(30px, 4vw, 46px) !important; letter-spacing: -.035em; }
.main-content > .hero .lead, .main-content > .hero p { color: #5b6785 !important; opacity: 1 !important; }
.main-content > .hero::before, .main-content > .hero::after { display: none !important; }

/* Database pages (index.php generic template) */
.db-page { padding: 0 0 64px; }
.db-page .page-hero { margin-bottom: 36px; }
.db-content {
    max-width: 920px; margin: 0 auto 32px; padding: 40px 44px; background: #fff;
    border: 1px solid #e4e8f2; border-radius: 22px; box-shadow: 0 10px 30px -18px rgba(11, 21, 51, .22);
}
.db-content > h2 { font-size: clamp(24px, 2.6vw, 30px); color: #0b1533; margin: 0 0 12px; }
.db-subtitle { font-size: 1.1rem; color: #5b6785; margin: 0 0 20px; }
.db-body { color: #334155; font-size: 16px; line-height: 1.75; }
.db-body h2, .db-body h3 { color: #0b1533; margin: 1.6em 0 .5em; line-height: 1.25; }
.db-body h2 { font-size: 24px; }
.db-body h3 { font-size: 19px; }
.db-body ul, .db-body ol { padding-left: 1.3em; }
.db-body li { margin: .3em 0; }
.db-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; display: block; overflow-x: auto; }
.db-body th, .db-body td { padding: 10px 14px; border: 1px solid #e4e8f2; text-align: left; vertical-align: top; }
.all-pages { background: #f6f7fc !important; border-top-color: #e4e8f2 !important; }
.all-pages h2 { font-size: clamp(22px, 2.4vw, 28px) !important; }
.all-pages > div > div > div { border: 1px solid #e4e8f2; border-radius: 16px !important; box-shadow: none !important; }
.all-pages a { color: #334155; text-decoration: none; }
.all-pages a:hover { color: #3346f5; }

@media (max-width: 640px) {
    .db-content { padding: 26px 20px; border-radius: 18px; }
    .main-content > .service-page { padding: 0 16px 48px; }
}

/* Blog listing title: main.css paints it with a white text-gradient meant for a dark photo */
.main-content > .hero h1 { background: none !important; -webkit-text-fill-color: currentColor !important; }
/* Blog listing sections have no container of their own */
.main-content > .blog-categories, .main-content > .featured-posts,
.main-content > .newsletter-signup, .main-content > .blog-resources {
    max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px;
}

/* Code blocks scroll inside themselves; grid items may shrink below their content */
pre { max-width: 100%; overflow-x: auto; }
.pg-card, .feature-card, .service-card, [class*="grid"] > * { min-width: 0; }
main [style*="display: flex"] > div, main [style*="display:flex"] > div,
main [style*="display: grid"] > *, main [style*="display:grid"] > *, .api-container > * { min-width: 0; }
.tab-header { flex-wrap: wrap; }

/* Phones: wide tables scroll inside their own box instead of widening the page,
   and inline grids with wide minimum columns collapse to one column */
@media (max-width: 640px) {
    table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    [style*="minmax(3"], [style*="minmax(4"], [style*="minmax(5"] { grid-template-columns: 1fr !important; }
}
