/* Hide block on mobile devices */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* Alternative: Hide on tablets and mobile */
@media (max-width: 1024px) {
    .hide-on-tablet-mobile {
        display: none !important;
    }
}

/* Alternative: Hide only on very small screens */
@media (max-width: 480px) {
    .hide-on-small-mobile {
        display: none !important;
    }
}

/* Fix main cover block full width */
.wp-block-group.main-news-cover {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure cover stretches full width */
.wp-block-group.main-news-cover .wp-block-cover {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

@media (max-width: 480px) {
    .main-news-cover .wp-block-cover {
        min-height: 60vh !important;
    }
    
    .wp-block-cover__inner-container {
        padding: 15px !important;
    }
    
    /* Stack elements vertically with proper spacing */
    .wp-block-cover .wp-block-group > * {
        margin-bottom: 8px !important;
    }
    
    /* Ensure readability */
    .wp-block-cover {
        background-size: cover !important;
        background-position: center !important;
    }
}

/* Mobile fixes */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    .wp-block-cover,
    .wp-block-group {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Fix text cramping in cover block */
.wp-block-cover__inner-container {
    padding: 20px !important;
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;  /* Changed from flex-start */
}
    
    /* Fix vertical text issue - force horizontal layout */
    .wp-block-cover .wp-block-group,
    .wp-block-cover .wp-block-post-title,
    .wp-block-cover .wp-block-post-excerpt,
    .wp-block-cover .wp-block-post-terms,
    .wp-block-cover h1,
    .wp-block-cover h2,
    .wp-block-cover h3,
    .wp-block-cover p {
        width: 100% !important;
        min-width: 280px !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        display: block !important;
        flex-direction: row !important;
    }
    
    /* Improve text readability */
    .wp-block-cover h1,
    .wp-block-cover h2,
    .wp-block-cover h3 {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }
    
    .wp-block-cover p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 10px !important;
    }
    
    /* Category styling */
    .wp-block-post-terms {
        font-size: 0.9rem !important;
        margin-bottom: 10px !important;
    }
    
    /* Remove any fixed widths causing scroll */
    body {
        overflow-x: hidden !important;
    }
}

@media (max-width: 768px) {
    .wp-block-cover__inner-container {
        padding: 20px !important;
        width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;  /* Back to flex-start */
    }
}

/* Fix category alignment with specific targeting */
@media (max-width: 768px) {
    /* Target the category block and its components */
    .main-news-cover .wp-block-post-terms {
        text-align: left !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* Target the prefix span */
    .main-news-cover .wp-block-post-terms__prefix {
        display: none !important; /* Hide empty prefix */
    }
    
    /* Target the category link */
    .main-news-cover .wp-block-post-terms a {
        text-align: left !important;
        display: inline-block !important;
        margin: 0 !important;
    }
    
    /* Target date specifically */
    .main-news-cover .wp-block-post-date {
        text-align: left !important;
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
    }
    
    .main-news-cover .wp-block-post-date time {
        text-align: left !important;
        display: block !important;
    }
}

/* Additional fix for vertical text */
@media (max-width: 768px) {
    .wp-block-cover .wp-block-group > * {
        writing-mode: initial !important;
        text-orientation: initial !important;
        width: auto !important;
        min-width: 250px !important;
    }
    
    /* Force container to give enough space */
    .main-news-cover {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .main-news-cover .wp-block-cover {
        min-width: 100vw !important;
        width: 100vw !important;
    }
}



/* YouTube Embed Layout Styles */
.youtube-embed-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-video-container {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 20px;
    background: #1a1a1a;
    color: #ffffff;
}

.video-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.related-videos {
    margin-top: 30px;
}

.videos-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.video-card {
    flex: 0 0 280px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-card-title {
    font-size: 14px;  /* Changed from 16px */
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
		margin-top: 6px;
		margin-left: 7px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 160px;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.video-card-meta {
    font-size: 11px;  /* Changed from 13px */
    color: #b0b0b0;
    display: flex;
    justify-content: space-between;
    align-items: center;
		margin-left: 7px;
}
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Navigation Arrows */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #06ACFE;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px #06ACFE;
}

.scroll-arrow:hover {
    background: #06ACFE;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px #06ACFE;
}

.scroll-arrow.left {
    left: -20px;
}

.scroll-arrow.right {
    right: -20px;
}

.scroll-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.related-videos {
    position: relative; /* Important for arrow positioning */
}

.videos-row {
    overflow-x: hidden; /* Hide scrollbar */
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .video-card {
        flex: 0 0 250px;
    }
}

/* Fix the Latest News section title */
.wp-block-heading {
    color: #fff !important;
    margin-bottom: 2rem !important;
}

/* Replace your existing query block CSS with this more specific version */

/* HOMEPAGE ONLY - Query Loop Layout */
.homepage-featured-posts .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* HOMEPAGE ONLY - Cover Block in Query Loop */
.homepage-featured-posts .wp-block-cover {
    min-height: 800px !important;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex !important;
    align-items: flex-end !important;
}

.homepage-featured-posts .wp-block-cover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(131, 56, 236, 0.3);
}

/* Better gradient overlay */
.homepage-featured-posts .wp-block-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Content Container - Left Aligned */
.homepage-featured-posts .wp-block-cover__inner-container {
    position: relative !important;
    z-index: 2;
    width: 100% !important;
    padding: 15rem !important;
    text-align: left !important;
    margin-top: auto !important;
}

/* Category Styling - Left Aligned */
.homepage-featured-posts .wp-block-post-terms {
    margin-bottom: 0.75rem !important;
    text-align: left !important;
}

.homepage-featured-posts .wp-block-post-terms a {
    display: inline-block;
    background: #ff006e;
    color: #fff !important;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
}

/* Title Styling */
.homepage-featured-posts .wp-block-post-title {
    margin: 0.5rem 0 !important;
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    text-align: left !important;
}

.homepage-featured-posts .wp-block-post-title a {
    color: #fff !important;
    text-decoration: none;
    font-weight: 800;
    display: block;
}

/* Excerpt Styling */
.homepage-featured-posts .wp-block-post-excerpt {
    margin: 0.75rem 0 !important;
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left !important;
}

/* Date Styling - Left Aligned */
.homepage-featured-posts .wp-block-post-date {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    text-align: left !important;
    display: block;
}

/* Read More link styling (if using paragraph + link) */
.homepage-featured-posts .wp-block-cover p a[href*="Read More"],
.homepage-featured-posts .wp-block-cover p a[href*="read more"],
.homepage-featured-posts p:last-child a {
    display: inline-block;
    background: transparent;
    border: 2px solid #fff;
    color: #fff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    margin-top: 0.5rem;
}

.homepage-featured-posts p:last-child a:hover {
    background: #fff;
    color: #000 !important;
}

/* Read More block styling */
.homepage-featured-posts .wp-block-read-more {
    display: inline-block;
    background: transparent !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 50px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    margin-top: 1rem;
}

.homepage-featured-posts .wp-block-read-more:hover {
    background: #fff !important;
    color: #000 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .homepage-featured-posts .wp-block-post-template {
        grid-template-columns: 1fr;
    }
    
    .homepage-featured-posts .wp-block-cover {
        min-height: 350px !important;
    }
    
    .homepage-featured-posts .wp-block-post-title {
        font-size: 1.5rem !important;
    }
}

/* Optional: Add a subtle animation to the cards */
.homepage-featured-posts .wp-block-cover {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.homepage-featured-posts .wp-block-cover:nth-child(2) {
    animation-delay: 0.1s;
}

.homepage-featured-posts .wp-block-cover:nth-child(3) {
    animation-delay: 0.2s;
}

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

/* Jetpack Contact Form Submit Button */
.contact-form input[type="submit"] {
    background-color: #ff6f61; /* button color */
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form input[type="submit"]:hover {
    background-color: #ff4a3d;
}

/* Center align Twitter embeds */
.twitter-tweet {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Alternative - if the above doesn't work, try this */
blockquote.twitter-tweet {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* If embedded in a container, you might also need */
.wp-block-embed-twitter {
    text-align: center;
}