/*
 * NewsMax Pro - Main CSS
 * Responsive and Mobile-First Design
 */

/* ==========================================================================
   HEADER STYLES
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-branding .wp-site-blocks h1,
.site-branding .wp-site-blocks p {
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .wp-block-search {
    margin: 0;
}

.header-actions .wp-block-search .wp-block-search__input {
    min-width: 200px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.header-actions .wp-block-search .wp-block-search__input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Navigation Styles */
.wp-block-navigation ul {
    gap: 2rem;
}

.wp-block-navigation .wp-block-navigation-item a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
    color: #3182ce;
}

.wp-block-navigation .wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3182ce;
    transition: width 0.3s ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover::after {
    width: 100%;
}

/* ==========================================================================
   BREAKING NEWS STYLES
   ========================================================================== */

.breaking-news-section {
    overflow: hidden;
    position: relative;
}

.breaking-label {
    flex-shrink: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   HERO SECTION STYLES
   ========================================================================== */

.hero-section {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.story-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.story-item:hover {
    transform: translateX(5px);
    background-color: #edf2f7 !important;
}

/* ==========================================================================
   CONTENT SECTION STYLES
   ========================================================================== */

.content-section {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3182ce, #63b3ed);
    border-radius: 2px;
}

/* Article Cards */
.article-card,
.archive-article-card,
.related-article-card,
.popular-article-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.article-card:hover,
.archive-article-card:hover,
.related-article-card:hover,
.popular-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.article-card .wp-block-post-featured-image img,
.archive-article-card .wp-block-post-featured-image img,
.related-article-card .wp-block-post-featured-image img,
.popular-article-card .wp-block-post-featured-image img {
    transition: transform 0.3s ease;
}

.article-card:hover .wp-block-post-featured-image img,
.archive-article-card:hover .wp-block-post-featured-image img,
.related-article-card:hover .wp-block-post-featured-image img,
.popular-article-card:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */

.sidebar-widgets .widget {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-widgets .widget:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.widget-title {
    position: relative;
    display: inline-block;
}

.widget-title::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #3182ce, #63b3ed);
    border-radius: 1px;
}

.popular-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.popular-item:hover {
    background-color: #f7fafc;
    transform: translateX(5px);
}

.popular-item:last-child {
    border-bottom: none !important;
}

/* Categories List */
.categories-list li {
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.categories-list li:hover {
    transform: translateX(5px);
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    color: #3182ce;
    border-bottom-color: #3182ce;
}

/* Newsletter Form */
.newsletter-form,
.newsletter-form-sidebar {
    transition: all 0.3s ease;
}

.newsletter-form input,
.newsletter-form-sidebar input {
    transition: all 0.3s ease;
}

.newsletter-form input:focus,
.newsletter-form-sidebar input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.newsletter-form button,
.newsletter-form-sidebar button {
    transition: all 0.3s ease;
}

.newsletter-form button:hover,
.newsletter-form-sidebar button:hover {
    background-color: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   SINGLE POST STYLES
   ========================================================================== */

.article-header {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-sharing {
    border-top: 1px solid #e2e8f0;
}

.social-sharing .wp-block-social-links {
    gap: 0.5rem;
}

.social-sharing .wp-block-social-link a {
    transition: all 0.3s ease;
}

.social-sharing .wp-block-social-link a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.article-content {
    line-height: 1.8;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content blockquote {
    border-left: 4px solid #3182ce;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
    background-color: #f7fafc;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-content img {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Author Bio */
.author-bio {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.author-bio:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Related Articles */
.related-articles {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Comments */
.comments-section {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wp-block-comment-template .wp-block-avatar img {
    border-radius: 50%;
}

.wp-block-comment-content {
    background-color: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* ==========================================================================
   ARCHIVE STYLES
   ========================================================================== */

.archive-header {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.breadcrumbs a {
    color: #3182ce;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #2c5aa0;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #64748b;
}

.breadcrumbs .current-page {
    color: #64748b;
}

/* ==========================================================================
   404 ERROR STYLES
   ========================================================================== */

.error-404 {
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popular-articles-404,
.categories-404 {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

.site-footer {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
}

.site-footer .wp-block-social-links .wp-block-social-link a {
    transition: all 0.3s ease;
}

.site-footer .wp-block-social-links .wp-block-social-link a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.site-footer .wp-block-navigation .wp-block-navigation-item a {
    transition: all 0.3s ease;
}

.site-footer .wp-block-navigation .wp-block-navigation-item a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

/* ==========================================================================
   PAGINATION STYLES
   ========================================================================== */

.wp-block-query-pagination {
    margin-top: 2rem;
}

.wp-block-query-pagination .wp-block-query-pagination-numbers,
.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
    transition: all 0.3s ease;
}

.wp-block-query-pagination a:hover {
    background-color: #3182ce;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.wp-block-search .wp-block-search__input {
    transition: all 0.3s ease;
}

.wp-block-search .wp-block-search__button {
    transition: all 0.3s ease;
}

.wp-block-search .wp-block-search__button:hover {
    background-color: #2c5aa0;
    transform: translateY(-1px);
}

/* Comment Form */
.wp-block-post-comments-form input,
.wp-block-post-comments-form textarea {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
}

.wp-block-post-comments-form input:focus,
.wp-block-post-comments-form textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.wp-block-post-comments-form .wp-block-button .wp-block-button__link {
    transition: all 0.3s ease;
}

.wp-block-post-comments-form .wp-block-button .wp-block-button__link:hover {
    background-color: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   ANIMATION CLASSES
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ========================================================================== */

/* Mobile Styles (Default) */
@media (max-width: 767px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-branding {
        order: 1;
    }
    
    .wp-block-navigation {
        order: 3;
        width: 100%;
    }
    
    .header-actions {
        order: 2;
        justify-content: center;
    }
    
    .header-actions .wp-block-search .wp-block-search__input {
        min-width: 250px;
    }
    
    /* Hero Section Mobile */
    .hero-section .wp-block-columns {
        flex-direction: column;
    }
    
    .hero-section .wp-block-column {
        flex-basis: 100% !important;
    }
    
    .story-item {
        flex-direction: column;
        text-align: center;
    }
    
    .story-item .wp-block-post-featured-image {
        width: 100% !important;
        height: 120px !important;
        margin-bottom: 0.5rem;
    }
    
    /* Content Grid Mobile */
    .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Main Content Mobile */
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
    }
    
    /* Single Post Mobile */
    .article-header,
    .article-content,
    .social-sharing {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    .social-sharing {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .social-sharing .wp-block-social-links {
        justify-content: center;
        width: 100%;
    }
    
    /* Author Bio Mobile */
    .author-bio .wp-block-group {
        flex-direction: column;
        text-align: center;
    }
    
    /* Related Articles Mobile */
    .related-articles .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Footer Mobile */
    .site-footer .wp-block-columns {
        flex-direction: column;
    }
    
    .site-footer .wp-block-column {
        flex-basis: 100% !important;
        margin-bottom: 2rem;
    }
    
    .site-footer .wp-block-group {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Navigation Mobile */
    .wp-block-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .wp-block-navigation .wp-block-navigation-item {
        width: 100%;
        text-align: center;
    }
    
    /* Search Mobile */
    .wp-block-search {
        width: 100%;
    }
    
    .wp-block-search .wp-block-search__input {
        width: 100%;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .wp-block-navigation {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .wp-block-navigation ul {
        justify-content: center;
        gap: 1.5rem;
    }
    
    /* Content Grid Tablet */
    .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Related Articles Tablet */
    .related-articles .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Footer Tablet */
    .site-footer .wp-block-columns {
        flex-wrap: wrap;
    }
    
    .site-footer .wp-block-column {
        flex-basis: 48% !important;
        margin-bottom: 2rem;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    /* Header hover effects */
    .header-content:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Enhanced animations for desktop */
    .article-card:hover,
    .archive-article-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .widget:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    /* Parallax effect for hero section */
    .hero-section {
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    /* Enhanced spacing for large screens */
    .content-section {
        padding: 2.5rem !important;
    }
    
    .sidebar-widgets .widget {
        padding: 1.5rem !important;
    }
    
    /* Better typography scaling */
    .wp-block-post-title {
        font-size: 1.25rem;
    }
    
    .hero-section .wp-block-post-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .breaking-news-section,
    .sidebar-widgets,
    .site-footer,
    .social-sharing,
    .related-articles,
    .comments-section {
        display: none !important;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3 {
        page-break-after: avoid;
    }
    
    .article-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .article-card,
    .widget,
    .content-section {
        border: 2px solid #000;
    }
    
    .section-title::before,
    .widget-title::before {
        background: #000;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --wp--preset--color--background: #1a202c;
        --wp--preset--color--text: #e2e8f0;
        --wp--preset--color--primary: #63b3ed;
    }
    
    .content-section,
    .widget,
    .article-header,
    .article-content {
        background-color: #2d3748 !important;
        color: #e2e8f0 !important;
    }
}

