@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/*
    Bayanihan Hub landing page styles
    Flow: index.php loads this file first, then assets/js/index.js controls modals,
    role selection, and the password visibility toggle.
*/

:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-deep: #065f46;
    --accent: #10b981;
    --accent-soft: #d1fae5;
    --bg: #f3f8f6;
    --surface: #ffffff;
    --surface-soft: #ecfdf5;
    --text: #0f172a;
    --muted: #475569;
    --border: #d7e5df;
    --shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.07);
    --radius: 16px;
}

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

html,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body.index-page {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.index-page a {
    text-decoration: none;
}

.section-container {
    width: min(100% - 40px, 1180px);
    margin: 0 auto;
}

/* Top navigation: keeps login and register actions visible on every screen. */
.index-page .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 52px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.index-page .logo,
.index-page .nav-links,
.footer-logo {
    display: flex;
    align-items: center;
}

.index-page .logo {
    gap: 12px;
    white-space: nowrap;
}

.index-page .site-logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.index-page .logo span {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-deep);
}

.index-page .nav-links {
    gap: 14px;
}

.index-page .nav-text-btn,
.index-page .inline-link-btn {
    background: transparent;
    border: none;
    color: var(--primary-deep);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.index-page .nav-text-btn:hover,
.index-page .inline-link-btn:hover {
    color: var(--primary);
}

/* Shared button system. */
.index-page .btn-primary,
.index-page .btn-light,
.index-page .modal-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.index-page .btn-primary,
.index-page .modal-submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(5, 150, 105, 0.22);
}

.index-page .btn-primary {
    padding: 11px 20px;
    font-size: 15px;
}

.index-page .modal-submit-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    font-size: 15px;
}

.index-page .btn-primary:hover,
.index-page .modal-submit-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-deep));
}

.index-page .btn-light {
    background: #ffffff;
    color: var(--primary-deep) !important;
    padding: 13px 22px;
}

.index-page .btn-light:hover {
    background: var(--surface-soft);
}

.index-page .btn-lg {
    min-width: 180px;
}

/* HERO */
.index-page .hero {
    height: 620px;
    background: url('../images/hero.jpg') center center / cover no-repeat;
    position: relative;
    overflow: hidden;
}

.index-page .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(6, 95, 70, 0.12) 0%,
        rgba(255, 255, 255, 0.18) 55%,
        rgba(255, 255, 255, 0.45) 82%,
        rgba(255, 255, 255, 0.82) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.index-page .hero-content {
    max-width: 900px;
    text-align: center;
    padding: 26px 34px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.index-page .hero h1 {
    font-size: 58px;
    font-weight: 700;
    line-height: 1.05;
    color: #065f46;
}

.index-page .hero p {
    margin-top: 14px;
    font-size: 18px;
    line-height: 1.55;
    color: #1f2937;
}

.index-page .hero-buttons {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.index-page .hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 230px;
    width: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 42%,
        rgba(255, 255, 255, 0.75) 72%,
        #ffffff 100%
    );
    pointer-events: none;
}

/* Compact statistic strip below the hero. */
.index-page .stats {
    padding: 44px 52px;
    background: var(--surface);
}

.index-page .stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.index-page .stat {
    padding: 18px 12px;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.index-page .stat-icon,
.index-page .card-icon,
.index-page .circle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.index-page .stat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: var(--primary);
    color: #ffffff;
}

.index-page svg {
    fill: none;
    stroke: currentColor;
}

.index-page .stat-icon svg {
    width: 24px;
    height: 24px;
}

.index-page .stat h2 {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary-deep);
}

.index-page .stat p,
.index-page .card p,
.index-page .step p,
.index-page .subtitle {
    color: var(--muted);
    line-height: 1.55;
}

/* Feature and step sections: explains what the system does. */
.index-page .features,
.index-page .steps {
    padding: 54px 52px;
    text-align: center;
}

.index-page .features {
    background: var(--bg);
}

.index-page .features h2,
.index-page .steps h2 {
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
    color: var(--text);
}

.index-page .subtitle {
    margin: 10px auto 28px;
    font-size: 16px;
    max-width: 680px;
}

.index-page .feature-grid,
.index-page .step-grid {
    display: grid;
    gap: 20px;
}

.index-page .feature-grid {
    grid-template-columns: repeat(2, 1fr);
}

.index-page .step-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 28px;
}

.index-page .card,
.index-page .step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.index-page .card {
    padding: 22px;
    text-align: left;
}

.index-page .card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
}

.index-page .card-icon svg {
    width: 21px;
    height: 21px;
}

.index-page .card h3,
.index-page .step h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 7px;
}

.index-page .step {
    padding: 22px 18px;
}

.index-page .circle {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    font-weight: 800;
}

/* CTA and footer: final conversion area and site links. */
.index-page .cta {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary), var(--accent));
    padding: 54px 20px;
    text-align: center;
}

.index-page .cta h2 {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 800;
    color: #ffffff;
}

.index-page .cta p {
    margin: 10px auto 0;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.55;
    max-width: 720px;
}

.index-footer {
    background: #0f2f28;
    color: #cbd5e1;
    padding: 42px 70px 18px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 42px;
}

.footer-logo {
    gap: 10px;
    margin-bottom: 10px;
}

.footer-logo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.footer-logo span,
.footer-links-section h4 {
    color: #ffffff;
    font-weight: 800;
}

.footer-logo span {
    font-size: 21px;
}

.footer-brand p,
.footer-links-section a,
.footer-bottom {
    color: #a7b7b0;
    font-size: 14px;
}

.footer-brand p {
    line-height: 1.55;
    max-width: 320px;
}

.footer-links-section h4 {
    font-size: 16px;
    margin-bottom: 12px;
}

.footer-links-section a {
    display: block;
    margin-bottom: 7px;
    transition: 0.2s;
}

.footer-links-section a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    margin-top: 32px;
    padding-top: 14px;
    text-align: center;
}

/* Modal system: hidden by default; JS adds .show to open it. */
body.modal-open {
    overflow: hidden;
}

.index-page .modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.index-page .modal-overlay.show {
    display: flex;
    opacity: 1;
}

.index-page .auth-modal {
    width: min(100%, 450px);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 22px;
    padding: 26px 26px 24px;
    position: relative;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
    transform: scale(0.96);
    transition: transform 0.2s ease;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.index-page .modal-overlay.show .auth-modal {
    transform: scale(1);
}

.index-page .auth-modal::-webkit-scrollbar {
    display: none;
}

.index-page .register-modal {
    max-width: 600px;
}

.index-page .modal-close {
    position: absolute;
    top: 13px;
    right: 15px;
    border: none;
    background: var(--surface-soft);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 24px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.index-page .auth-modal-header {
    text-align: center;
    margin-bottom: 18px;
}

.index-page .auth-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.index-page .auth-modal-header p,
.index-page .modal-register-text {
    font-size: 14px;
    color: var(--muted);
}

.index-page .error-text {
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.index-page .auth-form .form-group {
    margin-bottom: 14px;
}

.index-page .auth-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.index-page .auth-form input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font: inherit;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

.index-page .auth-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

/* Password visibility toggle: JS switches input type and icon state. */
.password-toggle-wrap {
    position: relative;
    width: 100%;
}

.password-toggle-wrap input[type="password"],
.password-toggle-wrap input[type="text"] {
    padding-right: 48px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--primary-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.password-toggle-btn:hover {
    background: var(--accent-soft);
    border-color: var(--primary);
}

.password-toggle-btn:focus {
    outline: 2px solid rgba(5, 150, 105, 0.35);
    outline-offset: 2px;
}

.password-toggle-btn svg,
.eye-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.index-page .role-selector,
.index-page .register-role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.index-page .role-selector {
    margin-bottom: 18px;
}

.index-page .role-btn,
.index-page .register-role-card {
    border: 1.5px solid var(--border);
    border-radius: 15px;
    background: var(--surface-soft);
    color: var(--muted);
    transition: 0.2s ease;
}

.index-page .role-btn {
    min-height: 58px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.index-page .role-btn:hover,
.index-page .register-role-card:hover,
.index-page .role-btn.active {
    border-color: var(--primary);
    background: var(--accent-soft);
    color: var(--primary-deep);
}

.index-page .role-btn.active {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.10);
}

.index-page .modal-register-text {
    margin-top: 14px;
    text-align: center;
}

.index-page .register-role-card {
    display: block;
    padding: 20px 18px;
}

.index-page .register-role-card h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.index-page .register-role-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-success-message,
.auth-error-message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.auth-success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-error-message {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

@media (max-width: 900px) {
    .index-page .stats-container,
    .index-page .feature-grid,
    .index-page .step-grid,
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .section-container {
        width: min(100% - 28px, 1180px);
    }

    .index-page .navbar,
    .index-page .features,
    .index-page .steps,
    .index-page .stats,
    .index-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .index-page .navbar,
    .index-page .stats-container,
    .index-page .feature-grid,
    .index-page .step-grid,
    .footer-container,
    .index-page .register-role-grid,
    .index-page .role-selector {
        grid-template-columns: 1fr;
    }

    .index-page .navbar {
        flex-direction: column;
        gap: 12px;
    }

    .index-page .hero {
        height: auto;
        min-height: 520px;
    }

    .index-page .hero-content {
        padding: 22px 18px;
    }

    .index-page .nav-links {
        width: 100%;
        justify-content: center;
    }

    .index-page .auth-modal {
        padding: 24px 18px 20px;
        border-radius: 20px;
    }
}


/* final polish patch */
.profile-avatar img,.org-profile-mini img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.org-profile-mini{width:54px;height:54px;border-radius:18px;background:#eafaf1;border:1px solid #b9efd1;display:grid;place-items:center;font-weight:900;color:#087a46;margin-right:12px;flex:0 0 auto}.section-head{align-items:center}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.compact-table-wrap,.table-card,.volunteer-table-wrap{overflow-x:visible!important}.compact-table,.volunteer-table{min-width:0!important;width:100%!important;table-layout:auto}.volunteer-table th,.volunteer-table td,.compact-table th,.compact-table td{white-space:normal!important}.attendance-hours-input{max-width:110px}.terms-link{border:0;background:transparent;color:#087a46;font-weight:900;text-decoration:underline;cursor:pointer;padding:0}.terms-modal{position:fixed;inset:0;background:rgba(15,23,42,.58);display:none;align-items:center;justify-content:center;z-index:9999;padding:24px}.terms-modal.is-open{display:flex}.terms-modal-card{background:#fff;width:min(760px,96vw);max-height:82vh;overflow:auto;border-radius:24px;padding:30px;box-shadow:0 24px 70px rgba(15,23,42,.26);color:#0f172a}.terms-modal-card h2{margin:0 0 14px;color:#064e3b}.terms-modal-card p{line-height:1.7;color:#475569}.terms-modal-close{float:right;width:42px;height:42px;border-radius:14px;border:1px solid #dbe6ef;background:#fff;font-size:26px;cursor:pointer}.auth-form-grid .full-row{grid-column:1/-1}@media(max-width:1100px){.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.summary-grid{grid-template-columns:1fr}}
