/* ============================================
   APAROKSHA SYSTEMS - Legal Hub Stylesheet
   Version: 2.0
   Updated: Jan 2026
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-gradient-1: #0f172a;
    --bg-gradient-2: #1e1b4b; 
    --bg-gradient-3: #312e81; 
    
    --accent-primary: #6366f1;
    --accent-secondary: #06b6d4;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --accent-success: #10b981;
    --accent-error: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-link: #38bdf8;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;
    
    /* Shadows */
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 20px var(--accent-glow);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing */
    --header-height: 70px;
    --container-max: 1200px;
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 30px);
}

body {
    font-family: var(--font-body);
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body { 
        animation: none; 
        background-size: 100% 100%;
        background: var(--bg-dark);
    }
    .policy-card,
    .biz-card,
    .nav-links a,
    .submit-btn {
        transition: none !important;
    }
}

/* Grid Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

/* --- ACCESSIBILITY --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* --- CONTAINER --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- UTILITIES --- */
.gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-shadow);
    flex-shrink: 0;
}

.header-badges {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.msme-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* --- MAIN LAYOUT --- */
.main-wrapper {
    padding-top: calc(var(--header-height) + 30px);
    padding-bottom: 4rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
}

/* --- SIDEBAR --- */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.nav-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-left: 1rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-links a {
    display: block;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.nav-links a:active {
    transform: scale(0.98);
}

.nav-links a.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    color: var(--accent-secondary);
    border-left-color: var(--accent-secondary);
}

/* --- POLICY CARDS --- */
.policy-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.policy-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: border-color 0.3s ease, transform 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.policy-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.policy-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* Overview Card Special Style */
.overview-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
}

/* Contact Card Special Style */
.contact-card {
    border-color: rgba(99, 102, 241, 0.2);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.udyam-badge {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.card-meta {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- BUSINESS OVERVIEW GRID --- */
.overview-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.biz-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.biz-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
}

.biz-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.biz-code {
    display: inline-block;
    font-size: 0.7rem;
    background: #334155;
    color: #cbd5e1;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.biz-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.biz-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- POLICY CONTENT TYPOGRAPHY --- */
.policy-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: white;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content h3::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--accent-primary);
    margin-right: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.policy-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.policy-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.policy-content li {
    margin-bottom: 0.5rem;
}

.policy-content strong {
    color: white;
    font-weight: 600;
}

.policy-content a,
.email-link {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

.policy-content a:hover,
.email-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-box {
    background: rgba(15, 23, 42, 0.5);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.info-box.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.7rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.info-value {
    font-weight: 500;
    color: white;
    font-size: 0.95rem;
}

.info-value a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-value a:hover {
    color: var(--accent-secondary);
}

.working-hours {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.working-hours svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* --- CONTACT FORM --- */
.contact-form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.contact-form-section h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.required {
    color: var(--accent-error);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group select option {
    background: var(--bg-dark);
    color: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Form Status Messages */
.form-status {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.9);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-brand .gradient-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.footer-udyam {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-family: monospace;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-top: calc(var(--header-height) + 60px);
    }
    
    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        z-index: 999;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 0.6rem 1rem;
        background: rgba(15, 23, 42, 0.95);
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .sidebar::-webkit-scrollbar {
        display: none;
    }
    
    /* Fade edges to indicate scroll */
    .sidebar::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.95));
        pointer-events: none;
    }
    
    .nav-title {
        display: none;
    }
    
    .nav-links {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
        padding-right: 40px;
    }
    
    .nav-links a {
        font-size: 0.8rem;
        padding: 0.5rem 0.9rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        flex-shrink: 0;
        border-left: none;
    }
    
    .nav-links a.active {
        background: rgba(99, 102, 241, 0.2);
        border-left: none;
    }
    
    .nav-links a:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .policy-card {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    .footer-links {
        gap: 0.8rem 1rem;
        font-size: 0.85rem;
    }
    
    .brand {
        font-size: 1.25rem;
    }
    
    .msme-badge span:not(svg) {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .policy-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .biz-card {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .policy-content h3 {
        font-size: 1rem;
    }
}

/* --- PRINT STYLES --- */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header, .sidebar, footer, .contact-form-section {
        display: none;
    }
    
    .main-wrapper {
        display: block;
        padding: 0;
    }
    
    .policy-card {
        background: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
        opacity: 1;
        transform: none;
    }
    
    .gradient-text {
        -webkit-text-fill-color: black;
        background: none;
    }
}
