/* 
  Kathrotiya Parivar Global Custom CSS 
  Focus: Space Management, Mobile Responsiveness, UI/UX Elevation
*/

:root {
    /* Responsive Spacing Variables */
    --section-py-lg: 5rem;
    --section-py-md: 3.5rem;
    --section-py-sm: 2.5rem;
    
    --card-pad-lg: 2rem;
    --card-pad-md: 1.5rem;
    --card-pad-sm: 1.25rem;

    /* Theme Colors */
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-secondary: #f97316;
    --brand-accent: #ec4899;
    --brand-dark: #0f172a;
    --brand-dark-soft: #1e293b;
    --brand-light: #f8fafc;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb, #3b82f6);
    --gradient-warm: linear-gradient(135deg, #f97316, #ec4899);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-glass: rgba(255, 255, 255, 0.85);
}

/* Global Adjustments */
body {
    background-color: var(--brand-light);
    color: #334155;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Fluid Typography */
h1, .h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; }
h2, .h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.25; }
h3, .h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
h4, .h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
p.lead { font-size: clamp(1rem, 2vw, 1.25rem); }

/* Responsive Section Paddings */
.section-py { padding-top: var(--section-py-sm); padding-bottom: var(--section-py-sm); }
.section-pt { padding-top: var(--section-py-sm); }
.section-pb { padding-bottom: var(--section-py-sm); }

@media (min-width: 768px) {
    .section-py { padding-top: var(--section-py-md); padding-bottom: var(--section-py-md); }
    .section-pt { padding-top: var(--section-py-md); }
    .section-pb { padding-bottom: var(--section-py-md); }
}

@media (min-width: 992px) {
    .section-py { padding-top: var(--section-py-lg); padding-bottom: var(--section-py-lg); }
    .section-pt { padding-top: var(--section-py-lg); }
    .section-pb { padding-bottom: var(--section-py-lg); }
}

/* Max-width helpers */
.max-w-sm { max-width: 400px; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 600px; margin-left: auto; margin-right: auto; }
.max-w-lg { max-width: 800px; margin-left: auto; margin-right: auto; }
.max-w-xl { max-width: 1000px; margin-left: auto; margin-right: auto; }

/* Custom Buttons */
.btn-brand {
    background-color: var(--brand-primary);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}
.btn-brand:hover {
    background-color: var(--brand-primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Glassmorphism Navbar */
.navbar-glass {
    background: var(--gradient-glass);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}
.navbar-brand { font-weight: 800; color: var(--brand-dark-soft) !important; letter-spacing: -0.5px; }
.nav-link { font-weight: 500; color: #64748b !important; padding: 0.5rem 1rem !important; transition: all 0.3s ease; border-radius: 6px; }
.nav-link:hover { color: var(--brand-primary) !important; background-color: rgba(37, 99, 235, 0.05); }
.nav-link.active { color: var(--brand-primary) !important; font-weight: 600; background-color: rgba(37, 99, 235, 0.1); }

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
        margin-top: 0.5rem;
        position: absolute;
        top: 100%;
        width: calc(100% - 1.5rem);
        left: 0.75rem;
        z-index: 1000;
    }
    .navbar-nav { gap: 0.25rem; }
}

/* Premium Cards */
.card-premium {
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: white;
}
.card-premium:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}
.card-pad { padding: var(--card-pad-sm); }
@media (min-width: 768px) { .card-pad { padding: var(--card-pad-md); } }
@media (min-width: 992px) { .card-pad { padding: var(--card-pad-lg); } }

/* Universal Page Banner */
.page-banner {
    background: var(--gradient-dark);
    color: white;
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 5rem);
    position: relative;
}
.page-banner-title { font-weight: 800; margin-bottom: 0.5rem; }
.page-banner-subtitle { opacity: 0.8; max-width: 700px; margin: 0 auto; font-size: clamp(1rem, 2vw, 1.25rem); }
.page-banner-shape {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: var(--brand-light);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Section Titles */
.section-title {
    font-weight: 800;
    color: var(--brand-dark-soft);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* Footer Improvements */
.footer {
    background-color: var(--brand-dark);
    color: #94a3b8;
    padding: clamp(3rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
    margin-top: clamp(2.5rem, 5vw, 4rem);
}
.footer h5 { color: white; font-weight: 600; margin-bottom: 1.25rem; }
.footer a { color: #cbd5e1; text-decoration: none; transition: all 0.2s ease; }
.footer a:hover { color: white; padding-left: 4px; }
.footer-social .btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.footer-social .btn:hover { background-color: var(--brand-primary); border-color: var(--brand-primary); transform: translateY(-3px); }

/* Custom Badge */
.badge-soft { padding: 0.5em 0.85em; font-weight: 600; }
.badge-soft-primary { background-color: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.badge-soft-success { background-color: rgba(16, 185, 129, 0.1); color: #047857; }
.badge-soft-warning { background-color: rgba(245, 158, 11, 0.1); color: #b45309; }

/* Dashboard Sidebar Mobile Enhancements */
@media (max-width: 767.98px) {
    .dashboard-sidebar {
        display: flex;
        overflow-x: auto;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .dashboard-sidebar::-webkit-scrollbar { display: none; }
    .dashboard-sidebar .list-group-item {
        flex: 0 0 auto;
        margin-right: 0.5rem;
        margin-bottom: 0 !important;
        border-radius: 50px !important;
        padding: 0.5rem 1rem;
        text-align: center;
        border: 1px solid #e2e8f0 !important;
    }
    .dashboard-sidebar .list-group-item.active { border-color: transparent !important; }
}

/* Lightbox overlay for images */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}
.lightbox-content { max-width: 90%; max-height: 90vh; object-fit: contain; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 2rem; cursor: pointer; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
