/* ==========================================================================
   THEME 2: OFFICIAL LOGO PALETTE (SAFFRON, INDIA GREEN & ASHOKA NAVY)
   * Note: Footer & NRI CTA Original Banner explicitly use the Red Theme 1 Palette
   ========================================================================== */

:root,
[data-theme="theme2"],
html[data-theme="theme2"],
body[data-theme="theme2"] {
    /* Brand Primary: Vibrant Saffron Orange (Derived strictly from logo) 
    --primary: #f57302;
    --primary-rgb: 245, 115, 2;
    --primary-hover: #e06200;
    --primary-dark: #c2410c;
    --primary-light: #ffedd5;
    --primary-soft: #fff7ed;
    --primary-gradient: linear-gradient(135deg, #021f60 0%, #f57302 60%, #21a132 100%);
    --ruby-gradient: linear-gradient(135deg, #0f172a 0%, #be123c 60%, #e11d48 100%);
    --ruby-box-bg: linear-gradient(135deg, #9f1239 0%, #881337 100%);
    --ruby-box-sub: #fde047;
    --ruby-box-border: rgba(255, 255, 255, 0.15);*/

    --primary: #be123c;
    --primary-rgb: 190, 18, 60;
    --primary-hover: #9f1239;
    --primary-dark: #881337;
    --primary-light: #ffe4e6;
    --primary-soft: #fff1f2;
    --primary-gradient: linear-gradient(135deg, #0f172a 0%, #be123c 60%, #e11d48 100%);
    --ruby-gradient: linear-gradient(135deg, #0f172a 0%, #be123c 60%, #e11d48 100%);
    --ruby-box-bg: linear-gradient(135deg, #9f1239 0%, #881337 100%);
    --ruby-box-sub: #fde047;
    --ruby-box-border: rgba(255, 255, 255, 0.15);
    

    /* Brand Secondary / Accent: India Green (Derived strictly from logo) */
    --gold: #21a132;
    --gold-rgb: 33, 161, 50;
    --gold-hover: #188326;
    --gold-light: #f0fdf4;
    --gold-gradient: linear-gradient(135deg, #21a132 0%, #16a34a 100%);

    /* Neutrals & Surfaces: Ashoka Navy, White & Silver Slate */
    --dark: #021f60;
    --dark-rgb: 2, 31, 96;
    --surface-dark: #021542;
    --surface-dark-soft: #0b2559;
    --sidebar-bg: #021542;
    --sidebar-border: rgba(255, 255, 255, 0.1);

    /* Semantic Status (Harmonized with Logo) */
    --success: #21a132;
    --success-light: #f0fdf4;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #f57302;
    --warning-light: #fff7ed;
    --info: #021f60;
    --info-light: #eff6ff;

    /* Lighting & Glow */
    --shadow-glow: 0 0 24px rgba(245, 115, 2, 0.20);
    --shadow-gold: 0 0 24px rgba(33, 161, 50, 0.22);
    --footer-link-underline: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Animations */
@keyframes nriBtnGradientSweep {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   1. FOOTER SECTION (EXPLICIT THEME 1 RED CARDS & BASE)
   ========================================================================== */
html[data-theme="theme2"] .nri-footer-ruby-banner,
body[data-theme="theme2"] .nri-footer-ruby-banner {
    background: var(--ruby-box-bg, linear-gradient(135deg, #9f1239 0%, #be123c 100%)) !important;
    border: 1px solid var(--ruby-box-border, rgba(255, 255, 255, 0.15)) !important;
}

html[data-theme="theme2"] .nri-footer-ruby-banner h3,
body[data-theme="theme2"] .nri-footer-ruby-banner h3 {
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-ruby-banner h3 span,
body[data-theme="theme2"] .nri-footer-ruby-banner h3 span {
    color: #fde047 !important;
}

html[data-theme="theme2"] .nri-footer-ruby-banner p,
body[data-theme="theme2"] .nri-footer-ruby-banner p {
    color: rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="theme2"] .nri-footer-download-card,
body[data-theme="theme2"] .nri-footer-download-card {
    background: var(--ruby-box-bg, linear-gradient(145deg, #9f1239 0%, #881337 100%)) !important;
    border: 1px solid var(--ruby-box-border, rgba(255, 255, 255, 0.15)) !important;
}

html[data-theme="theme2"] .nri-footer-download-card h4,
body[data-theme="theme2"] .nri-footer-download-card h4 {
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-download-card .card-divider,
body[data-theme="theme2"] .nri-footer-download-card .card-divider {
    background: var(--ruby-box-sub, #fde047) !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn:hover,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn svg,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-store-btn svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form input,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form input {
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form input::placeholder,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form button,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form button {
    background: var(--ruby-box-sub, #fde047) !important;
    color: #0f172a !important;
}

html[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form button:hover,
body[data-theme="theme2"] .nri-footer-download-card .nri-sc2-newsletter-form button:hover {
    background: #facc15 !important;
}

/* Footer Links Underline Gradient */
html[data-theme="theme2"] .nri-footer-link::after,
body[data-theme="theme2"] .nri-footer-link::after,
html[data-theme="theme2"] .nri-footer-legal-link::after,
body[data-theme="theme2"] .nri-footer-legal-link::after,
html[data-theme="theme2"] .nri-footer-bottom-link::after,
body[data-theme="theme2"] .nri-footer-bottom-link::after,
html[data-theme="theme2"] .nri-footer-bottom-row a::after,
body[data-theme="theme2"] .nri-footer-bottom-row a::after,
html[data-theme="theme2"] .nri-footer-list a::after,
body[data-theme="theme2"] .nri-footer-list a::after {
    background: linear-gradient(90deg, #f59e0b, #d97706) !important;
}

/* Scroll To Top & Floating Chat Buttons */
html[data-theme="theme2"] .nri-scroll-to-top-btn,
body[data-theme="theme2"] .nri-scroll-to-top-btn,
html[data-theme="theme2"] .floating-chat-btn,
body[data-theme="theme2"] .floating-chat-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-scroll-to-top-btn:hover,
body[data-theme="theme2"] .nri-scroll-to-top-btn:hover,
html[data-theme="theme2"] .floating-chat-btn:hover,
body[data-theme="theme2"] .floating-chat-btn:hover {
    background: #881337 !important;
    border-color: #fbbf24 !important;
    color: #fde047 !important;
}

/* ==========================================================================
   2. NRI CTA ORIGINAL BANNER (EXPLICIT THEME 1 RED PALETTE)
   ========================================================================== */
html[data-theme="theme2"] .nri-cta-original-banner,
body[data-theme="theme2"] .nri-cta-original-banner {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #881337 40%, #be123c 75%, #9f1239 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-badge,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #fde047 !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-heading,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-heading {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-subtext,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-subtext {
    color: #cbd5e1 !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-features,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-features {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-feature-pill,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-feature-pill {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-feature-pill svg,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-feature-pill svg {
    color: #fde047 !important;
    stroke: #fde047 !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold,
html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold,
html[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"],
body[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"] {
    background: #fff1f2 !important;
    border: 1.5px solid #ffffff !important;
    color: #881337 !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.30) !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold:hover,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold:hover,
html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold:hover,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold:hover,
html[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"]:hover,
body[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"]:hover {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #be123c !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold svg,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold svg,
html[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"] svg,
body[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"] svg {
    color: #881337 !important;
    stroke: #881337 !important;
    transition: transform 0.2s ease;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold:hover svg,
body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold:hover svg,
html[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"]:hover svg,
body[data-theme="theme2"] .nri-cta-original-banner a[data-auth-modal="register"]:hover svg {
    color: #be123c !important;
    stroke: #be123c !important;
    transform: translateX(4px);
}

/* Category Explore Tabs - Red Theme */
html[data-theme="theme2"] .nri-explore-tab:not(.active):hover,
body[data-theme="theme2"] .nri-explore-tab:not(.active):hover {
    border-color: #be123c !important;
    color: #be123c !important;
}

html[data-theme="theme2"] .nri-explore-tab.active,
body[data-theme="theme2"] .nri-explore-tab.active {
    border-color: #be123c !important;
    background: linear-gradient(135deg, #881337 0%, #be123c 55%, #e11d48 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(190, 18, 60, 0.35) !important;
}

html[data-theme="theme2"] .nri-cta-original-banner .nri-cta-image-card,
body[data-theme="theme2"] .nri-cta-original-banner .nri-cta-image-card {
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
    background: #0f172a !important;
}

/* ==========================================================================
   3. THEME 2 SPECIFIC BUTTONS & DASHBOARD SURFACES
   ========================================================================== */
html[data-theme="theme2"] .nri-btn-gold,
body[data-theme="theme2"] .nri-btn-gold,
html[data-theme="theme2"] .nri-btn.nri-btn-gold,
body[data-theme="theme2"] .nri-btn.nri-btn-gold {
    background: transparent !important;
    border: 1px solid var(--gold, #21a132) !important;
    color: var(--gold, #21a132) !important;
    transform: none !important;
    transition: background-position 0.4s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease !important;
}

html[data-theme="theme2"] .nri-btn-gold:hover,
body[data-theme="theme2"] .nri-btn-gold:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-gold:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-gold:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-gold.nri-btn-sm:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-gold.nri-btn-sm:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-gold.nri-btn-lg:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-gold.nri-btn-lg:hover {
    background-image: linear-gradient(90deg, #ffffff 0%, #dcfce7 35%, #ffffff 70%, #bbf7d0 100%) !important;
    background-size: 200% auto !important;
    animation: nriBtnGradientSweep 2.2s linear infinite !important;
    border: 1px solid #21a132 !important;
    color: #15803d !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 18px rgba(33, 161, 50, 0.25) !important;
    transform: none !important;
}

html[data-theme="theme2"] .nri-btn-primary,
body[data-theme="theme2"] .nri-btn-primary,
html[data-theme="theme2"] .nri-btn.nri-btn-primary,
body[data-theme="theme2"] .nri-btn.nri-btn-primary {
    background-image: linear-gradient(90deg, #ffffff 0%, #ffedd5 35%, #ffffff 70%, #fed7aa 100%) !important;
    background-size: 200% auto !important;
    animation: nriBtnGradientSweep 2.2s linear infinite !important;
    border: 1px solid var(--primary, #f57302) !important;
    color: var(--primary, #f57302) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 18px rgba(245, 115, 2, 0.28) !important;
    transform: none !important;
    transition: background-position 0.4s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.3s ease !important;
}

html[data-theme="theme2"] .nri-btn-primary:hover,
body[data-theme="theme2"] .nri-btn-primary:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-primary:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-primary:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-primary.nri-btn-sm:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-primary.nri-btn-sm:hover,
html[data-theme="theme2"] .nri-btn.nri-btn-primary.nri-btn-lg:hover,
body[data-theme="theme2"] .nri-btn.nri-btn-primary.nri-btn-lg:hover {
    /*background: #f57302 !important;
    background-color: #f57302 !important;
    background-image: linear-gradient(135deg, #f57302 0%, #ea580c 50%, #f57302 100%) !important;*/
    background-size: 200% auto !important;
    animation: none !important;
    border: 1px solid #f57302 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(245, 115, 2, 0.38) !important;
    transform: none !important;
}

html[data-theme="theme2"] .nri-sidebar,
body[data-theme="theme2"] .nri-sidebar {
    background: #021542;
}

html[data-theme="theme2"] .nri-sidebar-link:hover,
body[data-theme="theme2"] .nri-sidebar-link:hover {
    background: rgba(245, 115, 2, 0.12) !important;
    color: #ffffff !important;
    border-left: 3px solid #f57302 !important;
}

html[data-theme="theme2"] .nri-sidebar-link.active,
body[data-theme="theme2"] .nri-sidebar-link.active {
    background: linear-gradient(90deg, rgba(245, 115, 2, 0.28) 0%, rgba(33, 161, 50, 0.15) 100%) !important;
    color: #ffffff !important;
    border-left: 3px solid #f57302 !important;
}

html[data-theme="theme2"] .nri-portal-topbar,
body[data-theme="theme2"] .nri-portal-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="theme2"] .nri-badge-primary,
body[data-theme="theme2"] .nri-badge-primary {
    background: #fff7ed !important;
    color: #f57302 !important;
    border: 1px solid #ffedd5 !important;
}

html[data-theme="theme2"] .nri-badge-gold,
body[data-theme="theme2"] .nri-badge-gold {
    background: #f0fdf4 !important;
    color: #21a132 !important;
    border: 1px solid #dcfce7 !important;
}

html[data-theme="theme2"] .nri-page-btn.active,
body[data-theme="theme2"] .nri-page-btn.active {
    background: #f57302 !important;
    border-color: #f57302 !important;
    color: #ffffff !important;
}

html[data-theme="theme2"] .nri-input:focus,
html[data-theme="theme2"] .nri-select:focus,
html[data-theme="theme2"] textarea:focus,
html[data-theme="theme2"] input:focus,
html[data-theme="theme2"] select:focus,
body[data-theme="theme2"] .nri-input:focus,
body[data-theme="theme2"] .nri-select:focus,
body[data-theme="theme2"] textarea:focus,
body[data-theme="theme2"] input:focus,
body[data-theme="theme2"] select:focus {
    border-color: var(--danger, #dc2626) !important;
    box-shadow: none !important;
    outline: none !important;
}

html[data-theme="theme2"] .care-hero-card,
body[data-theme="theme2"] .care-hero-card {
    background-image: linear-gradient(135deg, rgba(2, 31, 96, 0.88) 0%, rgba(15, 23, 42, 0.80) 50%, rgba(245, 115, 2, 0.48) 100%), url('/images/about-hero-bg.jpg') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

html[data-theme="theme2"] .policy-hero,
body[data-theme="theme2"] .policy-hero {
    background-image: linear-gradient(135deg, rgba(2, 31, 96, 0.88) 0%, rgba(15, 23, 42, 0.80) 50%, rgba(245, 115, 2, 0.48) 100%), var(--hero-bg, url('/images/nri-policy-bg.jpg')) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

/* ==========================================================================
   4. RESPONSIVE BREAKPOINTS FOR THEME 2 CTA BANNER & FOOTER
   ========================================================================== */
@media (max-width: 991px) {
    html[data-theme="theme2"] .nri-cta-original-banner,
    body[data-theme="theme2"] .nri-cta-original-banner {
        padding: 48px 0 !important;
    }
    html[data-theme="theme2"] .nri-footer,
    body[data-theme="theme2"] .nri-footer {
        padding-bottom: 84px !important;
    }
}

@media (max-width: 480px) {
    html[data-theme="theme2"] .nri-cta-original-banner,
    body[data-theme="theme2"] .nri-cta-original-banner {
        padding: 36px 0 !important;
    }
    html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold,
    body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-cta-gold,
    html[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold,
    body[data-theme="theme2"] .nri-cta-original-banner .nri-btn-gold {
        width: 100%;
        font-size: 14.5px !important;
        padding: 12px 20px !important;
    }
}
