/*
Theme Name: News Island Pro
Theme URI: https://newsislandpro.com
Author: Tahseen Ashrafi
Author URI: https://tahseenashrafi.com
Description: A professional, fully customizable news theme with advanced widgets, dark mode, and complete customizer controls.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: news-island-pro
Tags: news, magazine, blog, dark-mode, customizable, widgets, responsive
*/

/* ===== CSS Variables ===== */

/* ===== MARQUEE / BREAKING NEWS ===== */
.breaking-news-bar {
    background: var(--nip-primary, #e53935);
    padding: 10px 0;
}

.breaking-news-inner {
    display: flex;
    align-items: center;
    gap: 15px;
}

.breaking-label {
    background: #fff;
    color: var(--nip-primary, #e53935);
    padding: 5px 15px;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 3px;
}

.marquee-wrapper {
    flex: 1;
    overflow: hidden;
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll linear infinite;
}

.marquee-content a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.marquee-content a:hover {
    text-decoration: underline;
}

.marquee-separator {
    color: rgba(255,255,255,0.5);
    margin: 0 15px;
    font-weight: 300;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ===== THREE COLUMN WIDGET ===== */
.widget-three-column {
    margin-bottom: 40px;
}

.three-column-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 30px;
}

.column-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--nip-primary, #e53935);
    font-family: var(--nip-heading-font, 'Poppins'), sans-serif;
}

.posts-list .post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.posts-list .post-item .post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
}

.posts-list .post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posts-list .post-item .post-date {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.posts-list .post-item .post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.posts-list .post-item .post-title a {
    color: inherit;
    text-decoration: none;
}

.posts-list .post-item .post-title a:hover {
    color: var(--nip-primary, #e53935);
}

/* Featured Post */
.featured-post .featured-thumb {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.featured-post .featured-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.featured-post .post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--nip-primary, #e53935);
    color: #fff;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
}

.featured-post .featured-content .post-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    display: block;
}

.featured-post .featured-content .post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px;
}

.featured-post .post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Center Bottom Posts */
.center-bottom-posts {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.center-bottom-posts.count-2 {
    grid-template-columns: repeat(2, 1fr);
}

.center-bottom-posts.count-4 {
    grid-template-columns: repeat(2, 1fr);
}

.bottom-post {
    display: flex;
    flex-direction: column;
}

.bottom-post .post-thumb {
    overflow: hidden;
    margin-bottom: 10px;
}

.bottom-post .post-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.bottom-post .post-date {
    font-size: 11px;
    color: #888;
}

.bottom-post .post-title {
    font-size: 14px;
    font-weight: 600;
    margin: 5px 0 0;
}

/* ===== THREE EQUAL WIDGET ===== */
.widget-three-equal {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--nip-primary, #e53935);
}

.three-equal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.equal-post .post-thumb {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
}

.equal-post .post-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.equal-post .post-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--nip-primary, #e53935);
    color: #fff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
}

.equal-post .post-date {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.equal-post .post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
}

.equal-post .post-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.equal-post .post-meta {
    font-size: 11px;
    color: #999;
}

.equal-post .post-meta .author {
    margin-right: 10px;
}

/* ===== GRID POSTS WIDGET ===== */
.widget-grid-posts {
    margin-bottom: 40px;
}

.grid-posts-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
}

.grid-post {
    position: relative;
    overflow: hidden;
}

.grid-post-large {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-post .post-thumb {
    width: 100%;
    height: 100%;
}

.grid-post .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-post:hover .post-thumb img {
    transform: scale(1.05);
}

.grid-post .post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.grid-post .post-category {
    display: inline-block;
    background: var(--nip-primary, #e53935);
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 8px;
}

.grid-post .post-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.3;
}

.grid-post-large .post-title {
    font-size: 20px;
}

.grid-post .post-title a {
    color: #fff;
    text-decoration: none;
}

.grid-post .post-date {
    font-size: 11px;
    opacity: 0.8;
}

/* ===== FIVE ROW WIDGET ===== */
.widget-five-row {
    margin-bottom: 40px;
}

.five-row-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.five-row-post {
    text-align: center;
}

.five-row-post .post-thumb {
    overflow: hidden;
    margin-bottom: 12px;
}

.five-row-post .post-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.five-row-post .post-date {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 8px;
}

.five-row-post .post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
}

.five-row-post .post-title a {
    color: inherit;
    text-decoration: none;
}

.five-row-post .post-title a:hover {
    color: var(--nip-primary, #e53935);
}

.five-row-post .post-meta {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
}

.five-row-post .read-more-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--nip-primary, #e53935);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.five-row-post .read-more-btn:hover {
    background: #c62828;
}

/* ===== ARCHIVE GALLERY ===== */
.archive-header {
    margin-bottom: 30px;
    text-align: center;
}

.archive-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.archive-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-medium {
    grid-row: span 1;
}

.gallery-small {
    grid-row: span 1;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-thumb img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-meta {
    font-size: 11px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.gallery-meta .post-date {
    margin-right: 10px;
}

.gallery-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.3;
}

.gallery-large .gallery-title {
    font-size: 22px;
}

.gallery-title a {
    color: #fff;
    text-decoration: none;
}

.gallery-excerpt {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

/* ===== SINGLE POST ===== */
.single-article {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.entry-categories {
    margin-bottom: 10px;
}

.category-link {
    display: inline-block;
    background: var(--nip-primary, #e53935);
    color: #fff;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    margin-right: 5px;
}

.entry-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 25px;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entry-meta svg {
    opacity: 0.6;
}

.entry-thumbnail {
    margin-bottom: 25px;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-caption {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border-left: 3px solid var(--nip-primary, #e53935);
}

.image-credit {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.entry-tags {
    margin-bottom: 15px;
}

.tags-label,
.share-label {
    font-weight: 600;
    margin-right: 10px;
}

.tag-link {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    padding: 5px 12px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 20px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tag-link:hover {
    background: var(--nip-primary, #e53935);
    color: #fff;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-block;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    color: #fff;
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }

/* Post Navigation */
.post-navigation {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.post-navigation a {
    font-size: 15px;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.post-navigation a:hover {
    color: var(--nip-primary, #e53935);
}

/* Related Posts */
.related-posts {
    margin-top: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post .post-thumb {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-post .post-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post .post-date {
    font-size: 11px;
    color: #888;
}

.related-post .post-title {
    font-size: 14px;
    font-weight: 600;
    margin: 5px 0 0;
}

/* ===== COMMENTS ===== */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.comments-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
}

.comment-reply-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--nip-primary, #e53935);
    outline: none;
}

.comment-form .submit {
    background: var(--nip-primary, #e53935);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form .submit:hover {
    background: #c62828;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--nip-secondary, #1a1a2e);
    color: #fff;
    margin-top: 50px;
}

.footer-top {
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-site-name {
    font-family: var(--nip-heading-font, 'Poppins'), sans-serif;
    font-weight: 700;
    margin: 0;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.footer-widgets {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--nip-primary, #e53935);
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--nip-primary, #e53935);
}

.footer-menu-section {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-nav {
    text-align: center;
}

.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-menu-list a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.footer-menu-list a:hover {
    color: var(--nip-primary, #e53935);
}

.no-menu-message {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.theme-credit a {
    color: var(--nip-primary, #e53935);
    text-decoration: none;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--nip-primary, #e53935);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #c62828;
    transform: translateY(-3px);
}

.back-to-top.style-circle { border-radius: 50%; }
.back-to-top.style-square { border-radius: 0; }
.back-to-top.style-rounded { border-radius: 10px; }
.back-to-top.style-pill { border-radius: 25px; }

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--nip-secondary, #1a1a2e);
    transition: all 0.3s ease;
}

/* Dark Mode */
.dark .hamburger-line {
    background: #fff;
}
