/* ----------------------------------
   CSS Variables (CDP Africa Brand)
----------------------------------- */
:root {
    /* Brand Colors extracted from cdpafrica.org */
    --cdp-primary-green: #005745;
    --cdp-secondary-green: #00B451;
    --cdp-accent-gold: #FFB548;
    --cdp-accent-gold-hover: #e59f35;
    --cdp-accent-red: #F5333F;
    --cdp-text-light: #ffffff;
    --cdp-text-dark: #333333;
    --cdp-text-muted: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    /* Typography */
    --font-heading: 'Roboto Condensed', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Layout */
    --border-radius-sharp: 0px; /* CDP uses sharp corners */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ----------------------------------
   Reset & Base Styles
----------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--cdp-text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--cdp-primary-green);
    text-transform: uppercase;
}

.section-header p {
    color: var(--cdp-text-muted);
    font-size: 1.125rem;
}

/* ----------------------------------
   Buttons
----------------------------------- */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius-sharp);
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--cdp-accent-gold);
    color: var(--cdp-text-dark);
}

.btn-primary:hover {
    background-color: var(--cdp-accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 181, 72, 0.3);
}

.btn-secondary {
    background-color: var(--cdp-primary-green);
    color: var(--cdp-text-light);
}

.btn-secondary:hover {
    background-color: var(--cdp-secondary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 87, 69, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--cdp-text-light);
    border: 2px solid var(--cdp-text-light);
}

.btn-outline:hover {
    background-color: var(--cdp-text-light);
    color: var(--cdp-primary-green);
}

.btn-full {
    width: 100%;
    display: block;
}

/* ----------------------------------
   Hero Section
----------------------------------- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Placeholder background image, replace with a real event or CDP photo */
    background-image: url('https://images.unsplash.com/photo-1540575467063-1d200632b9ea?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: var(--cdp-text-light);
    overflow: hidden;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CDP Africa specific green overlay */
    background-color: rgba(0, 87, 69, 0.85); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--cdp-accent-gold);
}

.hero h1 {
    font-size: 3.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.event-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.event-details .detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px; /* Slight radius here for UI softness */
    backdrop-filter: blur(4px);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ----------------------------------
   Document Grid
----------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-white);
    padding: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border-radius: var(--border-radius-sharp);
    transition: var(--transition-smooth);
}

.doc-card {
    text-align: center;
    border-top: 4px solid var(--cdp-primary-green);
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 87, 69, 0.1);
}

.doc-thumbnail {
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: #f0f0f0;
}

.doc-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: top;
    transition: transform var(--transition-smooth);
}

.doc-card:hover .doc-thumbnail img {
    transform: scale(1.05); /* Slight zoom on card hover */
}

.doc-card h3 {
    font-size: 1.25rem;
    color: var(--cdp-primary-green);
    margin-bottom: 0.5rem;
}

.doc-meta {
    font-size: 0.875rem;
    color: var(--cdp-text-muted);
    margin-bottom: 1.5rem;
}

/* ----------------------------------
   Registration Form
----------------------------------- */
.form-card {
    max-width: 600px;
    margin: 0 auto;
    border-top: 4px solid var(--cdp-accent-gold);
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .half {
    flex: 1;
}

label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--cdp-primary-green);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-sharp);
    background-color: var(--bg-light);
    transition: var(--transition-smooth);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--cdp-primary-green);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(0, 87, 69, 0.1);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

/* Success Message Styles */
#successMessage {
    text-align: center;
    padding: 2rem 0;
}

#successMessage.hidden {
    display: none;
}

.success-animation {
    margin: 0 auto 1.5rem;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: var(--cdp-primary-green);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--cdp-primary-green);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: var(--cdp-primary-green);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 40px rgba(0, 87, 69, 0.1);
    }
}

/* ----------------------------------
   Footer
----------------------------------- */
.footer {
    background-color: var(--cdp-primary-green);
    color: var(--cdp-text-light);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.875rem;
}

/* ----------------------------------
   Animations & Micro-interactions
----------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.scale-up { animation: scaleUp 0.5s ease-out forwards; }


/* ----------------------------------
   Responsive Design
----------------------------------- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-actions { flex-direction: column; }
    .event-details { flex-direction: column; gap: 1rem; }
    .form-row { flex-direction: column; gap: 0; }
    .section-header h2 { font-size: 2rem; }
}
