/*
Theme Name: REDLAS Custom Theme
Theme URI: https://redlas.org/
Author: REDLAS Web Team
Description: A professional, responsive, and custom WordPress theme for Rural Employment Development & Legal Aid Society (REDLAS).
Version: 7.0.0
Text Domain: redlas-theme
*/

:root {
    --primary-red: #C62828;
    --primary-green: #16834A;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F8F9FA;
    --bg-gray: #E9ECEF;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Kalpurush', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

/* Increased padding on container so content doesn't stick to the edges */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; 
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    color: var(--primary-green);
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-red);
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}
.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}
.top-contact {
    display: flex;
    align-items: center;
}
.top-social-lang {
    display: flex;
    align-items: center;
}
.top-bar a {
    color: var(--white);
    text-decoration: none;
    margin-left: 10px;
    transition: opacity 0.3s;
}
.top-bar a:hover {
    opacity: 0.8;
}
.divider {
    margin: 0 10px;
    opacity: 0.7;
}

/* Header & Navigation */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0; /* Added more vertical breathing room */
    position: relative;
}
.site-branding {
    flex-shrink: 0;
}
.site-branding a {
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-green);
    display: flex;
    align-items: center;
}
.site-branding span {
    color: var(--primary-red);
}

/* Main Navigation (Desktop) */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}
.main-navigation ul li {
    margin: 0;
    white-space: nowrap;
}
.main-navigation ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s;
}
.main-navigation ul li a:hover {
    color: var(--primary-red);
}
.header-button {
    margin-left: 15px;
    flex-shrink: 0;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--primary-green);
    cursor: pointer;
    padding: 5px;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-red {
    background-color: var(--primary-red);
    color: var(--white);
}
.btn-red:hover {
    background-color: #a02020;
    color: var(--white);
}
.btn-green {
    background-color: var(--primary-green);
    color: var(--white);
}
.btn-green:hover {
    background-color: #11683b;
    color: var(--white);
}
.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}
.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-green);
}

/* Hero Section with Slider */
.hero-section {
    position: relative;
    color: var(--white);
    padding: 150px 0;
    text-align: center;
    overflow: hidden;
}
.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 5s linear;
    transform: scale(1.05);
}
.slide-item.active {
    opacity: 1;
    transform: scale(1);
}
.hero-content-wrap {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-size: 52px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-section p {
    font-size: 22px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Grids & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s;
    border: 1px solid var(--bg-gray);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.card-icon {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 15px;
}

/* Post Cards */
.post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.post-card-img {
    height: 200px;
    background-color: var(--bg-gray);
    background-size: cover;
    background-position: center;
}
.post-card-content {
    padding: 20px;
}
.post-card h3 {
    font-size: 20px;
    margin-top: 0;
    color: var(--primary-green);
}

/* Emergency & Impact Sections */
.emergency-section {
    background-color: var(--primary-red);
    color: var(--white);
    text-align: center;
}
.emergency-section h2 {
    color: var(--white);
}
.emergency-section .section-title::after {
    background-color: var(--white);
}

.impact-section {
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
}
.impact-section h2 {
    color: var(--white);
}
.impact-section .section-title::after {
    background-color: var(--white);
}
.stat-box h3 {
    font-size: 48px;
    margin: 0;
}

/* Page Styles */
.page-header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-title {
    margin: 0;
    font-size: 36px;
}
.page-content {
    padding: 60px 0;
    background: var(--white);
}

/* Footer */
.site-footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-widget h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding: 20px 0;
    margin-top: 20px;
}
.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive Styles for Header & Menu */
@media (max-width: 1024px) { 
    .menu-toggle {
        display: block; 
    }
    .main-navigation {
        display: none; 
        width: 100%;
        flex-direction: column;
        background: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid var(--bg-gray);
    }
    .main-navigation.toggled {
        display: flex; 
    }
    .main-navigation ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    .main-navigation ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--bg-gray);
    }
    .main-navigation ul li a {
        display: block;
        padding: 15px;
    }
    .header-button {
        margin: 20px auto 0;
        text-align: center;
    }
}

/* Responsive Top Bar & Footer */
@media (max-width: 768px) {
    /* Top Bar Mobile Optimization - Single Line */
    .top-bar {
        font-size: 13px;
        padding: 8px 0;
    }
    .top-bar-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .desktop-only {
        display: none !important;
    }
    
    /* Footer Mobile Optimization - 2 Rows */
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hero-section {
        padding: 100px 15px;
    }
    .hero-section h1 {
        font-size: 32px;
    }
}
