/* Custom CSS for Cyber Lab Website */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

.hero-section h1 {
    color: white !important;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Category Cards */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-icon {
    color: #667eea;
}

/* Tool Cards */
.tool-card {
    transition: transform 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tool-card:hover {
    transform: translateY(-3px);
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Header Ad */
.header-ad {
    background: #f8f9fa;
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

/* About Section */
.about-section {
    background: #f8f9fa;
}

.about-image {
    opacity: 0.7;
}

/* CTF Walkthroughs Styles */
.ctf-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    border-radius: 15px;
    margin: 2rem 0;
}

.ctf-section h2 {
    color: #495057;
    font-weight: 700;
}

.ctf-image {
    opacity: 0.8;
}

.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-card .category-icon {
    color: #007bff;
}

/* Subcategory specific colors */
.border-primary {
    border-color: #007bff !important;
}

.border-success {
    border-color: #28a745 !important;
}

.border-warning {
    border-color: #ffc107 !important;
}

/* CTF Platform Cards */
.ctf-platform-card {
    transition: all 0.3s ease;
}

.ctf-platform-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Walkthrough Cards */
.walkthrough-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.walkthrough-card:hover {
    border-left-color: #0056b3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Platform-specific styling */
.platform-vulnhub {
    border-left-color: #007bff;
}

.platform-tryhackme {
    border-left-color: #28a745;
}

.platform-hackthebox {
    border-left-color: #ffc107;
}

/* Tips Section */
.tips-section {
    border-radius: 10px;
    margin-top: 2rem;
}

.tips-section ul {
    list-style: none;
    padding-left: 0;
}

.tips-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.tips-section li:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .ctf-section {
        padding: 2rem 0;
        margin: 1rem 0;
    }
    
    .ctf-section h2 {
        font-size: 1.5rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
} 

/* Hero section enhancements */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 3rem;
}

.hero-section h1 {
    color: white;
}

.hero-section .lead {
    color: rgba(255,255,255,0.9);
}

/* Button enhancements */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* Card enhancements */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: 1px solid #dee2e6;
}

/* Badge enhancements */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

/* Icon enhancements */
.fas, .fa {
    transition: transform 0.2s ease;
}

.card:hover .fas,
.card:hover .fa {
    transform: scale(1.1);
}

/* Article Cards */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.article-image {
    position: relative;
    width: 300px;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #e9ecef;
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative !important;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: #007bff;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta .date::before {
    content: "📅 ";
    margin-right: 0.25rem;
}

.article-meta .author::before {
    content: "👤 ";
    margin-right: 0.25rem;
}

.article-meta .reading-time::before {
    content: "⏱️ ";
    margin-right: 0.25rem;
}

.article-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.article-actions {
    text-align: right !important;
    position: absolute !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
}

.read-more-btn {
    background: #007bff;
    border: none;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.read-more-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Responsive adjustments for article cards */
@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
        height: 180px;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .article-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Sticky Footer Layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Search Highlight Styles */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
    font-weight: 600;
}

.search-page .result-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
}

.search-page .result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-page .result-title a {
    color: #007bff;
    text-decoration: none;
}

.search-page .result-title a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.search-page .result-excerpt {
    color: #6c757d;
    line-height: 1.5;
}

.search-page .result-meta {
    margin-bottom: 0.5rem;
}

.search-page .search-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-page .search-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.search-page .search-filters .form-check {
    margin: 0;
}

.search-page .search-filters .form-check-input {
    margin-right: 0.5rem;
}

.search-page .search-filters .form-check-label {
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.search-page .search-filters .form-check-label:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.search-page .search-filters .form-check-input:checked + .form-check-label {
    background-color: #007bff;
    color: white;
}

.search-page .results-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

/* Search Pagination Styles */
.search-page .pagination {
    justify-content: center;
    margin-top: 2rem;
}

.search-page .pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 0.25rem;
}

.search-page .pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0056b3;
}

.search-page .pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.search-page .pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Blog Page Styles */
.blog-page .blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.blog-page .blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.blog-page .card-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-page .card-title:hover {
    color: #007bff;
}

.blog-page .card-text {
    line-height: 1.6;
    color: #6c757d;
}

.blog-page .post-meta {
    font-size: 0.875rem;
}

.blog-page .post-tags .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.blog-page .blog-card .btn-outline-primary {
    border-width: 1px;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    min-width: 100px;
    max-width: 100%;
    margin: 0 0 0.5rem 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-page .btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

/* Responsive adjustments for blog cards */
@media (max-width: 768px) {
    .blog-page .blog-card .row {
        flex-direction: column;
    }
    
    .blog-page .blog-card .col-md-2 {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    .blog-page .blog-card .btn-outline-primary {
        width: 100%;
        max-width: 120px;
    }
}

/* Blog card layout improvements */
.blog-page .blog-card .col-md-2 {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-width: auto;
    flex-shrink: 0;
}

.blog-page .blog-card .col-md-10 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    flex: 1;
}

.blog-page .blog-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem 0.5rem !important;
}

.blog-page .blog-card .row {
    flex: 1;
    align-items: stretch;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force perfect symmetry */
.blog-page .blog-card {
    --content-padding: 0.5rem;
    --button-padding: 0.5rem;
}

.blog-page .blog-card .col-md-10 {
    padding: var(--content-padding) !important;
    box-sizing: border-box;
}

.blog-page .blog-card .col-md-2 {
    padding: var(--button-padding) !important;
    box-sizing: border-box;
}

/* View toggle buttons */
.blog-page .view-options .btn-group .btn {
    border-radius: 0.25rem;
    margin: 0 2px;
}

.blog-page .view-options .btn-group .btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.blog-page .view-options .btn-group .btn:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Article Content Optimization */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 100%;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #34495e;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 0.3rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #2980b9;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #7f8c8d;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 0.25rem;
}

.article-content code {
    background-color: #f8f9fa;
    color: #e74c3c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.article-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #34495e;
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.article-content table th,
.article-content table td {
    padding: 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.article-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.article-content table tr:hover {
    background-color: #e9ecef;
}

/* Responsive adjustments for article content */
@media (max-width: 1200px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 {
        font-size: 2rem;
    }
    
    .article-content h2 {
        font-size: 1.6rem;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .article-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .article-content h1 {
        font-size: 1.8rem;
    }
    
    .article-content h2 {
        font-size: 1.4rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .article-content table {
        font-size: 0.9rem;
    }
    
    .article-content table th,
    .article-content table td {
        padding: 0.75rem;
    }
}

/* Article page layout improvements */
.blog-post-page {
    background-color: #ffffff;
}

.article-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 1rem 1rem;
}

.article-title {
    color: #2c3e50 !important;
    line-height: 1.3;
}

.article-meta {
    color: #6c757d;
    font-size: 0.95rem;
}

.article-meta a {
    color: #007bff;
    text-decoration: none;
}

.article-meta a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.featured-image img {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 0.75rem;
}

.article-excerpt {
    border-left: 4px solid #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.article-tags .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    margin: 0.25rem;
    border-radius: 1rem;
}

/* Table of contents styling */
.table-of-contents {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.table-of-contents .card-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.table-of-contents ul li {
    margin-bottom: 0.5rem;
}

.table-of-contents ul li a {
    color: #6c757d;
    transition: color 0.3s ease;
}

.table-of-contents ul li a:hover {
    color: #007bff;
    text-decoration: none;
}