:root {
    /* Colors */
    --primary-green: #198754;
    --primary-green-light: rgba(25, 135, 84, 0.1);
    --bg-body: rgb(240, 240, 240);
    --bg-card: #ffffff;
    --text-main: #000000;
    --text-muted: #444444;
    --white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 15px 40px rgba(0, 0, 0, 0.1);

    /* Transitions & Radii */
    --transition-base: all 0.3s ease;
    --radius-lg: 20px;
    --radius-pill: 10px;
    --radius-circle: 50%;

    /* News Card Specifics */
    --news-card-height: 480px; 
    --badge-bg: #198754;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

body {
    background-color: var(--bg-body);
}

.custom-title {
    position: relative;
    display: inline-block;
    padding-bottom: 13px;
    font-weight: 900;
    color: var(--text-main);
}

.custom-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6%;
    height: 4px;
    background-color: var(--primary-green);
    border-radius: var(--radius-pill);
}

/* Modern Card Style */
.modern-card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

/* Icon Container */
.icon-wrapper {
    width: 70px;
    height: 70px;
    background-color: var(--primary-green-light);
    color: var(--primary-green);
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}
.modern-card:hover .icon-wrapper {
    background-color: var(--primary-green);
    color: var(--white);
}

.section_three_p {
    font-size: 1.22rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .modern-card {
        padding: 1.5rem;
    }
    .custom-title {
        font-size: 1.8rem;
    }
}
/* News Section Styles */
.news-card {
    background: var(--white);
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-base);
    height: 100%; /* Forces cards in the same row to match height */
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-image-wrapper {
    position: relative;
    height: 200px; /* Fixed height for all news images */
    overflow: hidden;
}

.news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents image distortion */
}

.date-badge {
    position: absolute;
    top: 15px;
    left: 15px; /* Adjust based on RTL/LTR preference, usually left looks modern */
    background-color: var(--badge-bg);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes the 'Read More' link to the bottom */
}

.news-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.news-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-height: 4.8em;          /* 3 lines * 1.6 line-height */
    overflow: hidden;
    text-overflow: ellipsis;    /* shows ... at the end */
}

.read-more-link {
    margin-top: auto; /* Aligns link to bottom */
    text-decoration: none;
    color: var(--primary-green);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.read-more-link:hover {
    gap: 12px; /* Small movement effect on hover */
}
.modern-card ul {
    padding-right: 0 !important; 
    padding-left: 0 !important;
    text-align: right !important;
    width: 100%; /* Ensure list takes full width for right alignment */
}

.modern-card li {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start; /* Keeps items to the right */
    gap: 10px;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

/* Ensure the icon stays at the top-right of the text */
.modern-card li i {
    flex-shrink: 0;
    margin-top: 5px;
    font-size: 1.1rem;
}

/* Override the center alignment for the card content ONLY in services */
#services_section .modern-card {
    align-items: flex-start;
    text-align: right;
}

#services_section .modern-card .icon-wrapper {
    margin-right: 0; /* Align icon to the right */
    margin-left: auto; 
}
/* Obituary List Modern Styling */
.obituary-list-item {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.obituary-list-item:hover {
    transform: translateX(-10px); /* Slides slightly on hover for RTL */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.07) !important;
    border-color: var(--primary-green);
}

/* The Date Box highlight */
.obituary-date-box {
    background: var(--primary-green-light);
    color: var(--primary-green);
    min-width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

/* Vertical Divider logic for RTL */
.obituary-list-item .border-end {
    border-right: 2px solid #f1f1f1 !important;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .obituary-list-item {
        flex-direction: column;
        text-align: center;
    }
    .obituary-date-box {
        margin: 0 0 1rem 0 !important;
    }
    .obituary-list-item .border-end {
        border-right: none !important;
        border-bottom: 2px solid #f1f1f1;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
}