/* Telco Security Documentation - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --body-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.375rem;
    --transition: all 0.15s ease-in-out;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--body-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.stat-item {
    padding: 1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Section */
.search-container {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.search-filters .form-select {
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.search-filters .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Category Cards */
.category-card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card .card-body {
    padding: 2rem 1.5rem;
}

.category-icon {
    color: var(--primary-color);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-stats .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Search Results */
#searchResults {
    background: var(--light-color);
}

.result-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.result-title {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.result-title:hover {
    text-decoration: underline;
}

.result-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.result-excerpt {
    color: var(--text-color);
    line-height: 1.6;
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer h5 {
    color: #ffffff;
    margin-bottom: 1rem;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 1.5rem;
    }
    
    .category-card .card-body {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .hero-stats .col-6 {
        margin-bottom: 1rem;
    }
    
    .search-filters .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

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

/* Document Preview */
.document-preview {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.document-preview h6 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.document-preview p {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.document-preview .tags {
    margin-top: 0.5rem;
}

.document-preview .tag {
    display: inline-block;
    background: var(--light-color);
    color: var(--secondary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Search Highlighting */
.highlight {
    background: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

/* 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 */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .search-section,
    footer {
        display: none !important;
    }
    
    .category-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
