/* Apna Broadcast — Custom Styles */

:root {
    --forest: #071C15;
    --emerald: #17B26A;
    --whatsapp: #25D366;
    --heading-gradient: linear-gradient(135deg, #128c55 0%, #17b26a 35%, #25d366 70%, #17b26a 100%);
}

html { scroll-behavior: smooth; }

/* Public site only — hide page scrollbar, keep scrolling */
html:has(body:not(.admin-body)) {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html:has(body:not(.admin-body))::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent;
}

/* Shared section heading system — matches Integrations reference */
.section-heading {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #071c15;
    margin: 0 auto 0.75rem;
    text-align: center;
    max-width: 40rem;
}

.section-heading--wide {
    max-width: 42rem;
}

.page-heading {
    font-size: clamp(2rem, 4.8vw, 2.85rem);
    line-height: 1.12;
}

.section-heading__accent {
    position: relative;
    display: inline;
    background: var(--heading-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-desc {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    line-height: 1.65;
    color: #60736a;
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Form inputs */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #D8E7DE;
    border-radius: 10px;
    background: #fff;
    color: #10231B;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.15);
}

/* Dark navbar — active link gradient line indicator */
#site-header .nav-link {
    position: relative;
}
#site-header .nav-link.is-active {
    color: #ffffff;
    font-weight: 600;
}
#site-header .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.375rem;
    width: 1.75rem;
    height: 2px;
    margin-left: -0.875rem;
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(23, 178, 106, 0.5) 15%,
        rgba(37, 211, 102, 0.95) 50%,
        rgba(23, 178, 106, 0.5) 85%,
        transparent 100%
    );
    box-shadow: 0 1px 3px rgba(37, 211, 102, 0.22);
    transform: scaleX(0);
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
}
#site-header .nav-link.is-active::after {
    animation: navActiveLineIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes navActiveLineIn {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Mobile menu active — matching gradient line */
#mobile-menu nav a {
    position: relative;
}
#mobile-menu .is-active {
    color: #fff !important;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
}
#mobile-menu nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.5rem;
    width: 1.75rem;
    height: 2px;
    margin-left: -0.875rem;
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(23, 178, 106, 0.5) 15%,
        rgba(37, 211, 102, 0.95) 50%,
        rgba(23, 178, 106, 0.5) 85%,
        transparent 100%
    );
    box-shadow: 0 1px 3px rgba(37, 211, 102, 0.22);
    transform: scaleX(0);
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
}
#mobile-menu nav a.is-active::after {
    animation: navActiveLineIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.delay-200 { transition-delay: 200ms; }

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-bubble-1 { animation: bubbleIn 0.55s ease 0.15s both; }
.animate-bubble-2 { animation: bubbleIn 0.55s ease 0.3s both; }
.animate-bubble-3 { animation: bubbleIn 0.55s ease 0.45s both; }

@keyframes badgeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-badge-in { animation: badgeIn 0.5s ease 0.2s both; }

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-rise { animation: rise 0.4s ease; }

.faq-icon.is-open { transform: rotate(180deg); transition: transform 0.25s; }

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

/* Admin login background */
.admin-login-bg {
    background: linear-gradient(135deg, #071C15 0%, #0D2A20 50%, #071C15 100%);
    position: relative;
    overflow: hidden;
}
.admin-login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(23,178,106,0.12) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(37,211,102,0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* Hero campaign progress animation */
.campaign-progress { animation: progressFill 2s ease 1s forwards; }
@keyframes progressFill { to { width: 82%; } }

.hero-messages .msg-in { animation: bubbleIn 0.4s ease 0.6s both; }
.hero-messages .msg-out { animation: bubbleIn 0.4s ease 0.9s both; }
.delivery-tick { animation: bubbleIn 0.3s ease 1.2s both; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

/* Admin layout — fixed sidebar */
.admin-body { overflow: hidden; }
.admin-shell { display: flex; height: 100vh; width: 100%; overflow: hidden; }
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: 16rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #071C15;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,0.05);
    transform: translateX(0);
    transition: transform 0.28s ease;
}
.admin-sidebar-brand {
    flex-shrink: 0;
    padding: 0.75rem 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar-brand .brand-logo {
    height: 2rem;
    max-width: 2.75rem;
}
.admin-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    padding: 0.5rem 0.625rem;
    overflow: hidden;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 0 0 auto;
    min-height: 2.5rem; /* 40px */
    padding: 0.5625rem 0.875rem; /* ~9px 14px */
    border-radius: 0.5rem;
    font-size: 0.9375rem; /* 15px */
    line-height: 1.25;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    transition: background 0.2s ease, color 0.2s ease;
}
.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.admin-nav-link.is-active,
.admin-nav-link[data-active="true"] {
    background: rgba(23, 178, 106, 0.2);
    color: #25D366;
    font-weight: 600;
}
.admin-nav-link svg,
.admin-sidebar-logout svg {
    width: 1.125rem; /* 18px */
    height: 1.125rem;
    flex-shrink: 0;
}
.admin-nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.5rem 0.625rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.5rem;
    padding: 0.5625rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    transition: background 0.2s ease, color 0.2s ease;
}
.admin-sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Shorter laptops — slightly tighter, still readable */
@media (max-height: 820px) {
    .admin-sidebar-brand {
        padding: 0.625rem 0.75rem;
    }
    .admin-sidebar-brand .brand-logo {
        height: 1.875rem;
        max-width: 2.5rem;
    }
    .admin-sidebar-nav {
        padding: 0.375rem 0.5rem;
        gap: 3px;
    }
    .admin-sidebar-footer {
        padding: 0.375rem 0.5rem;
    }
    .admin-nav-link,
    .admin-sidebar-logout {
        min-height: 2.25rem; /* 36px */
        padding: 0.4375rem 0.75rem;
        font-size: 0.875rem; /* 14px */
    }
    .admin-nav-link svg,
    .admin-sidebar-logout svg {
        width: 1.0625rem; /* 17px */
        height: 1.0625rem;
    }
}

@media (max-height: 700px) {
    .admin-sidebar-brand {
        padding: 0.5rem 0.625rem;
    }
    .admin-sidebar-brand .brand-logo {
        height: 1.75rem;
        max-width: 2.375rem;
    }
    .admin-sidebar-nav {
        padding: 0.25rem 0.5rem;
        gap: 2px;
    }
    .admin-sidebar-footer {
        padding: 0.25rem 0.5rem;
    }
    .admin-nav-link,
    .admin-sidebar-logout {
        min-height: 2.125rem; /* 34px */
        padding: 0.375rem 0.75rem;
        font-size: 0.84375rem; /* ~13.5px */
        gap: 0.5rem;
    }
    .admin-nav-link svg,
    .admin-sidebar-logout svg {
        width: 1rem; /* 16px */
        height: 1rem;
    }
}
.admin-main {
    flex: 1;
    margin-left: 16rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}
.admin-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1rem 1.5rem; }
.admin-topbar { position: sticky; top: 0; }
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(7,28,21,0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
}
.admin-overlay.is-visible { display: block; opacity: 1; }
@media (max-width: 1023px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    body.admin-drawer-open { overflow: hidden; }
}

/* Delete confirmation modal */
.delete-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(7,28,21,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.delete-modal.is-visible { opacity: 1; visibility: visible; }
.delete-modal-panel {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 24rem;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Manual → Automation section */
.manual-msg { animation: manualFade 4s ease infinite; animation-delay: calc(var(--i) * 0.6s); }
@keyframes manualFade {
    0%, 100% { opacity: 0.55; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(4px); }
}
.automation-pulse { animation: hubPulse 2s ease infinite; }
@keyframes hubPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(23,178,106,0.35); }
    50% { box-shadow: 0 0 0 8px rgba(23,178,106,0); }
}
.automation-line { animation: lineGrow 2s ease infinite; transform-origin: top; }
@keyframes lineGrow {
    0%, 100% { transform: scaleY(0.6); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}
.campaign-flow-bar { animation: progressFill 2.5s ease infinite alternate; width: 75%; }
.automation-arrow { animation: arrowSlide 1.5s ease infinite; }
@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* Feature bento animations */
.feature-broadcast-bar { animation: progressFill 2.4s ease-in-out infinite alternate; }
.feature-card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(7, 28, 21, 0.06); }
.feature-preview { border-radius: 10px; border: 1px solid rgba(216, 231, 222, 0.9); background: #fff; }
.feature-preview-dark { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.08); }
.feature-dot { animation: dotPulse 1.2s ease infinite; animation-delay: calc(var(--d) * 0.15s); }
@keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Tool integration cards */
.tool-card-compact { box-shadow: 0 1px 2px rgba(7, 28, 21, 0.04); }
.tool-card-compact:hover { transform: translateY(-1px); }
.tool-logo-wrap img { max-height: 2rem; width: auto; }

/* Brand logo — full vertical logo, uncropped, proportional */
.brand-logo {
    display: block;
    flex-shrink: 0;
    height: 2.375rem;
    width: auto;
    max-width: 3.25rem;
    object-fit: contain;
    object-position: left center;
    overflow: visible;
}
.brand-logo-sm { height: 2rem; max-width: 2.75rem; }
.brand-logo-lg { height: 2.5rem; max-width: 3.5rem; }
.brand-logo-xl { height: 2.75rem; max-width: 3.75rem; margin-left: auto; margin-right: auto; }
.brand-logo-icon {
    display: block;
    width: auto;
    height: auto;
    max-width: 2rem;
    max-height: 2rem;
    object-fit: contain;
}
.brand-logo-wrap { display: flex; align-items: center; overflow: visible; line-height: 0; }

.logo-brand-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: rgba(234, 248, 241, 0.08);
    border: 1px solid rgba(23, 178, 106, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0.4rem;
    overflow: visible;
}
.logo-brand-circle-lg { width: auto; height: auto; min-width: 3.5rem; min-height: 3.5rem; padding: 0.5rem; }

.resource-card-image img { transition: transform 0.5s ease; }
.group:hover .resource-card-image img { transform: scale(1.05); }

/* Meta partner badge */
.meta-partner-badge .meta-logo-mark { display: block; }

.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
