File size: 10,174 Bytes
fcf8749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
import streamlit as st
from pathlib import Path
import sys
import random

# Add project root to path
sys.path.append(str(Path(__file__).parent))

from utils.css_loader import load_css
from components.cards import feature_card, stat_card
from config.settings import APP_CONFIG, IMPACT_METRICS

# Page configuration - MUST BE FIRST
st.set_page_config(
    page_title=APP_CONFIG["app_name"],
    page_icon="πŸ’œ",
    layout="wide",
    initial_sidebar_state="expanded",
    menu_items={
        'About': '# Women Empowerment Hub\nEmpowering women through technology, education, and community.'
    }
)

# Load custom CSS
load_css()

# ==================== SIDEBAR ====================
st.sidebar.markdown("""
    <div style="text-align: center; padding: 20px 0;">
        <div style="font-size: 60px; margin-bottom: 10px;">πŸ’œ</div>
        <h2 style="color: white; margin: 0; font-size: 22px;">Women Empowerment Hub</h2>
        <p style="color: rgba(255,255,255,0.8); font-size: 13px;">Empowering women, transforming lives</p>
    </div>
""", unsafe_allow_html=True)

st.sidebar.markdown("### πŸ“Š Live Impact")
metrics = [
    ("Women Helped", f"{IMPACT_METRICS['women_helped']:,}+"),
    ("Jobs Posted", f"{IMPACT_METRICS['jobs_posted']:,}+"),
    ("Free Courses", f"{IMPACT_METRICS['courses_available']}+"),
    ("Active Mentors", f"{IMPACT_METRICS['mentors_active']}+")
]

for label, value in metrics:
    st.sidebar.markdown(f"""
        <div style="background: rgba(255,255,255,0.1); padding: 10px; border-radius: 10px; margin-bottom: 10px;">
            <div style="font-size: 24px; font-weight: bold; color: white;">{value}</div>
            <div style="font-size: 12px; color: rgba(255,255,255,0.8);">{label}</div>
        </div>
    """, unsafe_allow_html=True)

# ==================== HERO SECTION ====================
st.markdown("""
    <div class="hero-section">
        <h1 class="hero-title">πŸ’œ Women Empowerment Hub</h1>
        <p class="hero-subtitle">
            Empowering women through safety, education, careers, health & community
        </p>
        <p style="font-size: 16px; margin-top: 20px; opacity: 0.9;">
            Your one-stop platform for resources, support, and opportunities
        </p>
    </div>
""", unsafe_allow_html=True)

# ==================== DAILY INSPIRATION (NEW) ====================
quotes = [
    "β€œThere is no limit to what we, as women, can accomplish.” – Michelle Obama",
    "β€œI am not free while any woman is unfree, even when her shackles are very different from my own.” – Audre Lorde",
    "β€œA woman with a voice is, by definition, a strong woman.” – Melinda Gates",
    "β€œThink like a queen. A queen is not afraid to fail.” – Oprah Winfrey"
]
daily_quote = random.choice(quotes)

st.markdown(f"""
    <div style="background: white; border-left: 5px solid #667eea; padding: 20px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); margin-bottom: 30px;">
        <h4 style="color: #667eea; margin: 0;">✨ Daily Inspiration</h4>
        <p style="font-size: 18px; font-style: italic; color: #555; margin-top: 10px;">{daily_quote}</p>
    </div>
""", unsafe_allow_html=True)

# ==================== IMPACT METRICS ====================
st.markdown("## πŸ“Š Our Impact")
col1, col2, col3, col4 = st.columns(4)

with col1: stat_card("πŸ‘©", f"{IMPACT_METRICS['women_helped']:,}+", "Women Helped")
with col2: stat_card("πŸ’Ό", f"{IMPACT_METRICS['jobs_posted']:,}+", "Jobs Posted", "#10b981")
with col3: stat_card("πŸ“š", f"{IMPACT_METRICS['courses_available']:,}+", "Courses Available", "#f59e0b")
with col4: stat_card("πŸ‘₯", f"{IMPACT_METRICS['mentors_active']:,}+", "Active Mentors", "#ef4444")

st.markdown("<br>", unsafe_allow_html=True)

# ==================== FEATURES OVERVIEW ====================
st.markdown("## ✨ Explore Our Features")
col1, col2, col3 = st.columns(3)

with col1:
    feature_card("πŸ›‘οΈ", "Women Safety", "Emergency contacts, legal resources, and safety tips to keep you protected 24/7")
    st.markdown("<br>", unsafe_allow_html=True)
    feature_card("❀️", "Health & Wellness", "Track your health, access medical resources, and learn about women's healthcare")

with col2:
    feature_card("πŸ’Ό", "Career Opportunities", "Discover jobs from companies committed to diversity and women empowerment")
    st.markdown("<br>", unsafe_allow_html=True)
    feature_card("βš–οΈ", "Legal Rights", "Know your rights! Access information about laws protecting women")

with col3:
    feature_card("πŸ“š", "Education & Skills", "Free courses, certifications, and resources to boost your career")
    st.markdown("<br>", unsafe_allow_html=True)
    feature_card("⭐", "Success Stories", "Be inspired by amazing stories of women who overcame challenges")

st.markdown("<br>", unsafe_allow_html=True)

# ==================== INTERACTIVE POLL (EQUAL HEIGHT FIX) ====================
st.markdown("## πŸ—³οΈ What's your focus today?")
col_poll, col_news = st.columns([2, 1])

# --- LEFT COLUMN (POLL) ---
with col_poll:
    with st.container(border=True):
        goal = st.radio(
            "Select your main goal:", 
            ["Finding a Job πŸ’Ό", "Learning a New Skill πŸ“š", " Improving Health ❀️", "Finding a Mentor πŸ‘₯"], 
            horizontal=True
        )
        
        # Added spacers to match the height of the right column
        st.markdown("<br>" * 2, unsafe_allow_html=True)
        
        if st.button("πŸš€ Let's Go!", use_container_width=True):
            if "Job" in goal: st.switch_page("pages/jobs.py")
            elif "Skill" in goal: st.switch_page("pages/education.py")
            elif "Health" in goal: st.switch_page("pages/health.py")
            elif "Mentor" in goal: st.switch_page("pages/mentorship.py")

# --- RIGHT COLUMN (NEWSLETTER) ---
with col_news:
    with st.container(border=True):
        # Reduced padding from 25px to 15px to save vertical space
        st.markdown("""
            <div style="background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); padding: 15px; border-radius: 10px; text-align: center; margin-bottom: 10px;">
                <h4 style="margin:0; color:#333;">πŸ’Œ Join Newsletter</h4>
                <p style="font-size:12px; color:#555; margin: 5px 0 0 0;">Weekly updates & jobs.</p>
            </div>
        """, unsafe_allow_html=True)
        
        email = st.text_input("Enter Email", placeholder="you@example.com", label_visibility="collapsed")
        
        if st.button("Subscribe", use_container_width=True):
            if email: 
                st.success("Subscribed!")
                st.balloons()
            else: 
                st.warning("Enter valid email")


# ==================== QUICK ACTIONS ====================
st.markdown("## πŸš€ Quick Actions")
col1, col2, col3, col4 = st.columns(4)

with col1:
    if st.button("πŸ†˜ Emergency Help", use_container_width=True): st.switch_page("pages/safety.py")
with col2:
    if st.button("πŸ” Find Jobs", use_container_width=True): st.switch_page("pages/jobs.py")
with col3:
    if st.button("πŸ“– Browse Courses", use_container_width=True): st.switch_page("pages/education.py")
with col4:
    if st.button("πŸ‘₯ Find Mentor", use_container_width=True): st.switch_page("pages/mentorship.py")

st.markdown("<br>", unsafe_allow_html=True)

# ==================== TESTIMONIALS ====================
st.markdown("## πŸ’¬ What Women Are Saying")
col1, col2, col3 = st.columns(3)

with col1:
    st.markdown("""
        <div class="testimonial-card">
            <p style="font-style: italic; color: #666; line-height: 1.8; margin-bottom: 15px;">
                "This platform helped me find my dream job and connected me with an amazing mentor. Forever grateful!"
            </p>
            <p style="color: #667eea; font-weight: 600;">- Priya S., Software Engineer</p>
        </div>
    """, unsafe_allow_html=True)

with col2:
    st.markdown("""
        <div class="testimonial-card">
            <p style="font-style: italic; color: #666; line-height: 1.8; margin-bottom: 15px;">
                "The free courses here helped me transition from housewife to freelance designer. Now I support my family!"
            </p>
            <p style="color: #667eea; font-weight: 600;">- Anita M., Graphic Designer</p>
        </div>
    """, unsafe_allow_html=True)

with col3:
    st.markdown("""
        <div class="testimonial-card">
            <p style="font-style: italic; color: #666; line-height: 1.8; margin-bottom: 15px;">
                "The emergency resources and legal information gave me the courage to stand up for my rights."
            </p>
            <p style="color: #667eea; font-weight: 600;">- Rekha T., Legal Advocate</p>
        </div>
    """, unsafe_allow_html=True)

st.markdown("<br>", unsafe_allow_html=True)

# ==================== FOOTER CALL TO ACTION (REDESIGNED) ====================
st.markdown("<br>", unsafe_allow_html=True)

# Container for the banner
with st.container():
    st.markdown("""
        <div style="
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 50px;
            border-radius: 20px;
            text-align: center;
            color: white;
            box-shadow: 0 10px 30px rgba(118, 75, 162, 0.3);
            margin-top: 20px;
        ">
            <h1 style="color: white; margin-bottom: 15px; font-size: 36px;">πŸš€ Ready to Start Your Journey?</h1>
            <p style="font-size: 18px; margin-bottom: 30px; opacity: 0.9;">
                Join thousands of women who are transforming their lives today.
            </p>
        </div>
    """, unsafe_allow_html=True)

    # Centering the button using columns
    c1, c2, c3 = st.columns([1.5, 1, 1.5])
    with c2:
        # Negative margin pulls the button up into the banner visually
        st.markdown('<div style="margin-top: -25px;"></div>', unsafe_allow_html=True)
        if st.button("✨ Get Started Now", type="primary", use_container_width=True):
            st.balloons()
            st.toast("Welcome aboard! Use the sidebar to navigate πŸ‘ˆ")

# ==================== END OF HOME PAGE ====================