:root {
    --primary-green: #2E8B57; /* SeaGreen - Forest */
    --earth-color: #A0522D;   /* Sienna - Dry Earth */
    --ocean-blue: #0077be;    /* Ocean - Mangroves */
    --turquoise-color: #00CED1; /* Dark Turquoise for Donate */
    --dark-text: #333;
    --light-green-bg: #e8f5e9;
    --light-blue-bg: #e3f2fd;
    --light-orange-bg: #fff3e0;
    --light-gray-bg: #f8f9fa;
}

/* Основные настройки тела страницы */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Предотвращает горизонтальную прокрутку */
}

/* --- NAVIGATION --- */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 0; /* Чуть больше воздуха */
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-green) !important;
    display: flex;
    align-items: center;
    font-size: 1.2rem; /* Чуть меньше на всякий случай */
}
.navbar-brand img {
    margin-right: 10px;
    max-height: 45px;
    width: auto;
}

/* Стили ссылок меню (Desktop) */
.navbar-nav .nav-link {
    color: #555 !important;
    font-weight: 500;
    padding: 8px 15px !important;
    margin: 0 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: var(--primary-green);
    color: white !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-green) !important;
    font-weight: 700;
    background-color: rgba(46, 139, 87, 0.1);
}

/* Кнопка Donate */
.btn-donate-nav {
    background-color: var(--turquoise-color) !important;
    color: white !important;
    font-weight: 800;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.btn-donate-nav:hover {
    background-color: #008b8b !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

/* --- FOOTER --- */
footer {
    background-color: #222;
    color: #aaa;
    padding: 30px 0;
    margin-top: auto;
}

/* --- HERO SECTION (Главная) --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0; /* Desktop padding */
    text-align: center;
}
.hero-title {
    font-size: 3.5rem; /* Desktop font */
    font-weight: 800;
    margin-bottom: 20px;
}

/* --- PAGE HEADERS (Внутренние страницы) --- */
.page-header {
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    background-color: #555;
    margin-bottom: 30px;
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.page-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
}
.page-header .container {
    position: relative;
    z-index: 1;
}
.page-header h1 {
    font-weight: 800;
    font-size: 3rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.page-header .lead {
    font-size: 1.3rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* --- BUTTONS & CARDS --- */
.btn-primary-custom {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    padding: 10px 25px;
}
.btn-primary-custom:hover { background-color: #246d44; color: white; }

.btn-outline-light-custom {
    border: 2px solid white; color: white; padding: 10px 25px;
}
.btn-outline-light-custom:hover { background-color: white; color: var(--primary-green); }

.project-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    height: 100%;
    margin-bottom: 20px; /* Отступ снизу на мобильных */
}
.project-card:hover { transform: translateY(-5px); }
.card-img-top { height: 200px; object-fit: cover; }
.badge-invest { background-color: var(--primary-green); }
.badge-charity { background-color: var(--earth-color); }

/* --- ABOUT US BLOCKS --- */
.icon-box {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-right: 20px; font-size: 1.5rem;
}
.bg-icon-blue { background-color: #e3f2fd; color: #0d47a1; }
.bg-icon-green { background-color: #e8f5e9; color: #1b5e20; }
.bg-icon-lime { background-color: #f9fbe7; color: #827717; }
.bg-icon-cyan { background-color: #e0f7fa; color: #006064; }

.stat-card {
    transition: transform 0.3s ease;
    border: 1px solid #eaeaea;
    border-radius: 12px;
}
.card-title-custom {
    font-weight: 800; font-size: 1.2rem; margin-bottom: 10px; color: #333;
}
.card-text-custom {
    text-align: center; color: #666; font-size: 0.95rem; line-height: 1.6; margin-bottom: 0;
}

/* --- CENTERED SECTIONS --- */
.section-title {
    text-align: center;
    margin-bottom: 1rem;
}
.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

/* --- PROJECT CARDS CENTERED --- */
.project-card .card-body {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
}
.project-card .card-title {
    text-align: center;
}
.project-card .card-text {
    text-align: center;
    flex-grow: 1;
}
.project-card .badge {
    align-self: center;
}
.project-card .btn {
    margin-top: auto;
    align-self: center;
}

/* --- COLORED SECTIONS --- */
.section-green-light {
    background: linear-gradient(135deg, var(--light-green-bg) 0%, #c8e6c9 100%);
}
.section-blue-light {
    background: linear-gradient(135deg, var(--light-blue-bg) 0%, #bbdefb 100%);
}
.section-orange-light {
    background: linear-gradient(135deg, var(--light-orange-bg) 0%, #ffe0b2 100%);
}
.section-gradient-green {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
}


/* --- INVESTOR CARDS CENTERED --- */
.card.border-success .card-body,
.card.border-primary .card-body {
    text-align: center;
}
.card.border-success .card-body h5,
.card.border-primary .card-body h5 {
    text-align: center;
    justify-content: center;
}
.card.border-success .card-body p,
.card.border-primary .card-body p {
    text-align: center;
}

/* --- ABOUT PAGE CARDS --- */
.stat-card .card-title-custom {
    text-align: center;
}

/* =========================================
   MOBILE RESPONSIVENESS (АДАПТАЦИЯ)
   ========================================= */

/* Для планшетов и мобильных телефонов (ширина меньше 992px) */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: white;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        margin-top: 10px;
    }
    
    .navbar-nav .nav-link {
        margin: 5px 0; /* Отступы между пунктами меню вертикально */
        text-align: center; /* Центрируем текст меню */
    }
    
    .btn-donate-nav {
        display: block;
        width: 100%; /* Кнопка доната на всю ширину */
        margin-top: 10px;
        text-align: center;
    }
}

/* Для мобильных телефонов (ширина меньше 768px) */
@media (max-width: 768px) {
    
    /* Уменьшаем отступы и шрифты на Главном баннере */
    .hero-section {
        padding: 80px 0; 
    }
    .hero-title {
        font-size: 2.2rem; /* Уменьшаем шрифт заголовка */
        line-height: 1.2;
    }
    .lead {
        font-size: 1.1rem;
    }

    /* Уменьшаем заголовки внутренних страниц */
    .page-header {
        padding: 60px 0;
    }
    .page-header h1 {
        font-size: 2.2rem;
    }

    /* Адаптация кнопок на главной */
    .hero-section .d-flex {
        flex-direction: column; /* Кнопки встают друг под друга */
        width: 100%;
        padding: 0 20px;
    }
    .hero-section .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Секция "О нас" на главной */
    .ps-md-5 {
        padding-left: 0 !important; /* Убираем отступ слева */
        margin-top: 20px;
    }
    
    /* Карточки в About Us */
    .d-flex.align-items-start {
        flex-direction: column; /* Иконка сверху, текст снизу */
        align-items: center;
        text-align: center;
    }
    .icon-box {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .card-text-custom {
        text-align: center; /* Текст по центру на мобильном */
    }
    
    /* Логотип на странице контактов */
    img[alt="DAD-EA Large Logo"] {
        max-height: 150px !important; /* Уменьшаем гигантское лого на мобильном */
        width: auto;
    }
}

/* --- DONATE PAGE STYLES --- */
.donation-btn {
    width: 100%;
    border: 2px solid #ddd;
    background: #fff;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.donation-btn:hover {
    background-color: #f8f9fa;
    border-color: #aaa;
}

/* Стиль АКТИВНОЙ кнопки (когда нажали) */
.donation-btn.active-amount {
    background-color: var(--turquoise-color) !important;
    border-color: var(--turquoise-color) !important;
    color: white !important;
    box-shadow: 0 5px 15px rgba(0, 206, 209, 0.4);
    transform: scale(1.05);
}

.custom-field-wrapper {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 8px;
}

.donate-card-header {
    background-color: var(--turquoise-color);
    color: white;
}

.btn-donate-submit {
    background-color: var(--turquoise-color);
    padding: 15px;
}

.btn-donate-submit:hover {
    background-color: #008b8b;
}

/* Payment provider cards */
.payment-provider-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.payment-provider-card:hover {
    border-color: var(--turquoise-color);
    background: #e0f7fa;
    transform: translateY(-2px);
}

/* Payment modal buttons */
.btn-payment-option {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.btn-payment-option:hover {
    border-color: var(--turquoise-color);
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    transform: translateX(5px);
}

.btn-payment-option i {
    width: 40px;
}

.btn-payment-option span {
    flex: 1;
}

/* Modal header close button */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Payment logos */
.payment-logo {
    height: 26px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
}

.payment-modal-logo {
    height: 40px;
    width: 50px;
    object-fit: contain;
}

/* Paystack logo has white background, needs dark bg */
.paystack-logo {
    background-color: #0BA4DB;
    border-radius: 6px;
    padding: 4px;
}

/* --- CONTACT PAGE STYLES --- */
.contact-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border-bottom: 4px solid transparent;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid var(--primary-green);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-icon.linkedin {
    background: #0077B5;
}

.social-icon.twitter {
    background: #000000;
}

.social-icon.threads {
    background: #000000;
}

.social-icon.whatsapp {
    background: #25D366;
}

.social-icon.telegram {
    background: #0088cc;
}

/* Social icon images for X and Threads */
.social-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* --- DONATE PAGE DISCLAIMER --- */
.donate-disclaimer {
    font-size: 0.8rem;
}

/* --- CONTACT PAGE LOGO --- */
.contact-logo {
    max-height: 150px;
    width: auto;
    max-width: 100%;
}

/* --- 404 PAGE --- */
.error-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary-green);
}

/* Cryptocurrency modals */
.crypto-coin-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: middle;
}
.crypto-address-box {
    font-family: monospace;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    word-break: break-all;
    font-size: 0.9rem;
}
.crypto-qr-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}
.payment-provider-subtext {
    font-size: 0.65rem;
    color: #888;
    margin-bottom: 0;
}