/* =========================================================
   AFRICA DEVELOPMENT NETWORK ESTONIA MTÜ
   Main Website Stylesheet — Fully Responsive & Clean
   ========================================================= */

/* 1. RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;
    color: #222;
    background: #ffffff;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font-family: inherit;
}

ul {
    padding-left: 1.2rem;
}

/* 2. VARIABLES */
:root {
    --primary: #0b6b4f;
    --primary-dark: #084d3a;
    --secondary: #e5a629;
    --dark: #18221f;
    --text: #333333;
    --muted: #6b7280;
    --light: #f5f7f6;
    --white: #ffffff;
    --border: #e2e8e5;
    --max-width: 1180px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* 3. GLOBAL CONTAINER */
.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

/* 4. HEADER & NAV */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
/* HEADER LOGO AND BRANDING STYLES*/
.logo {
    display: flex;
    align-items: center;
    gap: 12 PX;
    text-decoration: none;
}

.logo img {
    width: auto;
    height: 48px;
    border-radius: 50%; /* Smooth circular round edge */
    mix-blend-mode: multiply; /* Blends light image backgrounds with header coloro */
    object-fit: contain;
}

.logo text {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-color, #ffffff);
    line-height: 1.2;
    max-width: 260px; /* Keeps text neatly stacked on smaller screen */
}
@media (max-width: 768px) {
    .logo-text {
        font-size: 0.9rem;
        max-width: 180px;
    }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a.nav-button,
.main-nav a.nav-button.active {
    padding: 0.7rem 1.05rem;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.main-nav a.nav-button:hover,
.main-nav a.nav-button.active:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 5. HEROES */
.hero {
    min-height: 550px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(8, 77, 58, 0.88), rgba(11, 107, 79, 0.88));
    color: var(--white);
}

.hero-content {
    padding: 5rem 0;
}

.eyebrow, .section-label {
    display: inline-block;
    margin-bottom: 0.8rem;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 850px;
    margin-bottom: 1.5rem;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    color: #ffffff;
}

.hero p {
    max-width: 720px;
    margin-bottom: 2rem;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
}

.page-hero {
    padding: 5.5rem 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

.page-hero h1 {
    max-width: 850px;
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    line-height: 1.1;
    color: #ffffff;
}

.page-hero p {
    max-width: 700px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* 6. BUTTONS */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.85rem 1.4rem;
    border-radius: 6px;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background: #d99518;
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn.btn-green {
    background: var(--primary);
    color: #ffffff;
}

.btn.btn-green:hover {
    background: var(--primary-dark);
}

/* 7. SECTIONS & TYPOGRAPHY */
.section {
    padding: 5rem 0;
}

.section-light {
    background: var(--light);
}

.section-heading, .section-title {
    max-width: 760px;
    margin: 0 auto 3rem;
    text-align: center;
}

.section-heading h2, .section-title h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.15;
    color: var(--dark);
}

.section-heading p, .section-title p {
    color: var(--muted);
}

h1, h2, h3, h4 {
    line-height: 1.2;
    color: var(--dark);
}

p {
    margin-bottom: 1rem;
}

/* 8. GRIDS & CARDS */
.two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem;
    align-items: start;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-number, .pillar-number {
    display: block;
    margin-bottom: 1rem;
    color: var(--secondary);
    font-weight: 900;
    font-size: 1.3rem;
}

.card p {
    color: var(--muted);
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.program-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}

.program-card p {
    color: var(--muted);
}

/* Pillar Grid (focus.html) */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.pillar-card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}

.pillar-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.pillar-card ul {
    margin-top: 1rem;
}

.pillar-card li {
    margin-bottom: 0.4rem;
    color: var(--muted);
}

/* 9. FACTS (about.html) */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.fact {
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.fact strong {
    display: block;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.fact span {
    color: var(--muted);
    font-size: 0.95rem;
}

/* 10. MEMBERSHIP & VOLUNTEER (get-involved.html) */
.membership-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.membership-card {
    height: 100%;
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.membership-card h2 {
    font-size: 1.6rem;
}

.membership-price {
    margin: 0.8rem 0;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}

.volunteer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.volunteer-card {
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* 11. BANK DETAILS & FORM */
.bank-details {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--light);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
}

.bank-details h3 {
    margin-bottom: 1.2rem;
}

.bank-details p {
    margin-bottom: 0.8rem;
    overflow-wrap: anywhere;
}

.bank-details strong {
    display: block;
    color: var(--dark);
}

.form-card {
    padding: 2.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-card > p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.form-group {
    width: 100%;
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--dark);
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 0.9rem;
    font-size: 16px; /* Essential for mobile iOS zoom prevention */
    color: var(--dark);
    border: 1px solid #ccd5d1;
    border-radius: 6px;
    background: var(--white);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

.consent-group {
    margin-top: 1.2rem;
}

.consent-label {
    display: flex !important;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 400 !important;
}

.consent-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin-top: 0.15rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.consent-label span {
    font-size: 0.95rem;
    color: var(--text);
}

.form-submit {
    width: 100%;
    margin-top: 0.5rem;
}

/* 12. BOARD OF DIRECTORS */
.board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}

.board-card {
    background: #ffffff;
    border: 1px solid #e1e8e4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.board-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.board-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.board-content {
    padding: 1.5rem;
}

.board-content h3 {
    color: #173c2b;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.board-role {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

/* 13. EVENTS CAROUSEL */
.events-section {
    background: #ffffff;
}

.event-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.event-track {
    display: flex;
    transition: transform 0.5s ease;
    touch-action: pan-y;
}

.event-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: #f3f6f4;
}

.event-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.event-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
}

.event-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.event-prev { left: 15px; }
.event-next { right: 15px; }

.event-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
}

.event-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.event-dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

/* 14. CTA & CLOSING */
.cta {
    padding: 4.5rem 0;
    background: var(--primary);
    color: var(--white);
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cta h2 {
    color: #ffffff;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
}

.closing {
    padding: 4.5rem 0;
    background: var(--dark);
    color: var(--white);
    text-align: center;
}

.closing p {
    max-width: 850px;
    margin: 0 auto;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.35;
    font-weight: 700;
    color: #ffffff;
}

/* 15. FOOTER */
.site-footer {
    background: #111815;
    color: rgba(255, 255, 255, 0.8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding: 3.5rem 0;
}

.site-footer h3, .site-footer h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
}

.site-footer a {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
}

.site-footer a:hover {
    color: var(--secondary);
}

.social-links-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0.8rem;
}

.social-links-footer a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff !important; /*forces icon to stay light*/
    transition: all 0.2s ease-in-out;
}

.social-links-footer a:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Constraints SVG sizing inside the button */
.social-links-footer svg {
    width: 18px !important;
    height: 18px !important;
    fill: #ffffff !important; /*Makes icon paths pure white*/
    display: block;
}
.social-links-footer svg path,
.social-links-footer svg rect,
.social-links-footer svg circle {
    fill: #ffffff !important;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   16. RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 992px) {
    .card-grid, .board-grid, .volunteer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0.8rem;
    }
    .main-nav {
        width: 100%;
        justify-content: center;
        gap: 0.4rem 0.8rem;
    }
    .main-nav a {
        font-size: 0.88rem;
        padding: 0.3rem 0.4rem;
    }
    .two-column, .program-grid, .membership-grid, .pillar-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .cta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .event-slide {
        height: 320px;
    }
}

@media (max-width: 580px) {
    .card-grid, .volunteer-grid, .board-grid, .footer-grid {
        grid-template-columns: 1fr;
    }
    .form-card, .membership-card, .volunteer-card, .bank-details {
        padding: 1.4rem;
    }
    .btn {
        width: 100%;
    }
    .hero-buttons {
        width: 100%;
    }
}

/* Ensure footer social icons stay constrained and white */
.social-links-footer {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

.social-links-footer a {
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.social-links-footer svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}