/* Home Page Styles */

/* General Container */
.home-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px; /* Added horizontal padding */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Hero Section */
.hero-section {
    width: 100%;
    background-color: #f5f5f5;
    padding: 50px 20px;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 20px;
    gap: 40px;
}

.hero-text {
    flex: 0 0 55%;
    max-width: 55%;
    text-align: right;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
}

.logo-container {
    text-align: center;
    margin-bottom: 50px;
    padding: 10px;
}

.main-logo {
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.3em;
    line-height: 1.8;
    color: #2c3e50;
    white-space: normal;
    word-wrap: break-word;
    text-align: justify;
    padding: 0;
    margin-bottom: 15px;
}

.hero-image {
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    padding: 0 10px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    max-height: 600px;
    object-fit: cover;
}

/* Featured News Carousel */
.featured-news-carousel {
    width: 100%;
    max-width: 600px;
    margin-top: 30px;
    position: relative;
    padding: 0;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #38B2AC;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.carousel-arrow:hover {
    background: #319795;
}

.carousel-arrow.prev {
    right: -50px;
}

.carousel-arrow.next {
    left: -50px;
}

.featured-news-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    align-items: center;
}

.featured-news-image {
    flex: 0 0 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.featured-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-news-text {
    flex: 1;
}

.featured-news-title {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.featured-news-date {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.featured-news-excerpt {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        padding: 0;
        gap: 20px;
    }

    .hero-text,
    .hero-image {
        max-width: 100%;
        flex: 0 0 100%;
        padding: 0 10px;
    }

    .main-logo {
        max-width: 400px;
    }

    .hero-description {
        font-size: 1.2em;
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .main-logo {
        max-width: 320px;
    }
    
    .hero-description {
        font-size: 1.1em;
        padding: 0 5px;
    }
}

/* Sections */
.section {
    padding: 50px 20px;
}

.section-title {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

/* Grids */
.news-grid,
.publications-grid,
.lectures-grid,
.fatwas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Section Footer */
.section-footer {
    text-align: center;
    margin-top: 30px;
}

.section-footer .btn {
    background-color: #38B2AC;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
}

.section-footer .btn:hover {
    background-color: #319795;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .publication-item {
        width: calc(33.33% - 20px);
    }
}

@media (max-width: 992px) {
    .news-item,
    .lecture-item,
    .fatwa-item,
    .publication-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .news-item,
    .lecture-item,
    .fatwa-item,
    .publication-item {
        width: 100%;
    }

    .hero-content {
        flex-direction: column;
    }

    .hero-text,
    .hero-image {
        max-width: 100%;
    }

    .hero-image {
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 2em;
    }

    .hero-description {
        font-size: 1.1em;
    }
}
