/* Napesa.Africa Website Styles
   Design Philosophy: Afro-Minimalist
   Inspired by heritage, rooted in function — modern, warm, and proudly African.
*/

:root {
    /* Brand Colors - Light Theme */
    --kitenge-green: #2A7F62; /* Primary: Deep organic green, inspired by traditional fabric tones */
    --earth-clay: #C36A2D; /* Secondary: Terracotta accent, nods to Kenyan soil & vibrancy */
    --sunrise-gold: #FFCB05; /* Accent: Warm yellow for CTA buttons, energy, optimism */
    --sand-beige: #F5EFE6; /* Neutral 1: Soft background tone for light UIs */
    --stone-gray: #4E4E4E; /* Neutral 2: Body text, stable visual anchor */
    --stone-gray-dark: #EDEDED; /* CloudWhite: Soft neutral white, excellent for body text in dark mode */
    --alert-red: #D93C3C; /* Error: Accessible, vibrant error color */
    --palm-green: #46B179; /* Success: Used for completed goals or success toasts */
    --ocean-blue: #3686C9; /* Info: For helpful tips, chat insights */

    /* Dark Theme Colors */
    --dark-background: #121212; /* App background */
    --dark-surface: #1E1E1E; /* Cards, modals, input fields */
    --dark-overlay: #2A2A2A; /* Drawers, dropdowns, bottom sheets */
    --ebony-clay: #232B2B;
    --light-text-primary: #F5EFE6; /* Headings, important text (same as SandBeige) */
    --light-text-secondary: #D0D0D0; /* Subtext, meta info */
    --light-disabled: #777777; /* Disabled buttons, labels */
    --kitenge-green-dark: #4AAFA2; /* Buttons, icons */
    --earth-clay-dark: #F38A4D; /* Toggles, indicators */
    --sunrise-gold-dark: #FFE05A; /* Floating action buttons, highlights */
    --palm-green-dark: #66D199; /* Success toast, badge */
    --alert-red-dark: #FF5C5C; /* Validation, errors */
    --ocean-blue-dark: #56A6E9; /* Info cards, assistant chat */

    /* Default theme is light */
    --primary-color: var(--kitenge-green);
    --secondary-color: var(--earth-clay);
    --accent-color: var(--sunrise-gold);
    --background-color: var(--sand-beige);
    --text-color: var(--stone-gray);
    --error-color: var(--alert-red);
    --success-color: var(--palm-green);
    --info-color: var(--ocean-blue);
}

/* Dark theme class to be toggled with JavaScript */
.dark-theme {
    --primary-color: var(--kitenge-green-dark);
    --secondary-color: var(--earth-clay-dark);
    --accent-color: var(--sunrise-gold-dark);
    --background-color: var(--dark-background);
    --surface-color: var(--dark-surface);
    --overlay-color: var(--dark-overlay);
    --text-color: var(--light-text-primary);
    --text-secondary-color: var(--light-text-secondary);
    --disabled-color: var(--light-disabled);
    --error-color: var(--alert-red-dark);
    --success-color: var(--palm-green-dark);
    --info-color: var(--ocean-blue-dark);
}

/* Base styles */
body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Button styles */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--kitenge-green-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--earth-clay-dark);
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent-color);
    color: #333333; /* Darker text color for better contrast with yellow background */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-accent:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--sunrise-gold-dark);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-accent:hover {
    color: var(--stone-gray);
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.2);
}

.btn-accent:hover:before {
    width: 100%;
}

/* Special styling for CTA banner button */
.cta-banner .btn-accent {
    padding: 15px 30px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
}

.cta-banner .btn-accent:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section styling */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}

/* Header */
header {
    background-color: var(--background-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.navbar-brand {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

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

.navbar-brand img {
    height: 45px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    margin-left: 30px;
    position: relative;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 12px 8px; /* Increased padding for larger touch target */
    position: relative;
    transition: all 0.3s ease;
    min-height: 44px; /* Minimum height for touch targets */
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.desktop-menu {
    .navbar-nav {
        flex-direction: row;
    }
}

/* Mobile menu toggle button */
#mobile-menu-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    transition: all 0.3s ease;
    display: none;
    min-width: 48px; /* Minimum width for touch targets */
    min-height: 48px; /* Minimum height for touch targets */
    touch-action: manipulation; /* Prevents delays on touch devices */
}

#mobile-menu-toggle:hover {
    color: var(--primary-color);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--background-color);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 80px 20px 20px;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .navbar-nav {
    display: block;
}

.mobile-menu .nav-item {
    margin: 0 0 15px;
}

.mobile-menu .nav-link {
    display: block;
    padding: 16px 12px; /* Increased padding for larger touch target */
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 48px; /* Larger minimum height for mobile touch targets */
}

.nav-tabs .nav-link {
    border: none;
    /*padding: 0;*/
}

/* Mobile menu backdrop */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Hero section */
.hero {
    background-color: var(--background-color);
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 40px;
}

/* Hero device frame styling */
.hero-device-frame {
    position: relative;
    width: 320px;
    height: 640px;
    margin: 0 auto;
    background-color: #111;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(42, 127, 98, 0.2);
    border: 1px solid #333;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: all 0.5s ease;
}

.hero-device-frame:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(42, 127, 98, 0.3);
}

/* Notch at the top of the phone */
.hero-device-frame:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 28px;
    background-color: #111;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 2;
}

/* Phone screen */
.hero-device-screen {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
}

.hero-device-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Features section */
.features {
    background-color: white;
}

.feature-item {
    text-align: center;
    margin-bottom: 30px;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Why Napesa section */
.why-napesa {
    background-color: var(--sand-beige);
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    flex: 1;
    min-width: 200px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1.1rem;
}

/* App screenshots section */
.app-screenshots {
    background-color: white;
    text-align: center;
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.screenshot-slider {
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Smartphone device frame */
.device-frame {
    position: relative;
    width: 280px;
    height: 560px;
    margin: 0 auto 30px;
    background-color: #111;
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    overflow: hidden;
}

/* Notch at the top of the phone */
.device-frame:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 24px;
    background-color: #111;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 2;
}

/* Phone screen */
.device-screen {
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 28px;
}

.screenshot-content {
    max-width: 500px;
    margin: 0 auto;
}

.screenshot-item h4 {
    margin-top: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.screenshot-item p {
    color: var(--text-color);
    margin-top: 10px;
    font-size: 1rem;
}

/* Carousel controls customization */
.app-screenshots .carousel-control-prev,
.app-screenshots .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.app-screenshots .carousel-control-prev {
    left: 10px;
}

.app-screenshots .carousel-control-next {
    right: 10px;
}

.app-screenshots .carousel-control-prev:hover,
.app-screenshots .carousel-control-next:hover {
    opacity: 1;
}

.app-screenshots .carousel-indicators {
    bottom: -50px;
}

.app-screenshots .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.5;
    margin: 0 5px;
}

.app-screenshots .carousel-indicators button.active {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .screenshot-item {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .device-frame {
        width: 240px;
        height: 480px;
        margin: 0 auto 20px;
    }

    .screenshot-content {
        padding: 0 15px;
    }

    .app-screenshots .carousel-control-prev,
    .app-screenshots .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .screenshot-item {
        flex-direction: row;
        text-align: left;
        justify-content: center;
        align-items: center;
        gap: 30px;
    }

    .device-frame {
        width: 220px;
        height: 440px;
        margin: 0;
    }

    .screenshot-content {
        max-width: 400px;
        margin: 0;
    }
}

@media (min-width: 992px) {
    .screenshot-item {
        flex-direction: row;
        text-align: left;
        justify-content: center;
        align-items: center;
        gap: 60px;
    }

    .device-frame {
        width: 280px;
        height: 560px;
        margin: 0;
    }

    .screenshot-content {
        max-width: 500px;
        margin: 0;
    }
}

/* Testimonials */
.testimonials {
    background-color: var(--sand-beige);
    text-align: center;
}

.testimonial-item {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 600;
}

/* Privacy section */
.privacy-section {
    background-color: white;
    text-align: center;
}

.privacy-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.privacy-item {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 20px;
}

.privacy-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.privacy-title {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Future features */
.future-features {
    background-color: var(--sand-beige);
}

.feature-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
}

.future-feature-item {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    padding: 20px;
}

.future-feature-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.future-feature-title {
    font-weight: 600;
    margin-bottom: 10px;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    color: white;
    text-align: center;
    padding: 80px 0;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Add decorative elements */
.cta-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 20%);
    opacity: 0.8;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-countdown {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Footer */
footer {
    background-color: var(--stone-gray);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--sand-beige);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    margin-bottom: 10px;
}

.footer-link a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-link a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: white;
    font-size: 1.5rem;
}

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

/* Responsive styles */
@media (max-width: 992px) {
    /* Header responsive styles */
    .navbar-nav {
        display: none;
    }

    #mobile-menu-toggle {
        display: block;
    }

    .navbar-brand img {
        height: 38px;
    }

    /* Hero section responsive styles */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    /* Hero device frame responsive styles */
    .hero-device-frame {
        width: 280px;
        height: 560px;
        transform: perspective(800px) rotateY(-3deg) rotateX(3deg);
    }

    .hero-device-frame:before {
        width: 120px;
        height: 24px;
    }

    /* CTA Banner responsive styles */
    .cta-title {
        font-size: 1.8rem;
    }

    .cta-subtitle {
        font-size: 1.1rem;
        padding: 0 15px;
    }

    .cta-countdown {
        font-size: 0.9rem;
        padding: 6px 15px;
    }

    .section {
        padding: 60px 0;
    }

    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    /* CTA Banner responsive styles for very small screens */
    .cta-title {
        font-size: 1.6rem;
    }

    .cta-subtitle {
        font-size: 1rem;
    }

    .cta-banner {
        padding: 40px 0;
    }

    /* Hero device frame responsive styles for very small screens */
    .hero-device-frame {
        width: 240px;
        height: 480px;
        transform: none;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    }

    .hero-device-frame:hover {
        transform: none;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }

    .hero-device-frame:before {
        width: 100px;
        height: 20px;
    }
}

@media (min-width: 993px) {
    /* Header responsive styles */
    .mobile-menu {
        display: none;
    }

    #mobile-menu-toggle {
        display: none;
    }
}

/* Plans/Pricing page */
.pricing-section {
    padding: 80px 0;
}

.pricing-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.pricing-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.pricing-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.pricing-subtitle {
    color: var(--text-secondary-color);
    margin-bottom: 30px;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.pricing-period {
    font-size: 1rem;
    color: var(--text-secondary-color);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.pricing-feature {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.pricing-feature i {
    color: var(--success-color);
    margin-right: 10px;
}

.pricing-cta {
    margin-top: 30px;
}

/* Privacy Policy & Terms pages */
.legal-page {
    padding: 80px 0;
}

.legal-content {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.legal-title {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section-title {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.legal-list {
    padding-left: 20px;
}

.legal-list li {
    margin-bottom: 10px;
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin-left: 20px;
}

.theme-toggle:hover {
    color: var(--primary-color);
}
