/* 1. Font Integration (Readex Pro) */
/* Load Readex Pro from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@200;300;400;500;600;700&display=swap');

/* Apply Arabic RTL and Font globally */
body, .lebanon-agency-home {
    direction: rtl; /* Right-to-Left for Arabic */
    text-align: right;
    font-family: 'Readex Pro', sans-serif;
    color: inherit;
    background-color: none !important;
    
}

/* --- Scrollbar Hiding Fix --- */

/* Hide scrollbar for Chrome, Safari and Opera */
.posts-feed-container::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.posts-feed-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.single-post {
    text-align: right; 
}

/* Base Container for Full-Screen Scroll */
.posts-feed-container {
    /* Optional: Add scroll-snap for modern smooth scrolling between posts */
    scroll-snap-type: y mandatory;
    /*height: 100vh;*/
    overflow-y: scroll; /* Must be present to allow scrolling */
    background-color: none !important;
    
}

/* Smooth fade effect for posts */
.fade-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1s ease;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Full Screen Card Definition (100vh requirement) */
.full-screen-card {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start; /* Snap to the start of each card */
    position: relative;
    overflow: hidden;
    background-color: #fff; /* Ensure card itself has a background */
}

/* --- Hero Section Styling --- */
.hero-section {
    /* --- NEW BACKGROUND IMAGE --- */
    background-image: url('https://kalimageopolitics.com/wp-content/uploads/2025/11/hero-kalima.jpeg');
    background-color: #000000;
    background-size: cover; /* Ensures the image covers the entire section */
    background-position: center center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents image repetition */
    
    color: #fff;
    padding: 20px;
    text-align: center;
    position: relative; /* Needed for overlay */
    
}



.hero-section > * {
    position: relative;
    z-index: 2; /* Ensure text and scroll prompt are above the overlay */
}

.hero-title {
    font-size: 4.5em;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.8em;
    color: #c9d6de;
    font-weight: 300;
}
.scroll-down-prompt {
    position: absolute;
    bottom: 40px;
    left: 50%; /* Adjusted for RTL */
    transform: translateX(-50%);
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: bounce 2s infinite;
    z-index: 2; /* Ensure it's above the overlay */
}
.scroll-down-prompt:hover { opacity: 1; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}


/* --- Posts Grid Layout (FIXED TO 1 COLUMN) --- */
.posts-grid-layout {
    display: grid;
    /* Forces single column layout for full screen cards */
    grid-template-columns: 1fr;
    gap: 0; 
}

/* --- Post Card Styling (Modern Look & Image Fix) --- */
.post-card {
    /* Ensure image properties are set correctly for background */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    transition: background 0.3s ease;
}
.post-card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.75); /* Slight darkening on hover */
}

.card-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 800px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    text-align: right;
    margin: 20px;
}

.card-title {
    font-size: 3em;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.3;
    border-bottom: 2px solid #5fa8e3; /* Subtle separation */
    padding-bottom: 10px;
}

.card-excerpt {
    font-size: 1.25em;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 30px;
    max-height: 6em; /* Limit excerpt height */
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-btn {
    display: inline-block;
    background: #5fa8e3; /* Secondary color for button */
    color: #0d2138;
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.read-more-btn:hover {
    background: #3c8dc2;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.posts-feed-container {
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
}

/* --- Loading Indicator --- */
.loading-container {
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #0d2138;
}
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d2138;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}


.full-screen-card, 
.full-screen-card * {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
}

/* Prevent card content from capturing scroll events */
.card-content {
  pointer-events: none;
}

/* But keep interactive elements clickable */
.card-content a,
.card-content button {
  pointer-events: auto;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsive Adjustments (Mobile) --- */
@media (max-width: 900px) {
    .hero-section {
        /* This slightly shifts the focus up, which is often better for portrait (tall) screens */
        background-position: center 0%; 
    }
    .hero-title {
        font-size: 3em;
    }
    .hero-subtitle {
        font-size: 1.4em;
    }
    .card-title {
        font-size: 2em;
    }
    .card-excerpt {
        font-size: 1em;
    }
    .card-content {
        max-width: 95%;
        padding: 20px;
    }
}



