/* MUFEPREC - Main CSS File */
/* File Location: css/main.css */

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #0056b3;
    --secondary-color: #f8f9fa; 
    --accent-color: #ffc107;
    --success-color: #28a745;
    --text-color: #333;
    --light-text: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

/* ===== GLOBAL RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f4f4;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: var(--gradient);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(0, 86, 179, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
    order: 1;
}

.logo:hover {
    color: var(--accent-color);
}

/* Navigation */
nav {
    order: 2;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover {
    background-color: rgba(255, 193, 7, 0.8);
    color: var(--text-color);
    transform: translateY(-2px);
}

nav ul li a.active {
    background-color: var(--accent-color);
    color: var(--text-color);
    font-weight: 600;
}

/* Ensure active state is visible and persistent */
nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 1px;
}

/* Mobile menu toggle - FIXED: moved to extreme right */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    order: 3; /* Ensures it's positioned at the end */
    margin-left: auto;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION WITH BACKGROUND IMAGE ===== */
.hero {
    background: url('../images/commuinity.jpg') center/cover no-repeat;
    color: whitesmoke;
    text-align: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh; /* Ensures good height */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.75) 0%, rgba(0, 68, 148, 0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Better text visibility */
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    animation: fadeInUp 1s ease-out 0.2s both;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Better text visibility */
}
.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    animation: fadeInUp 1s ease-out 0.2s both;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ===== QUICK CONTACT BAR ===== */
.quick-contact {
    background: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.contact-item i {
    color: var(--primary-color);
    width: 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background: #e0a800;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* FIXED: Better visibility for WhatsApp and contact buttons */
.btn-whatsapp {
    background: #25D366 !important;
    color: white !important;
    border: 2px solid #25D366 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background: #128C7E !important;
    border-color: #128C7E !important;
    color: white !important;
    transform: translateY(-3px);
}

/* FIXED: Contact buttons visibility */
.btn-contact {
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid var(--primary-color) !important;
}

.btn-contact:hover {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--text-color) !important;
    transform: translateY(-3px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-title p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: #666;
}

/* ===== PROGRAMS SECTION ===== */
.programs {
    background: var(--secondary-color);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.program-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.program-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.program-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.program-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* FIXED: Program features now left-aligned */
.program-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left; /* Changed from center to left */
}

.program-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.program-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== RESOURCE MATERIALS SECTION (NEW) ===== */
.resource-materials {
    background: white;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-item {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.resource-image {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.resource-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== WHY CHOOSE US SECTION ===== */
.why-choose-us {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: var(--gradient);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SHARE BUTTON POSITIONING FIX ===== */
.share-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.share-button:hover {
    background: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-3px);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-3px);
}

.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    width: 20px;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* ===== SCROLLING SECTIONS FIX ===== */
.about-sections {
    position: relative;
    z-index: 10;
}

.mission-vision-values {
    position: relative;
    z-index: 5;
    background: white;
    margin-top: 2rem;
    padding-top: 2rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.program-card.animate-element {
    transition-delay: 0.1s;
}

.program-card:nth-child(2).animate-element {
    transition-delay: 0.2s;
}

.program-card:nth-child(3).animate-element {
    transition-delay: 0.3s;
}

.program-card:nth-child(4).animate-element {
    transition-delay: 0.4s;
}

.resource-item.animate-element {
    transition-delay: 0.2s;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

.menu-open {
    overflow: hidden;
}

.skip-link:focus {
    top: 6px !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-color);
        border-radius: 0;
        margin: 0;
        padding: 2rem 1rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        width: 100%;
        padding: 1rem;
    }
    
    nav ul li a.active::after {
        display: none; /* Hide underline on mobile */
    }
    
    .nav-container {
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-items {
        justify-content: center;
        text-align: center;
    }
    
    .contact-item {
        margin-bottom: 1rem;
    }
    
    .programs-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-button {
        bottom: 10px;
        right: 10px;
        padding: 10px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .program-card,
    .feature-item,
    .resource-item {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .share-button {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* ===== NOTIFICATION STYLES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show { 
    transform: translateX(0); 
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
}

.notification-success { 
    border-left: 4px solid #28a745; 
}

.notification-error { 
    border-left: 4px solid #dc3545; 
}

.notification-info { 
    border-left: 4px solid #007bff; 
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    color: #666;
}

.notification-close:hover { 
    color: #333; 
}

@media (max-width: 480px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show { 
        transform: translateY(0); 
    }
}