/* ===================================
   ISP Professional Template Styles
   =================================== */

/* CSS Variables - Professional ISP Color Palette */
:root {
    /* Primary Colors */
    --primary-color: #4f46e5;        /* Indigo - professional, trustworthy */
    --primary-dark: #4338ca;         /* Darker indigo for hover states */
    --primary-light: #6366f1;        /* Lighter indigo for accents */
    --secondary-color: #10b981;      /* Emerald - trust/success */
    --secondary-dark: #059669;
    --accent-color: #f59e0b;         /* Amber - highlights */
    
    /* Neutral Colors */
    --dark: #0f172a;                 /* Slate dark */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    
    /* Semantic Colors */
    --background-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-subtle: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --gradient-hero: linear-gradient(135deg, rgba(79, 70, 229, 0.95) 0%, rgba(99, 102, 241, 0.9) 100%);
    
    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --section-padding: 5rem;
    --section-padding-sm: 3rem;
    --container-width: 1200px;
    --container-narrow: 800px;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===================================
   Base Styles
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Body styles moved to .main-wrapper - keep body minimal for Bootstrap compatibility */
body {
    /* Minimal styles - actual styling is on .main-wrapper */
    margin: 0;
    padding: 0;
}

/* ===================================
   Typography
   =================================== */

/* Typography styles applied to .main-wrapper to avoid conflicts */
.main-wrapper h1, 
.main-wrapper h2, 
.main-wrapper h3, 
.main-wrapper h4, 
.main-wrapper h5, 
.main-wrapper h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1rem;
}

/* Fallback for pages not using .main-wrapper */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

.main-wrapper {
    display:flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Paragraph and link styles applied to .main-wrapper */
.main-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.7;

}

.main-wrapper a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.main-wrapper a:hover {
    color: var(--primary-dark);
}
.main-wrapper a.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0px;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.main-wrapper a.btn-outline-primary:hover {
    color: #ffffff;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0px;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
/* Fallback for pages not using .main-wrapper */
p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ===================================
   Layout & Containers
   =================================== */

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

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

.section-padding {
    padding: var(--section-padding) 0;
}

.section-padding-sm {
    padding: var(--section-padding-sm) 0;
}

/* Template columns as flex containers for vertical alignment */
.template-column {
    display: flex;
    flex-direction: column;
}

/* ===================================
   Utility Bar (Top Bar)
   =================================== */

.utility-bar {
    background: var(--dark);
    color: var(--white);
    font-size: 0.875rem;
    padding: 0.5rem 0;
}

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

.utility-left,
.utility-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.utility-right .dropdown-menu {
    background: var(--dark);
    color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
}

.utility-bar a {
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition-fast);
}

.utility-bar a:hover {
    color: var(--secondary-color);
}

.network-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

.text-success {
    color: var(--success);
}

/* ===================================
   Header
   =================================== */

header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 2000;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* ===================================
   Main Content
   =================================== */

main,
#main {
    
    flex-grow: 1;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Button Sizes */
.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.0625rem;
}

/* Button Loading State */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===================================
   Cards
   =================================== */

.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0px;
    padding: .5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: none;
    ;
}

.card-header {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-body {
    color: var(--text-muted);
}

/* ===================================
   Badges
   =================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* ===================================
   Statistics / Large Numbers
   =================================== */

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    display: block;
}

/* ===================================
   Pre-Footer CTA
   =================================== */

.pre-footer-cta {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
    margin-top: 4rem;
}

.pre-footer-cta h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pre-footer-cta p {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Footer
   =================================== */

footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3,
.footer-column h4 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-column p {
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column a:hover {
    color: var(--primary-light);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-image {
    height: 32px;
    width: auto;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* ===================================
   Menu Navigation Component
   =================================== */

.menu-navigation {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-navigation > li {
    display: inline-block;
}

.menu-navigation .menu-item.has-children {
    position: relative;
}

.menu-navigation .menu-item.has-children > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.menu-navigation .menu-item.has-children:hover > ul {
    display: block;
}

.menu-navigation .menu-item.has-children > ul li {
    display: block;
    padding: 0.5rem 1rem;
}

.menu-navigation .menu-item.has-children > ul li a {
    display: block;
    white-space: nowrap;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem;
        --section-padding-sm: 2.5rem;
    }
    
    h1 {
        font-size: 2.75rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem;
        --section-padding-sm: 2rem;
    }
    
    /* Utility Bar */
    .utility-content {
        flex-direction: column;
        text-align: center;
    }
    
    .utility-left,
    .utility-right {
        justify-content: center;
        width: 100%;
    }
    
    /* Header */
    .header-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .main-nav li {
        width: 100%;
        border-top: 1px solid var(--border-color);
    }
    
    .main-nav a {
        display: block;
        padding: 1rem 0;
    }
    
    /* Typography */
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Menu Navigation */
    .menu-navigation > li {
        display: block;
    }
    
    .menu-navigation .menu-item.has-children > ul {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .container,
    .container-narrow {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ===================================
   Accessibility
   =================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial hidden state for fade-in elements */
.fade-in-ready {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Prevent fade-in animation on auth elements and member portal */
.central-public-auth,
.central-public-auth *,
[class*="auth"],
[class*="login"],
[class*="register"],
[class*="password"],
.page-content .card,
.page-content .service-card,
.page-content .testimonial,
.page-content .stats-grid,
.page-content .cta-banner {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* Specifically for member portal pages */
.member-portal,
.member-portal *,
.member-portal .card,
.member-portal .service-card,
.member-portal .testimonial,
.member-portal .stats-grid,
.member-portal .cta-banner {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .utility-bar,
    header,
    footer,
    .btn,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}
