/* SAS Employee Hub - Styles */

:root {
    --primary-navy: #0a1a2f;
    --dark-navy: #061221;
    --accent-blue: #1e3a8a;
    --hover-blue: #2563eb;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--dark-navy) 100%);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.landing-header {
    display: flex;
    align-items: center;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
}

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

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0a1a2f 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--white);
    box-shadow: var(--shadow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-sas {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--medium-gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    margin: 2rem auto;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #a0d2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 800px;
    color: var(--light-gray);
}

.employee-login-btn {
    background: var(--accent-blue);
    color: var(--white);
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    display: block;
}

.employee-login-btn:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.category-card {
    background: var(--primary-navy);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.category-card:hover {
    background: #2c5282;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-card h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* Main Hub Styles */
.main-hub {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--dark-navy) 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0a1a2f 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--white);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 1rem;
}

.tab-btn {
    background: transparent;
    color: var(--medium-gray);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: rgba(52, 152, 219, 0.2);
    color: var(--white);
    border-bottom: 3px solid #3498db;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--white);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Search Container */
.search-container {
    margin-bottom: 2rem;
    width: 100%;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.1);
}

.search-box input::placeholder {
    color: var(--dark-gray);
}

/* Tab Content */
.tab-content {
    width: 100%;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Document Grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.document-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    /* Reset default button styles */
    border: none;
    outline: none;
    text-align: left;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background-color: inherit;
}

.document-card:hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.document-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.document-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.document-description {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--dark-gray);
}

.document-date, .document-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Document Viewer Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--light-gray);
    color: #333;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--primary-navy);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body h2 {
    margin-top: 0;
    color: var(--primary-navy);
}

.modal-body h3 {
    color: var(--dark-navy);
    margin-top: 1.5rem;
}

.modal-body ul, .modal-body ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
    font-size: 2rem;
    color: #3498db;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

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

.footer-links a {
    color: #3498db;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .document-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .landing-header {
        padding: 1.5rem 2rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .employee-login-btn {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    .category-card {
        padding: 3rem 2rem;
        min-height: 150px;
    }

    .category-card h2 {
        font-size: 1.75rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .nav-tabs {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .tab-btn i {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .document-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .landing-header {
        padding: 1rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .employee-login-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .category-cards {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .category-card {
        padding: 2.5rem 1.5rem;
        min-height: 120px;
    }

    .category-card h2 {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon-small {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }

    .tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

    .tab-btn i {
        font-size: 0.8rem;
    }

    .search-box input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }

    .document-card {
        padding: 1.25rem;
    }

    .document-title {
        font-size: 1.1rem;
    }

    .document-description {
        font-size: 0.8rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Touch device specific styles */
@media (hover: none) and (pointer: coarse) {
    .category-card, .document-card, .tab-btn, .employee-login-btn {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .category-card:active, .document-card:active, .tab-btn:active {
        transform: translateY(-2px);
        background: rgba(52, 152, 219, 0.15);
    }
}
/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-tabs {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #0a1929;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
        z-index: 1000;
    }
    
    .nav-tabs.mobile-open {
        display: flex !important;
    }
    
    .nav-tabs .tab-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem;
        text-align: left;
    }
}

/* ============================================
   LOADING INDICATORS
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header, .nav-tabs, .mobile-menu-toggle, 
    .back-button, button, .tab-btn {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .content {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    .travel-card {
        border: 2px solid black;
        page-break-inside: avoid;
    }
}

/* ============================================
   STANDARDIZED BUTTON STYLES
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: #0366d6;
    color: white;
}

.btn-primary:hover {
    background: #0256c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(3, 102, 214, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.btn-outline:hover {
    background: currentColor;
    color: white;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0366d6;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid #0366d6;
    outline-offset: 2px;
}

/* Screen reader only text */
.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;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tab-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   GLOBAL SEARCH
   ============================================ */
.header-search {
    position: relative;
    margin: 0 1rem;
    flex: 0 0 300px;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.6);
}

.header-search input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
}

.header-search i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.6);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0.5rem;
    z-index: 1000;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    color: #0a1929;
    margin-bottom: 0.25rem;
}

.search-result-category {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

@media (max-width: 768px) {
    .header-search {
        flex: 1;
        margin: 0 0.5rem;
    }
}
