/* Custom CSS for Arabic News Website */

/* Global Styles */
*
{
     font-family: "Noto Kufi Arabic", sans-serif;

        font-size: 15px;

}


#newsSlider {
    height: 500px;
}

#newsSlider .carousel-inner,
#newsSlider .carousel-item,
.slider-img-wrapper {
    height: 100%;
}

.slider-img-wrapper img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.post_date

{
font-size: 12px;
font-weight: 400;
display: inline;
}

a
{
    color: #000;
    text-decoration: none;
}
.truncate-multi {
  display: -webkit-box;
  -webkit-line-clamp: 3; /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  direction: rtl;
  font-weight: bold;
}

.truncate-multi2 {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  direction: rtl;
  font-weight: bold;
}



h1, h2,h3,h4,g5,h6
{
    text-align: center;
}

body {
    background-color: #f8f9fa;
    line-height: 1.7;
    font-size: 16px;
    color:#2c3e50;
   
}


h1 a {
  font-size: 1.4rem;
  font-weight: inherit;
  color: inherit;
  text-decoration: none;
}

.hover-box {
  display: none;
 
 /*/ z-index: 1000;*/
}


.my-container {
  max-width: 1200px; /* your desired max width */
}


.hidden-div {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  width: 200px;
}

.link-container {
  position: relative;
  display: inline-block;
}

.page-content
{
    font-size: 24px;
    line-height: 200%;
    direction: rtl;
}

/* Show div when hovering the link OR the div itself */
.link-container:hover .hidden-div {
  display: block;
}




.arabic-text
{
    direction: rtl;
}
.col4-title
{
    direction: rtl;
    text-align: center;
}

.img-caption{
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
}

.col-20p
{
    flex: none;
    width: 20%;
    margin-top:5px;
}
.title-top
{
    font-size: 12px;
   
}
.img-top
{
     height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
    
    
   
}
.card-body
{
    text-align: center;
    direction: rtl;
    height: 80px;
}
.post-boyd p
{
    direction: rtl;        /* اتجاه النص من اليمين لليسار */
  text-align: justify;   /* ضبط النص بالكامل */
  text-align-last: right;/* السطر الأخير يظل بمحاذاة اليمين */
  line-height: 1.8
}
/* Header Styles */
.header-section {
    background: #101d31;
   /* background: linear-gradient(135deg, #141f31 0%, #764ba2 100%);*/
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
   
}
.navbar-section {
    background: #c90012;
   /* background: linear-gradient(135deg, #141f31 0%, #764ba2 100%);*/
   
}

.navbar-section .navbar {
  min-height: 40px; /* smaller height */
  padding-top: 0;
  padding-bottom: 0;
}



.section-title
{
    background: #d0000e;
    color: white;
    padding: 5px;
    width: 155px;
    font-size: 16px;
    
    
    
}

.section-title a 
{
    color: white;
}
.header-section .navbar {
    /* padding: 1rem 0; */
    padding:  0;
}


/* Fix image dimensions inside slider */
.slider-image-container {
    height: 500px; /* Set fixed height for all images */
    overflow: hidden;
    position: relative;
}
.main-title
{
    font-size: 30px;
    direction: rtl;
}

.slider-image-container img {
    width: 100%;
    height: 100vh;
    object-fit: cover; /* Crop image to fit */
}

/* Carousel caption styling */
.carousel-caption {
    width: 100%;
    max-width: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none; 
    
    text-align: center !important;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

.slide-title {
    font-size: 1.5rem;
    line-height: 1.4;
    max-height: 3.6em; /* 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.5rem;
    direction: rtl;
}



@media (max-width: 768px) {
    .carousel-caption {
        display: none; /* Hide on small screens if needed */
    }
}


.carousel-caption {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.card-title {
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    width: 100%;
}



/* Slider Image Wrapper */
.slider-img-wrapper {
    position: relative;
    width: 100%;
    height: 500px; /* Adjust based on desired height */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure image fills the wrapper */
.slider-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop image to fit container */
    display: block;
}




.navbar-brand {
    font-size: 1.8rem;
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
   
    
   
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #d0000e !important;
    background: white;
      
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: white;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Breaking News */
.breaking-news {
    overflow: hidden;
}

.breaking-text {
    font-weight: 500;
    animation: scroll-text 30s linear infinite;
}

@keyframes scroll-text {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
}

/* Featured Article */
.featured-article {
    margin-bottom: 2rem;
}

.featured-article .card {
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.featured-article .card-img-top {
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-article .card:hover .card-img-top {
    transform: scale(1.05);
}

.featured-article .card-title {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* News Cards */
.news-card .card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.news-card .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card .card:hover .card-img-top {
    transform: scale(1.03);
}

.news-card .card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.news-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
}

/* Sidebar Widgets */
.sidebar-widget .card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.sidebar-widget .card-header {
    border: none;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.sidebar-widget .list-group-item {
    border: none;
    border-bottom: 1px solid #f1f3f4;
    padding: 1rem 1.25rem;
    transition: background-color 0.2s ease;
}

.sidebar-widget .list-group-item:hover {
    background-color: #f8f9fa;
}

.sidebar-widget .list-group-item:last-child {
    border-bottom: none;
}

/* Weather Widget */
.weather-info i {
    margin-bottom: 1rem;
}

.weather-info h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Ad Placeholder */
.ad-placeholder {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

/* Social Media Buttons */
.social-share .btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #141f31 100%);
    margin-top: 3rem;
}

.footer h5, .footer h6 {
    color: white;
}

.footer .social-links a {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: #ffd700 !important;
}

.footer .input-group .form-control {
    border-radius: 25px 0 0 25px;
    border: none;
}

.footer .input-group .btn {
    border-radius: 0 25px 25px 0;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-article .card-title {
        font-size: 1.3rem;
    }
    
    .news-card .card-title {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .breaking-news {
        font-size: 0.9rem;
    }
    
    .social-share {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .featured-article .card-img-top {
        height: 200px;
    }
    
    .news-card .card-img-top {
        height: 150px;
    }
    
    .footer .text-end {
        text-align: start !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
    outline: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}