/* Premium Custom Styles for Decolonise Africa Website */
/* Advanced Bootstrap Customization with Modern Design */

/* CSS Custom Properties (Variables) */
:root {
    --primary-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --secondary-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --light-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-color: #f8f9fa;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --card-text: #2c3e50;
    --nav-bg: var(--primary-gradient);
}

body.dark-theme {
    --bg-color: #12141a;
    --text-color: #e5e8ed;
    --card-bg: #1a1f29;
    --card-text: #f5f7fb;
    --nav-bg: linear-gradient(135deg, #111827 0%, #1e293b 100%);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-theme .top-bar,
body.dark-theme .navbar {
    background: var(--nav-bg) !important;
}

body.dark-theme .card,
body.dark-theme .footer,
body.dark-theme .stat-card,
body.dark-theme .modal-content {
    background: var(--card-bg) !important;
    color: var(--card-text) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .card .card-text,
body.dark-theme .card .card-title,
body.dark-theme .card h2,
body.dark-theme .card p,
body.dark-theme .navbar-nav .nav-link,
body.dark-theme header .top-bar,
body.dark-theme footer,
body.dark-theme .stat-card,
body.dark-theme .feature-icon,
body.dark-theme .modal-header,
body.dark-theme .modal-body,
body.dark-theme .toast {
    color: var(--card-text) !important;
}


.spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner > div {
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

.spinner .bounce3 {
    animation-delay: 0s;
}

@keyframes sk-bouncedelay {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* Top Bar */
.top-bar {
    background: var(--success-gradient) !important;
    font-size: 0.9rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

/* Header Sticky + Navigation Styles */
header {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    background: rgba(44, 62, 80, 0.95);
}

.navbar {
    background: var(--nav-bg) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.6rem 0;
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: #20c997 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.navbar-nav .nav-link.active {
    background: var(--primary-gradient);
    color: white !important;
}

/* Hero Carousel */
#heroCarousel {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    margin-top: 2rem;
}

.carousel-item img {
    filter: brightness(0.6) contrast(1.1);
    transition: var(--transition);
}

.carousel-item:hover img {
    transform: scale(1.02);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    bottom: 3rem !important;
    left: 10%;
    right: 10%;
    text-align: center;
}

.carousel-caption h5 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-light) !important;
    transition: var(--transition) !important;
    overflow: hidden;
    background: white;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy) !important;
}

.card-header {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: #2c3e50 !important;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-text {
    color: #6c757d;
    line-height: 1.7;
}

/* Buttons */
.btn {
    border-radius: 25px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.btn-success {
    background: var(--success-gradient) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
}

.btn-outline-primary {
    border: 2px solid #28a745 !important;
    color: #28a745 !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient) !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border-radius: 10px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
    background: white !important;
}

.form-select {
    border-radius: 10px !important;
    border: 2px solid #e9ecef !important;
    background: rgba(255, 255, 255, 0.9) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Alerts */
.alert {
    border-radius: var(--border-radius) !important;
    border: none !important;
    box-shadow: var(--shadow-light);
}

/* Images */
.img-fluid {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.img-fluid:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: var(--dark-gradient) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 1;
}

.social-links a {
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: #20c997 !important;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-heavy);
}

#backToTop:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.animate-on-scroll.animate__animated {
    opacity: 1;
    transform: translateY(0);
}

/* Statistics Counter */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
    display: inline-block;
}

/* Modal Enhancements */
.modal-content {
    border-radius: var(--border-radius) !important;
    border: none !important;
    box-shadow: var(--shadow-heavy) !important;
}

.modal-header {
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

/* Toast Notifications */
.toast {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-medium) !important;
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem !important;
    }

    .carousel-caption {
        left: 5% !important;
        right: 5% !important;
        padding: 1rem !important;
    }

    .carousel-caption h5 {
        font-size: 1.8rem !important;
    }

    .carousel-caption p {
        font-size: 1rem !important;
    }

    .card-body {
        padding: 1.5rem;
    }

    .top-bar {
        font-size: 0.8rem;
    }

    .top-bar .col-md-6 {
        text-align: center !important;
        margin-bottom: 0.5rem;
    }

    .top-bar .col-md-6:last-child {
        text-align: center !important;
    }

    #backToTop {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        text-align: center;
    }

    .btn-outline-light {
        margin-top: 0.5rem;
    }
}

/* Dark-mode special overrides */
body.dark-theme .bg-light,
body.dark-theme .bg-white {
    background-color: #1b2636 !important;
}

body.dark-theme .text-muted,
body.dark-theme .text-black-50,
body.dark-theme .text-dark {
    color: #aeb8c1 !important;
}

body.dark-theme .bg-success,
body.dark-theme .bg-primary,
body.dark-theme .bg-warning {
    opacity: 0.95;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: rgba(233, 239, 241, 0.6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #20c997, #28a745);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #28a745, #20c997);
}

/* Glow + utility classes */
.glow-on-hover:hover {
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3), 0 8px 30px rgba(32, 201, 151, 0.15);
    transform: translateY(-3px);
}

.bg-soft-gradient {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.14), rgba(40, 167, 69, 0.08));
}

.text-soft-green {
    color: #1e7e34;
}

/* Animated gradient hooks */
@keyframes themeFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(270deg, #28a745, #20c997, #2dce89, #17a2b8);
    background-size: 800% 800%;
    animation: themeFlow 12s ease infinite;
}

/* Card glassmorphism */
.card-glass {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(14, 76, 45, 0.15);
}

/* Button update */
.btn-primary,
.btn-success,
.btn-outline-success {
    border-radius: 35px !important;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    border: 0;
}

.btn-success {
    background: linear-gradient(135deg, #20c997, #28a745) !important;
    border: 0;
}

.btn-outline-success {
    border: 2px solid #20c997 !important;
    color: #20c997 !important;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: #20c997 !important;
    color: white !important;
}

/* Responsive spacing */
@media (max-width: 992px) {
    .section-welcome h2,
    .section-features h2,
    .section-testimonials h2 {
        font-size: 2rem;
    }

    .section-stats .stat-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.6rem !important;
    }

    .section-stats .stat-card,
    .section-welcome .card,
    .section-features .card,
    .section-testimonials .card {
        background: rgba(255, 255, 255, 0.92);
    }
}

/* Statistics Cards */
.stat-card {
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

/* Themed sections */
.section-stats {
    background: linear-gradient(135deg, rgba(32, 201, 151, 0.08), rgba(18, 52, 86, 0.08));
}

.section-welcome {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.7));
}

.section-features {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(16, 94, 48, 0.05));
}

.section-testimonials {
    background: linear-gradient(135deg, rgba(62, 141, 255, 0.08), rgba(24, 42, 86, 0.05));
}

.section-stats .stat-card,
.section-welcome .card,
.section-features .card,
.section-testimonials .card {
    border: 1px solid rgba(34, 139, 34, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

.section-stats .stat-card h2,
.section-stats .stat-card p,
.section-welcome h2,
.section-features .card-title,
.section-testimonials .card-body {
    color: #235B30;
}

.feature-icon:hover {
    transform: scale(1.1);
}

/* Special Offer Cards */
.special-offer {
    position: relative;
    overflow: hidden;
}

.ribbon {
    position: absolute;
    top: 20px;
    right: -30px;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
    z-index: 10;
}

.ribbon-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-10px) !important;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Feature Circles */
.feature-circle {
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.feature-circle:hover {
    transform: scale(1.1);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(233, 236, 239, 0.9) 100%),
                url('../images/azzola1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Gradient Background Classes */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

.bg-gradient-success {
    background: var(--success-gradient) !important;
}

.bg-gradient-dark {
    background: var(--dark-gradient) !important;
}

.bg-gradient-light {
    background: var(--light-gradient) !important;
}