/* Responsive Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 992px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 768px;
    }
    
    .categories-grid, .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sites-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-detail-main, .archive-main {
        grid-template-columns: 1fr;
    }
    
    .site-detail-sidebar, .archive-sidebar {
        margin-top: 30px;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
  #primary-menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-form-container {
        display: none;
    }
    
    .user-actions {
        display: none;
    }
        .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-content h2 {
        font-size: 30px;
    }
    
    .cta-content p {
        font-size: 16px;
    }

}

@media (max-width: 768px) {
    .container {
        max-width: 576px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--dark-blue);
        flex-direction: column;
        padding: 20px;
        transition: all 0.3s ease;
        z-index: 99;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    .site-detail-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-detail-logo {
        margin-bottom: 20px;
    }
    
    .reviews-summary {
        flex-direction: column;
    }
    
    .reviews-average {
        margin-bottom: 20px;
    }
    
    .post-author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-bottom: 20px;
    }
    
    .author-links {
        justify-content: center;
    }
        .site-title {
        font-size: 20px;
    }
        .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cta-content .btn-outline-light {
        margin-left: 0;
        margin-top: 15px;
    }
    
    .cta-content h2 {
        font-size: 26px;
    }
    
    .footer-bottom {
        padding-top: 15px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .sites-grid, .blog-grid, .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .site-detail-actions, .post-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }
    
    .archive-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .comment-header {
        flex-direction: column;
    }
    
    .comment-rating {
        margin-top: 10px;
    }
    
    .comment-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-actions {
        margin-top: 10px;
    }
    
    .site-detail-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-categories {
        margin-bottom: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-icon {
        margin-bottom: 10px;
    }
    
    .search-form-inner {
        flex-direction: column;
    }
    
    .search-submit {
        width: 100%;
        margin-top: 10px;
    }
    
    .post-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-buttons {
        margin-top: 10px;
    }
    
    .similar-site-item {
        flex-direction: column;
        text-align: center;
    }
    
    .similar-site-logo {
        margin-bottom: 10px;
    }
}

/* Dark Mode Styles */
.dark-mode {
    --background-color: #121212;
    --card-background: #1e1e1e;
    --dark-blue: #1a1a2e;
    --text-color: #f5f5f5;
    --border-color: #333333;
}

/* Print Styles */
@media print {
    .site-header, .site-footer, .site-detail-actions, .site-detail-sidebar, .comment-form {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }
    
    .site-detail-main {
        grid-template-columns: 1fr;
    }
    
    .site-detail-header {
        background: none;
        padding: 20px 0;
    }
    
    .site-detail-title {
        color: black;
    }
    
    .site-detail-content {
        padding: 20px 0;
    }
    
    .site-detail-description h2, .site-detail-features h2, .site-detail-reviews h2 {
        color: black;
    }
    
    .feature-item, .comment-item {
        border: 1px solid #ddd;
        background-color: white;
    }
    
    .feature-content h4, .comment-author h4 {
        color: black;
    }
    
    .feature-content p, .comment-content p {
        color: #333;
    }
    
    .star-rating .fas, .star-rating .far.fa-star-half-alt {
        color: #ffc107;
    }
    
    a {
        color: #0066ff;
        text-decoration: none;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 80%;
    }
    
    a[href^="#"]:after, a[href^="javascript:"]:after {
        content: "";
    }
}

/* Accessibility Styles */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--primary-color);
    clip: auto !important;
    clip-path: none;
    color: white;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus Styles for Accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    background-color: var(--primary-color);
    color: white;
    font-weight: 700;
    left: 50%;
    padding: 10px;
    position: absolute;
    transform: translateY(-100%);
    transition: transform 0.3s;
    z-index: 100;
}

.skip-link:focus {
    transform: translateY(0%);
}

/* Animation Styles */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-in-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}