/* =========================================================
   GLOBAL STYLES – Yuva Samaj Sewa Rautahat
   Professional NGO Website with Yellow + Black Theme
   ========================================================= */

:root {
    --primary-color: #F4D03F;
    --secondary-color: #000;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fafafa;
    --bg-light: #f7f7f7;
    --white: #ffffff;
    --shadow: 0 4px 14px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    background: var(--bg-color);
    line-height: 1.7;
    color: var(--text-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ===========================
   CONTAINER
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   HEADER / NAVIGATION
   =========================== */
header {
    background: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-container {
    flex-shrink: 0;
}

.logo-container img {
    height: 75px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 18px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(0,0,0,0.2);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../images/bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero p {
    color: var(--white);
    font-size: clamp(18px, 2.5vw, 22px);
    margin-top: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* ===========================
   SECTION STYLES
   =========================== */
.section {
    padding: 80px 20px;
}

.section-intro {
    max-width: 900px;
    margin: 20px auto 40px;
    text-align: center;
    font-size: 17px;
    color: var(--text-light);
}

.section h2 {
    text-align: center;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section p {
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
    font-size: 17px;
    line-height: 1.8;
}

/* ===========================
   CARD STYLES
   =========================== */
.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px;
    max-width: 320px;
    display: inline-block;
    vertical-align: top;
    transition: var(--transition);
    text-align: left;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover img {
    transform: scale(1.05);
}

.card h3, .card h2, .card h4 {
    padding: 15px 20px 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.card p {
    padding: 0 20px 15px;
    margin: 0;
    text-align: left;
    font-size: 15px;
    line-height: 1.6;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form-container,
.contact-info-container {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-form h3,
.contact-info-container h3 {
    margin-bottom: 25px;
    font-size: 24px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(244, 208, 63, 0.1);
}

.contact-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.contact-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.contact-card h4 {
    margin: 10px 0;
    font-size: 18px;
}

.contact-card p {
    margin: 0;
    color: var(--text-light);
}

.contact-card a {
    color: var(--secondary-color);
    font-weight: 600;
}

.contact-card a:hover {
    color: var(--primary-color);
}

.map-container {
    margin-top: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.map-container h3 {
    text-align: center;
    margin-bottom: 20px;
}

/* ===========================
   ALERTS
   =========================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===========================
   PROGRAM DETAILS SECTION
   =========================== */
.program-details {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: var(--shadow);
}

.program-details h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

.program-details p {
    margin: 12px 0;
    font-size: 16px;
    line-height: 1.6;
}

.program-details strong {
    color: var(--text-color);
    font-weight: 600;
}

/* ===========================
   PROGRAM DETAIL IMAGE GRID
   =========================== */
.program-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px 0;
}

.program-gallery img {
    width: calc(33.333% - 14px);
    max-width: 350px;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
}

.program-gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    font-size: 20px;
}

.footer-section p {
    margin: 10px 0;
    line-height: 1.8;
    text-align: left;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: var(--primary-color);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-links a {
    display: inline-block;
    margin: 10px 10px 10px 0;
    padding: 10px 15px;
    background: rgba(244, 208, 63, 0.1);
    border-radius: 6px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(244, 208, 63, 0.2);
    margin-top: 30px;
}

.footer-bottom p {
    margin: 10px 0;
    font-size: 14px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        display: none;
    }

    .main-nav.active {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .hero {
        min-height: 60vh;
        padding: 40px 20px;
    }

    .hero h1 {
        padding: 20px 25px;
        font-size: 28px;
    }

    .section {
        padding: 50px 20px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .program-gallery {
        gap: 15px;
    }

    .program-gallery img {
        width: calc(50% - 8px);
        height: 220px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card {
        max-width: 100%;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
        padding: 15px 20px;
    }

    .hero p {
        font-size: 16px;
    }

    .section h2 {
        font-size: 24px;
    }

    .program-gallery {
        gap: 15px;
    }

    .program-gallery img {
        width: 100%;
        max-width: 100%;
        height: 200px;
    }

    .contact-form-container,
    .contact-info-container {
        padding: 20px;
    }
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===========================
   ACCESSIBILITY
   =========================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
