/*
  Theme Name:   gooalplus — GooalPlus Edition
  Theme URI:    https://gooalplus.com/
  Description:  Beautiful, Powerful & Flexible WordPress Theme for News, Magazine and Blog websites. مُكيّف خصيصاً لموقع GooalPlus
  Author:       فريق التصميم والبرمجة في GooalPlus
  Author URI:   https://gooalplus.com/
  Version:      7.1.0
  License:      license purchased
  License URI:  https://gooalplus.com/licenses/regular_extended
  Tags:         two-columns, buddypress, left-sidebar, right-sidebar, custom-menu, editor-style, featured-images, full-width-template, microformats, rtl-language-support, sticky-post, threaded-comments, translation-ready
  Text Domain:  gooalplus
  Tested up to: 6.4
  Requires at least: 5.0
*/

/* --- Global & Body Styles --- */
body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5; /* Light grey background for the page */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    direction: rtl; /* Right-to-left for Arabic */
    text-align: right;
    -webkit-font-smoothing: antialiased; /* Smoother font rendering on WebKit browsers */
    -moz-osx-font-smoothing: grayscale; /* Smoother font rendering on Firefox */
}

/* --- General Headings Styles --- */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    color: #2c3e50; /* Dark blue-grey for headings */
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    line-height: 1.3;
    font-weight: 700;
    direction: rtl;
    text-align: right;
}

/* Specific Heading Sizes within the Entry Content for better visual hierarchy */
.entry-content h2 {
    font-size: 2.2em;
    color: #1a2a3a;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 1.5em;
    font-weight: 700;
}

.entry-content h3 {
    font-size: 1.8em;
    color: #2d4054;
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
}

.entry-content h4 {
    font-size: 1.4em;
    color: #3f546a;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

/* --- General Links Styling --- */
a {
    color: #007bff; /* Standard blue for links */
    text-decoration: none;
    transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out; /* Smooth transition on hover */
}

a:hover {
    color: #0056b3; /* Darker blue on hover */
    text-decoration: underline;
}

/* --- Main Content Area Layout --- */
.main-content {
    max-width: 960px; /* Constrain content width for readability */
    margin: 30px auto; /* Center content horizontally with top/bottom margin */
    padding: 0 15px; /* Add some padding on sides for smaller screens */
}

/* --- Article & Post Content Container Styling --- */
#the-post.post-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
}

/* --- Breadcrumb Navigation Styling (Rectangular Box with Background) --- */
.khaleejy7-breadcrumb-box {
    margin-bottom: 25px;
    padding: 12px 20px;
    font-size: 0.95em;
    color: #6c757d;
    display: flex; /* Use flexbox for alignment */
    align-items: center;
    border-radius: 8px; /* Slightly rounded corners for the box */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); /* Subtle shadow */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
}

.khaleejy7-breadcrumb-box.khaleejy7-meta-background {
    border: 2px solid #007bff; /* Same accent border color as meta box */
    background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque white background */
    backdrop-filter: blur(5px); /* Subtle blur effect */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); /* Slightly stronger shadow */
    color: #34495e; /* Default text color for breadcrumb */
}

.khaleejy7-breadcrumb-item {
    color: #007bff;
    font-weight: 500;
}

.khaleejy7-breadcrumb-item:hover {
    color: #0056b3;
    text-decoration: none;
}

.khaleejy7-breadcrumb-sep {
    margin: 0 8px; /* Spacing for the separator */
    color: #555; /* Adjusted for better contrast */
}

/* --- Main Post Title Styling --- */
.khaleejy7-post-title {
    font-size: 2.4em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: right;
}

/* --- News Meta Box (Category, Date, Author) --- */
.khaleejy7-news-meta-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 15px;
    border: 2px solid #007bff; /* Accent border color */
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.8); /* Slightly transparent white background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px); /* Subtle blur effect */
}

.khaleejy7-news-meta-item {
    padding: 5px 10px;
    font-size: 0.95em;
    color: #34495e;
    text-align: center;
    flex-grow: 1; /* Allows items to grow and fill space */
    min-width: 120px; /* Minimum width for each item */
}

.khaleejy7-news-meta-item:not(:last-child) {
    border-inline-end: 1px solid rgba(0, 0, 0, 0.1); /* Separator between items (RTL safe) */
}

.khaleejy7-news-meta-box .news-category a {
    background-color: transparent;
    color: #007bff;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    font-size: 1em;
    margin: 0;
    transition: color 0.2s ease;
}

.khaleejy7-news-meta-box .news-category a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.khaleejy7-news-meta-box .news-date,
.khaleejy7-news-meta-box .news-author {
    font-weight: 500;
    color: #444; /* Darker color for better contrast */
}

/* --- Featured Image Container with Lazy Load Placeholder and Overlays --- */
.khaleejy7-featured-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio for responsive images */
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #e0e0e0; /* Placeholder background */
    border: 3px solid #ff5722; /* Accent border around the image */
    box-sizing: border-box;
}

.khaleejy7-featured-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the container */
    object-position: center center;
    opacity: 0; /* Hidden by default, made visible by JS on load */
    transition: opacity 0.4s ease-in-out; /* Smooth fade-in */
}

.khaleejy7-alt-overlay,
.khaleejy7-date-overlay {
    position: absolute;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    color: #fff;
    font-size: 0.85em;
    border-radius: 5px;
    z-index: 5; /* Ensure overlays are above the image */
}

.khaleejy7-alt-overlay {
    bottom: 15px;
    left: 15px;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate long alt texts */
}

.khaleejy7-date-overlay {
    top: 15px;
    right: 15px;
}

/* --- Follow Us Section --- */
.khaleejy7-follow {
    background-color: #e6f0fa; /* Light blue background */
    padding: 25px;
    margin-top: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.khaleejy7-follow-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.khaleejy7-social-links {
    display: flex;
    justify-content: center; /* Center social links */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px; /* Space between links */
}

.khaleejy7-social-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px; /* Pill-shaped buttons */
    font-weight: 600;
    color: #fff; /* Ensure text color is white for contrast */
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.khaleejy7-social-link svg {
    width: 20px;
    height: 20px;
    margin-inline-end: 8px; /* Space between icon and text */
}

.khaleejy7-social-link:hover {
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Specific colors for social links */
.khaleejy7-facebook { background-color: #3b5998; }
.khaleejy7-facebook:hover { background-color: #2d4373; }

/* Adjusted for better contrast on Twitter (X) and Google News */
.khaleejy7-x { background-color: #1DA1F2; color: #ffffff; } /* Explicit white color for better contrast */
.khaleejy7-x:hover { background-color: #0d8edc; }

.khaleejy7-telegram { background-color: #0088CC; }
.khaleejy7-telegram:hover { background-color: #0077B3; }

.khaleejy7-google-news { background-color: #EA4335; color: #ffffff; } /* Explicit white color for better contrast */
.khaleejy7-google-news:hover { background-color: #c5221b; }

/* --- Tags Section --- */
.khaleejy7-tags-container {
    background-color: #fcfcfc;
    margin-top: 40px;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between tags */
}

.khaleejy7-tag-link {
    background-color: #f0f0f0;
    color: #555;
    padding: 7px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.khaleejy7-tag-link:hover {
    background-color: #ddd;
    color: #333;
    text-decoration: none;
}

/* --- Latest News Section --- */
.khaleejy7-latest-news {
    background-color: #f8f8f8;
    margin-top: 40px;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #5cb85c; /* Green accent border */
}

.khaleejy7-latest-news-title {
    font-size: 2em;
    color: #2c3e50;
    text-align: right;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Grid for Latest News Items */
.khaleejy7-latest-items {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
}

.khaleejy7-latest-item {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid #dcdcdc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.khaleejy7-latest-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.khaleejy7-latest-link {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    text-decoration: none;
}

.khaleejy7-latest-title {
    font-size: 1.15em;
    font-weight: 600;
    color: #34495e; /* Ensure good contrast against white background */
    line-height: 1.4;
    margin: 0;
    flex-basis: 70%; /* Takes 70% width */
    max-width: 70%;
    transition: color 0.2s ease;
}

.khaleejy7-latest-link:hover .khaleejy7-latest-title {
    color: #007bff;
    text-decoration: underline;
}

.khaleejy7-latest-date {
    font-size: 0.85em;
    color: #444; /* Darker color for better contrast against white background */
    flex-basis: 25%; /* Takes 25% width */
    max-width: 25%;
    text-align: left;
    white-space: nowrap; /* Prevent date from wrapping */
}

/* --- Related News Section (Full Width, 2 items per row - Key Update) --- */
.khaleejy7-related-news-section {
    width: 100%; /* Make it full width of its parent container */
    max-width: 100%;
    margin-top: 40px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

.khaleejy7-related-news-section .khaleejy7-section-title {
    font-size: 2em;
    color: #2c3e50;
    text-align: right;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.khaleejy7-related-articles-grid {
    display: grid;
    gap: 25px; /* Spacing between articles */
    grid-template-columns: repeat(2, 1fr); /* Exactly 2 articles per row */
}

.khaleejy7-related-article-card {
    background-color: #ffffff;
    border-radius: 12px; /* Slightly more rounded corners for aesthetic */
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* Stronger shadow for depth */
    display: flex;
    flex-direction: column;
    border: 2px solid #9c27b0; /* Unique border color (e.g., purple) */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effects */
}

.khaleejy7-related-article-card:hover {
    transform: translateY(-5px); /* More pronounced lift on hover */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

.khaleejy7-related-article-link {
    display: block; /* Make the whole card clickable */
    text-decoration: none;
    color: inherit; /* Inherit text color by default */
}

.khaleejy7-related-article-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.66%; /* 3:2 aspect ratio for images (e.g., 600x400) */
    overflow: hidden;
    background-color: #e0e0e0; /* Placeholder background for images */
    border-radius: 10px 10px 0 0; /* Rounded top corners for the image container */
}

.khaleejy7-related-article-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills container without distortion */
    object-position: center center;
    opacity: 0; /* Hidden by default for lazy load effect */
    transition: opacity 0.4s ease-in-out; /* Smooth fade-in */
}

.khaleejy7-related-article-title {
    font-size: 1em; /* Smaller font size for titles under image, as requested */
    font-weight: 600;
    color: #34495e; /* Ensure good contrast against white background */
    line-height: 1.4;
    margin: 15px; /* Padding around the title */
    margin-bottom: 10px;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for long titles */
    display: -webkit-box; /* Enable multiline ellipsis for WebKit browsers */
    -webkit-line-clamp: 2; /* Limit title to 2 lines */
    -webkit-box-orient: vertical;
}

.khaleejy7-related-article-link:hover .khaleejy7-related-article-title {
    color: #007bff;
    text-decoration: underline;
}

/* --- General Content Styles for WordPress's the_content() output --- */
.entry-content {
    font-size: 1.05em;
    line-height: 1.8;
    color: #444;
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.entry-content ul, .entry-content ol {
    margin-bottom: 1em;
    padding-right: 25px; /* For RTL lists */
}

.entry-content li {
    margin-bottom: 0.5em;
}

blockquote {
    border-right: 5px solid #007bff; /* Blue border for blockquotes */
    padding: 15px 20px;
    margin: 25px 0;
    background-color: #eef7ff; /* Light blue background */
    color: #333;
    font-style: italic;
    border-radius: 5px;
}

/* --- Image Load Effect (Controlled by JavaScript) --- */
/* This class is added by JS once the high-res image is loaded */
img.khaleejy7-lazy-image.loaded {
    opacity: 1;
}

/* --- Fallback for <noscript> (Images visible if JavaScript is disabled) --- */
.khaleejy7-featured-container noscript img,
.khaleejy7-related-article-image-container noscript img {
    opacity: 1;
}

/* --- Responsive Adjustments for Smaller Screens --- */
@media (max-width: 768px) {
    .khaleejy7-post-title {
        font-size: 1.8em;
    }
    .khaleejy7-latest-items,
    .khaleejy7-related-articles-grid {
        grid-template-columns: 1fr; /* Stack items vertically on mobile (1 item per row) */
    }
    /* Adjust padding and margins for smaller screens */
    #the-post.post-content,
    .khaleejy7-follow,
    .khaleejy7-tags-container,
    .khaleejy7-latest-news,
    .khaleejy7-related-news-section {
        padding: 20px;
        margin-top: 25px;
    }
    .main-content {
        margin: 20px auto;
    }
    /* Adjust heading sizes for mobile */
    .entry-content h2 {
        font-size: 1.8em;
    }
    .entry-content h3 {
        font-size: 1.4em;
    }
    .entry-content h4 {
        font-size: 1.2em;
    }

    /* Mobile specific layout for Latest News: date below title */
    .khaleejy7-latest-link {
        flex-direction: column; /* Stack title and date vertically */
        align-items: flex-start;
    }
    .khaleejy7-latest-title {
        flex-basis: 100%;
        max-width: 100%;
        margin-bottom: 5px;
    }
    .khaleejy7-latest-date {
        flex-basis: 100%;
        max-width: 100%;
        text-align: right;
    }
    /* Mobile adjustments for News Meta Box */
    .khaleejy7-news-meta-box {
        flex-direction: column;
        align-items: flex-start;
        border: 2px solid #007bff;
    }
    .khaleejy7-news-meta-item {
        width: 100%;
        text-align: right;
        padding: 8px 0;
        border-inline-end: none; /* Remove vertical separator on mobile */
        border-bottom: 1px dashed rgba(0, 0, 0, 0.1); /* Add dashed horizontal separator */
    }
    .khaleejy7-news-meta-item:last-child {
        border-bottom: none; /* Remove border from last item */
    }
}

@media (max-width: 480px) {
    /* Full width social links on very small screens */
    .khaleejy7-social-link {
        width: 100%;
        justify-content: center;
    }
    .khaleejy7-post-title {
        font-size: 1.6em;
    }
}
/* The stylesheet is located in "assets/css/style.css". */
