/* ========================================================
   CIVIL BANDHU FEATURE SHOWCASE DETAIL PAGES STYLESHEET
   ======================================================== */

/* CSS Variables-based dynamic theming system */
body.theme-primary {
    --theme-color: var(--primary);
    --theme-color-dark: var(--primary-dark);
    --theme-color-light: var(--primary-light);
    --theme-color-rgb: 26, 86, 219;
}
body.theme-secondary {
    --theme-color: var(--secondary);
    --theme-color-dark: var(--secondary-dark);
    --theme-color-light: #fcd34d;
    --theme-color-rgb: 245, 158, 11;
}
body.theme-accent {
    --theme-color: var(--accent);
    --theme-color-dark: #059669;
    --theme-color-light: #6ee7b7;
    --theme-color-rgb: 16, 185, 129;
}
body.theme-gray {
    --theme-color: var(--gray);
    --theme-color-dark: #334155;
    --theme-color-light: var(--gray-light);
    --theme-color-rgb: 71, 85, 105;
}

/* Fallback default theme variables (Indigo) */
:root {
    --theme-color: var(--primary);
    --theme-color-dark: var(--primary-dark);
    --theme-color-light: var(--primary-light);
    --theme-color-rgb: 26, 86, 219;
}

/* Detail Pages Hero Header */
.detail-hero-section {
    padding: 115px 0 32px;
    background: var(--white);
    border-bottom: 1px solid var(--paper-lines);
    position: relative;
    overflow: hidden;
}

.detail-hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.detail-hero {
    position: relative;
    z-index: 2;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--paper-lines);
    background: var(--white);
}

.btn-back:hover {
    color: var(--theme-color);
    border-color: rgba(var(--theme-color-rgb), 0.3);
    transform: translateX(-4px);
    box-shadow: var(--shadow-sm);
}

.detail-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.detail-hero p {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 800px;
}

/* Feature Showcase Split Layout */
.detail-showcase-section {
    padding: 24px 0 64px;
    position: relative;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Media Showcase (Left Column) */
.detail-media {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Floating Device Stack Style */
.device-stack {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1.15;
    height: auto;
    margin: 0 auto;
}

.device-stack .mobile-mockup-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 52%; /* Responsive width */
    aspect-ratio: 1 / 2.07; /* Maintain correct aspect ratio */
    height: auto;
    z-index: 10;
    filter: drop-shadow(var(--shadow-xl));
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-stack .tablet-mockup-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 72%; /* Responsive width */
    aspect-ratio: 1.48 / 1; /* Maintain correct aspect ratio */
    height: auto;
    z-index: 5;
    filter: drop-shadow(var(--shadow-lg));
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force child mockups to be 100% of their dynamic wrapper dimensions */
.device-stack .device-mockup {
    width: 100% !important;
    height: 100% !important;
}

.device-stack:hover .mobile-mockup-wrapper {
    transform: translateY(-10px) rotate(-2deg) scale(1.02);
}

.device-stack:hover .tablet-mockup-wrapper {
    transform: translateY(-5px) rotate(1deg) scale(1.01);
}

/* Simple Navbar Styling for Detail Pages */
.simple-navbar .nav-actions {
    display: flex !important; /* Ensure it is visible on all screen sizes, including mobile */
}

@media (max-width: 576px) {
    .simple-navbar .logo-text {
        display: none; /* Hide logo text on very narrow mobile screens to leave maximum room for the back button */
    }
    .simple-navbar .btn-secondary {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

/* Hero Stats responsiveness in detail media */
.detail-media .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.detail-media .stat {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--paper-lines);
    box-shadow: var(--shadow-sm);
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.detail-media .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--theme-color);
    line-height: 1.2;
    margin-bottom: 4px;
}

.detail-media .stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
    text-transform: uppercase;
}

/* Details Info (Right Column) */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-block h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    position: relative;
    padding-left: 14px;
}

.info-block h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: var(--theme-color);
    border-radius: var(--radius-full);
}

/* Feature Checklists */
.detail-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-checklist li {
    display: flex;
    align-items: start;
    gap: 14px;
}

.detail-checklist li .icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--theme-color-rgb), 0.1);
    color: var(--theme-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-checklist li .icon-wrapper .material-icons {
    font-size: 1.1rem;
}

.detail-checklist li .item-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.detail-checklist li .item-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Base vs Premium Pricing Box */
.tier-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tier-card {
    background: var(--white);
    border: 1px solid var(--paper-lines);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.tier-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--theme-color-rgb), 0.3);
}

.tier-card.premium {
    border: 2px solid var(--theme-color);
    position: relative;
    box-shadow: var(--shadow-md);
}

.tier-card.premium::before {
    content: 'सर्वाधिक लोकप्रिय';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--theme-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

.tier-header {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--paper-lines);
    padding-bottom: 12px;
}

.tier-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-card.premium .tier-name {
    color: var(--theme-color);
}

.tier-price {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

.tier-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.tier-features li .material-icons {
    font-size: 1.1rem;
}

.tier-features li .check {
    color: var(--theme-color);
}

.tier-features li .cross {
    color: var(--gray-light);
}

/* Call to Action Grid */
.detail-cta {
    background: var(--theme-color);
    border-radius: var(--radius-2xl);
    padding: 40px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 20px 50px rgba(var(--theme-color-rgb), 0.15);
    position: relative;
    overflow: hidden;
}

.detail-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.detail-cta h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-cta p {
    font-size: 1.05rem;
    margin-bottom: 24px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.detail-cta .btn-white {
    background: #ffffff;
    color: var(--theme-color-dark) !important;
    border: none;
    padding: 14px 36px;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-cta .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: #f8fafc;
}

/* Devanagari text heights normalization for headers & cards */
h1, h2, h3, h4, .btn-primary, .btn-secondary, .btn-back {
    line-height: 1.4; /* Prevents Devanagari clipping */
}

/* ==========================================
   RESPONSIVENESS FOR FEATURE DETAILS
   ========================================== */
@media (max-width: 992px) {
    .detail-hero-section {
        padding: 100px 0 20px;
    }

    .detail-showcase-section {
        padding: 16px 0 48px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .detail-media {
        position: relative;
        top: 0;
        gap: 24px;
    }

    .detail-hero h1 {
        font-size: 2.3rem;
        line-height: 1.35;
    }

    .detail-info {
        gap: 32px;
    }
}

@media (max-width: 576px) {
    .detail-hero-section {
        padding: 95px 0 16px;
    }

    .detail-showcase-section {
        padding: 12px 0 40px;
    }

    .detail-hero h1 {
        font-size: 1.9rem;
        line-height: 1.3;
    }

    .detail-grid {
        gap: 28px;
    }

    .detail-info {
        gap: 24px;
    }

    .device-stack {
        max-width: 320px;
    }

    .detail-media .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 12px;
        width: 100%;
    }

    .detail-media .stat {
        min-width: 0;
        padding: 10px 4px;
    }

    .detail-media .stat-number {
        font-size: 1.2rem;
    }

    .detail-media .stat-label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .tier-comparison {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .detail-cta {
        padding: 30px 20px;
    }

    .detail-cta h3 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   DARK MODE OVERRIDES
   ========================================== */
[data-theme="dark"] .detail-hero-section {
    background: #1c1c1f;
    border-color: var(--paper-lines);
}

[data-theme="dark"] .btn-back {
    background: #1c1c1f;
    border-color: #2d2d32;
    color: var(--gray);
}

[data-theme="dark"] .btn-back:hover {
    color: #ffffff;
    border-color: var(--theme-color);
}

[data-theme="dark"] .detail-media .stat {
    background: #1c1c1f;
    border-color: #2d2d32;
}

[data-theme="dark"] .tier-card {
    background: #1c1c1f;
    border-color: #2d2d32;
}

[data-theme="dark"] .tier-card:hover {
    border-color: var(--theme-color);
}

[data-theme="dark"] .tier-features li {
    color: var(--gray);
}
