/* iAPSCC Custom Styles for IIS Deployment */

/* Consolidated navigation and footer styles */
.navbar-dark {
    background-color: #1c1c1c !important;
}

.footer-dark {
    background-color: #1c1c1c !important;
}

/* Remove Bootstrap focus effects and blue flashes */
.btn:focus,
.btn.focus,
.btn:active,
.btn.active,
.nav-link:focus,
.nav-link.focus,
.nav-link:active,
.nav-link.active,
.navbar-brand:focus,
.navbar-brand:active,
button:focus,
button:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Brand Colors - Matching React Version */
:root {
    --brand-primary: #08acdc;
    --brand-50: #e6f9ff;
    --brand-100: #d7f3fb;
    --brand-200: #bfefff;
    --brand-600: #08acdc;
    --brand-700: #079ac6;
    --brand-800: #086b80;
    --brand-900: #064b5a;
    --brand-dark: #1c1c1c;
    --brand-dark-hover: #2a2a2a;
    --brand-light: #f8f9fa;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Brand Color Utilities - Matching React Version */
.text-primary, .text-brand-600 {
    color: var(--brand-600) !important;
}

.text-brand-50 { color: var(--brand-50) !important; }
.text-brand-100 { color: var(--brand-100) !important; }
.text-brand-200 { color: var(--brand-200) !important; }
.text-brand-700 { color: var(--brand-700) !important; }
.text-brand-800 { color: var(--brand-800) !important; }
.text-brand-900 { color: var(--brand-900) !important; }

.bg-primary, .bg-brand-600 {
    background-color: var(--brand-600) !important;
}

.bg-brand-50 { background-color: var(--brand-50) !important; }
.bg-brand-100 { background-color: var(--brand-100) !important; }
.bg-brand-200 { background-color: var(--brand-200) !important; }
.bg-brand-700 { background-color: var(--brand-700) !important; }
.bg-brand-800 { background-color: var(--brand-800) !important; }
.bg-brand-900 { background-color: var(--brand-900) !important; }

/* Brand Background with Opacity */
.bg-brand-opacity-10 {
    background-color: rgba(8, 172, 220, 0.1) !important;
}

.bg-brand-opacity-20 {
    background-color: rgba(8, 172, 220, 0.2) !important;
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-primary:hover {
    background-color: var(--brand-700);
    border-color: var(--brand-700);
}

/* Secondary Brand Button */
.btn-brand-secondary {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: white;
}

.btn-brand-secondary:hover {
    background-color: var(--brand-dark-hover);
    border-color: var(--brand-dark-hover);
    color: white;
}

/* Navigation */
.navbar {
    background-color: #1c1c1c !important;
}
.navbar-brand {
    font-size: 0.9rem;
}

.navbar-nav .nav-item {
    margin-right: 0.25rem;
}

.navbar-nav .nav-item:last-child {
    margin-right: 0;
}

.navbar-nav .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem !important;
    transition: all 0.2s ease;
    color: white !important;
    border-radius: 0.375rem; /* Add rounded corners to all states */
    /* Remove focus outline and active states */
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.navbar-nav .nav-link:hover {
    background-color: var(--brand-dark-hover);
    border-radius: 0.375rem; /* Ensure rounded corners on hover */
}

.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:active,
.navbar-nav .nav-link.focus,
.navbar-nav .nav-link.active:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background-color: var(--brand-primary);
    border-radius: 0.375rem; /* Ensure rounded corners on focus/active */
}

.navbar-nav .nav-link.active {
    background-color: var(--brand-primary);
    color: white !important;
    border-radius: 0.375rem; /* Ensure rounded corners when active */
}

/* Authentication Buttons Container */
#auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px; /* Reserve space to prevent layout shift */
    min-height: 32px; /* Reserve height to prevent layout shift */
    /* Hide content initially to prevent flash, JavaScript will show appropriate content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
}

#auth-buttons.loaded {
    opacity: 1;
    visibility: visible;
}

#auth-buttons .btn {
    white-space: nowrap;
    /* Remove focus outline and active states */
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    box-shadow: none !important;
}

#auth-buttons .btn:focus,
#auth-buttons .btn:active,
#auth-buttons .btn.focus,
#auth-buttons .btn.active {
    outline: none !important;
    box-shadow: none !important;
}

#auth-buttons .dropdown-toggle {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white !important;
}

#auth-buttons .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white !important;
}

#auth-buttons .dropdown-toggle:focus,
#auth-buttons .dropdown-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white !important;
}

/* Ensure dropdown toggle text and icon stay white in all states */
#auth-buttons .dropdown-toggle,
#auth-buttons .dropdown-toggle:hover,
#auth-buttons .dropdown-toggle:focus,
#auth-buttons .dropdown-toggle:active,
#auth-buttons .dropdown-toggle.show {
    color: white !important;
}

#auth-buttons .dropdown-toggle i {
    color: white !important;
}

/* Dropdown Menu Styling */
#auth-buttons .dropdown-menu {
    background-color: var(--brand-dark);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
}

#auth-buttons .dropdown-item {
    color: white !important;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

#auth-buttons .dropdown-item:hover,
#auth-buttons .dropdown-item:focus {
    background-color: var(--brand-primary) !important;
    color: white !important;
}

#auth-buttons .dropdown-item i {
    color: white;
    width: 20px;
    text-align: center;
}

#auth-buttons .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0.5rem 0;
}

/* Hero Section */
.hero-section {
    background: #4a5568 !important; /* Professional dark grey */
    position: relative;
    overflow: hidden;
    margin-top: -1px;
}

/* Hero Overlay for World Map */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.8) 0%, rgba(74, 85, 104, 0.5) 50%, rgba(45, 55, 72, 0.7) 100%);
    pointer-events: none;
}

/* World Map Background */
.hero-world-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
    background-image: url('../images/world-map.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    filter: invert(1) opacity(0.8);
}

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Link Hover Effects */
.hover-text-primary {
    transition: color 0.2s ease;
}

.hover-text-primary:hover {
    color: var(--brand-primary) !important;
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Alert Styles */
.alert-primary {
    color: #1e40af;
    background-color: #dbeafe;
    border-color: #bfdbfe;
}

.alert-danger {
    color: #dc2626;
    background-color: #fef2f2;
    border-color: #fecaca;
}

.alert-success {
    color: #059669;
    background-color: #ecfdf5;
    border-color: #bbf7d0;
}

.alert-warning {
    color: #d97706;
    background-color: #fffbeb;
    border-color: #fed7aa;
}

/* Member Access Gate */
.member-gate {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
}

.blur-content {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--brand-primary);
}

.badge-success {
    background-color: #10b981;
}

.badge-warning {
    background-color: #f59e0b;
}

/* Responsive Utilities */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-section .lead {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 400px !important;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .navbar-brand .d-lg-block {
        display: none !important;
    }
}

/* Loading States */
.btn-loading {
    pointer-events: none;
    opacity: 0.65;
}

.btn-loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Job Board Styles */
.job-card {
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.job-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Profile Styles */
.profile-avatar {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
}

.profile-badge {
    font-family: 'Courier New', monospace;
    background-color: #f3f4f6;
    border: 1px dashed #9ca3af;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

/* 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: 0;
}

/* Focus States */
a:focus,
button:focus,
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}

/* Footer and Navigation Styles */
.navbar-iapscc {
    background-color: #1c1c1c !important;
}

.navbar-subtitle {
    max-width: 18rem;
    font-size: 0.95rem;
}

.footer-iapscc {
    background-color: #1c1c1c !important;
}

.footer-description {
    max-width: 300px;
}

/* Social Icon Styles */
.social-icon {
    font-size: 1.25rem;
}

/* Badge and Image Styles */
.badge-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-right: 20px;
}

.profile-circle {
    width: 200px;
    height: 200px;
}

.member-badge-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Feature Icon Containers */
.feature-icon {
    width: 60px;
    height: 60px;
}

/* Form and Content Styles */
.textarea-medium {
    height: 100px;
}

.min-height-60 {
    min-height: 60vh;
}

/* Check Icon Styles */
.check-icon {
    font-size: 1.1em;
}

/* Standard Card Gradients */
.card-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.card-gradient-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

/* Notification Styles */
.notification-fixed {
    top: 100px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

/* Stats Icon Styles */
.stats-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
}

/* Utility Classes */
.text-brand {
    color: var(--brand-primary) !important;
}

.bg-brand {
    background-color: var(--brand-primary) !important;
}

.border-brand {
    border-color: var(--brand-primary) !important;
}

.shadow-brand {
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Footer Link Styling - More Specific Selectors */
footer a.text-muted,
footer a.text-muted.text-decoration-none {
    color: white !important;
    transition: color 0.2s ease !important;
}

footer a.text-muted:hover,
footer a.text-muted.text-decoration-none:hover,
footer a.hover-text-primary:hover {
    color: #08acdc !important;
}

/* Social media links with specific targeting */
footer .text-muted.hover-text-primary {
    color: white !important;
    transition: color 0.2s ease !important;
}

footer .text-muted.hover-text-primary:hover {
    color: #08acdc !important;
}

/* Footer text elements (non-links) */
footer p.text-muted {
    color: #e9ecef !important;
}

/* Copyright text specifically */
footer .text-center p.text-muted {
    color: #e9ecef !important;
}

/* Promotional Banner Visibility */
.promote-to-unpaid {
    display: block;
}

/* Hide promotional banners for paid members */
.hide-for-paid-members .promote-to-unpaid {
    display: none !important;
}

/* About page specific styles */
.standard-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: white;
    overflow: hidden;
}

.standard-card .card-body {
    padding: 2rem;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.large-icon-circle {
    width: 88px;
    height: 88px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.section-intro {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

.feature-grid .card {
    height: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.process-steps {
    position: relative;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #e5e7eb);
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
    background: white;
}

@media (max-width: 768px) {
    .process-steps::before {
        display: none;
    }
    
    .section-intro {
        padding: 2rem 1.5rem;
    }
    
    .standard-card .card-body {
        padding: 1.5rem;
    }
}
