/* Council for African Development - Main Stylesheet */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    color: #333;
    direction: ltr;
}

body[dir="rtl"] {
    direction: rtl;
}

body[dir="rtl"] .timeline::before {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

body[dir="rtl"] .timeline-item:nth-child(odd) {
    margin-right: 0;
    margin-left: auto;
    text-align: left;
    padding-left: 3rem;
    padding-right: 0;
}

body[dir="rtl"] .timeline-item:nth-child(even) {
    margin-right: 55%;
    margin-left: 0;
    text-align: right;
    padding-right: 3rem;
    padding-left: 0;
}

body[dir="rtl"] .timeline-item:nth-child(odd)::before {
    left: -10px;
    right: auto;
}

body[dir="rtl"] .timeline-item:nth-child(even)::before {
    right: -10px;
    left: auto;
}

header {
    background-color: #8B6914;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px,
            transparent 1px, transparent 12px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px,
            transparent 1px, transparent 12px
        ),
        linear-gradient(135deg, #8B6914 0%, #D4AF37 100%);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 48px;
    width: auto;
}

.vision-logo-row {
    width: 100%;
    height: 240px;
    background-image: url('../images/cad-logo-wh.png');
    background-repeat: repeat-x;
    background-size: auto 240px;
    background-position: center;
    margin-bottom: 1.5rem;
}

.site-title {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover, nav a.active {
    background-color: rgba(255,255,255,0.2);
}

.language-selector {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.language-selector button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid white;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.language-selector button:hover, .language-selector button.active {
    background: white;
    color: #8B6914;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s;
}

#heritage {
    background-image:
        linear-gradient(rgba(255,255,255,0.78), rgba(255,255,255,0.78)),
        url('../images/heritage-bg2.png');
    background-size: auto, 110%;
    background-position: 0 0, center top;
    background-repeat: no-repeat, no-repeat;
    background-attachment: scroll, scroll;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    color: #8B6914;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    color: #8B6914;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

.independence-banner {
    background: linear-gradient(135deg, #8B6914 0%, #D4AF37 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    text-align: center;
}

.independence-banner h2 {
    color: white;
    margin-bottom: 1rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8B6914 0%, #D4AF37 100%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    width: 45%;
}

.timeline-item:nth-child(odd) {
    margin-left: 0;
    text-align: right;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    margin-left: 55%;
    text-align: left;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #D4AF37;
    border: 4px solid white;
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 0 4px #8B6914;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-content {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    color: #8B6914;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: #D4AF37;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.goals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.goal-card {
    display: flex;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    min-height: 440px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: all 0.3s;
}

.goal-card:nth-child(odd) {
    justify-content: flex-start;
    border-left: 5px solid #D4AF37;
}

.goal-card:nth-child(even) {
    justify-content: flex-end;
    border-right: 5px solid #D4AF37;
}

.goal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-content {
    background: rgba(255,255,255,0.92);
    padding: 2rem;
    width: 45%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 {
    color: #8B6914;
    margin-bottom: 0.75rem;
}

.goal-card-ai {
    background-image: url('../images/aiteam.png');
}

.goal-card-trade {
    background-image: url('../images/tradegirls2.png');
}

.goal-card-education {
    background-image: url('../images/educ.png');
}

.goal-card-innovation {
    background-image: url('../images/vials81.png');
}

.goal-card-infra {
    background-image: url('../images/infras10.png');
}

.goal-card-partners {
    background-image: url('../images/partnersimage_1779118611917.png');
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border-top: 5px solid #D4AF37;
    transition: all 0.3s;
    background-size: cover;
    background-position: center;
    min-height: 260px;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.tool-card-fund {
    background-image:
        linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.82)),
        url('../images/wealth779118912615.png');
}

.tool-card-think {
    background-image:
        linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.82)),
        url('../images/thinkimage_1779119455785.png');
}

.tool-card-conference {
    background-image:
        linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.82)),
        url('../images/podium mage_1779120034356.png');
}

.tool-card-assembly {
    background-image:
        linear-gradient(rgba(255,255,255,0.82), rgba(255,255,255,0.82)),
        url('../images/stadium image_1779120373179.png');
}

.form-section {
    max-width: 600px;
    margin: 2rem auto;
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8B6914;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #D4AF37;
}

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

.btn {
    background: linear-gradient(135deg, #8B6914 0%, #D4AF37 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 105, 20, 0.3);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Accordion */
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    border: 1px solid #e0d5b0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, #f9f5e8 0%, #fff 100%);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8B6914;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #f0e8c8 0%, #faf5e4 100%);
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: #D4AF37;
    transition: transform 0.3s;
    line-height: 1;
}

.accordion-item.open .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid #e0d5b0;
    background: white;
}

.accordion-item.open .accordion-content {
    display: block;
    animation: fadeIn 0.3s;
}

.team-placeholder {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

/* Publications */
.pub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0d5b0;
    margin-bottom: 2rem;
}

.pub-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.8rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #888;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.pub-tab:hover {
    color: #8B6914;
}

.pub-tab.active {
    color: #8B6914;
    border-bottom-color: #D4AF37;
}

.pub-content {
    display: none;
}

.pub-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.pub-placeholder {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 4rem 0;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #333;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px,
            transparent 1px, transparent 12px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.06) 0px, rgba(255,255,255,0.06) 1px,
            transparent 1px, transparent 12px
        );
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    margin: 0.5rem 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        margin-left: 0 !important;
        text-align: left !important;
        padding-left: 70px !important;
        padding-right: 0 !important;
    }

    .timeline-item::before {
        left: 20px !important;
    }

    nav {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}
