@tailwind base;
@tailwind components;
@tailwind utilities;

/* Definition of the design system. All colors, gradients, fonts, etc should be defined here. 
All colors MUST be HSL.
*/

:root {
    /* Tanzania-inspired color palette */
    --background: 0 0% 98%;
    --foreground: 0 0% 12%;

    --card: 0 0% 100%;
    --card-foreground: 0 0% 12%;

    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 12%;

    /* Tanzania Green */
    --primary: 140 100% 20%;
    --primary-foreground: 0 0% 98%;

    /* Coffee Brown */
    --secondary: 25 35% 35%;
    --secondary-foreground: 0 0% 98%;

    /* Light Coffee */
    --muted: 30 25% 75%;
    --muted-foreground: 0 0% 35%;

    /* Tanzania Gold */
    --accent: 51 100% 50%;
    --accent-foreground: 0 0% 12%;
    
    /* White */
    --white: 0 0% 100%;
    --white-foreground: 0 0% 12%;


    /* Tanzania Blue */
    --blue: 195 100% 43%;
    --blue-foreground: 0 0% 98%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 30 15% 88%;
    --input: 30 15% 88%;
    --ring: 140 100% 20%;

    --radius: 0.5rem;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
    --gradient-gold: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(51 80% 45%) 100%);
    --gradient-coffee: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(25 25% 45%) 100%);
    
    /* Shadows */
    --shadow-soft: 0 4px 20px -2px hsl(var(--foreground) / 0.1);
    --shadow-glow: 0 0 30px hsl(var(--accent) / 0.3);
    --shadow-elevated: 0 8px 30px -4px hsl(var(--foreground) / 0.15);

    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
}

* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}


/* Add this to your existing CSS file */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

#home {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

#home > div:first-child {
    left: 0;
    right: 0;
    width: 100vw;
}

/* Utility Classes */
.bg-background {
    background-color: hsl(var(--background));
}

.text-foreground {
    color: hsl(var(--foreground));
}

.bg-primary {
    background-color: hsl(var(--primary));
}

.text-primary-foreground {
    color: hsl(var(--primary-foreground));
}

.bg-secondary {
    background-color: hsl(var(--secondary));
}

.text-secondary-foreground {
    color: hsl(var(--secondary-foreground));
}

.bg-muted {
    background-color: hsl(var(--muted));
}

.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.bg-accent {
    background-color: hsl(var(--accent));
}

.text-accent {
    color: hsl(var(--accent));
}

.text-white {
    color: hsl(var(--white));
}

.text-accent-foreground {
    color: hsl(var(--accent-foreground));
}

.bg-blue {
    background-color: hsl(var(--blue));
}

.text-blue-foreground {
    color: hsl(var(--blue-foreground));
}

.border-border {
    border-color: hsl(var(--border));
}

/* Components */
.btn-hero {
    display: inline-block;
    background: linear-gradient(to right, hsl(var(--accent)), hsl(var(--accent) / 0.8));
    color: hsl(var(--accent-foreground));
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    transform: translateY(0);
}

.btn-hero:hover {
    box-shadow: 0 0 30px hsl(var(--accent) / 0.3);
    transform: scale(1.05);
}

.btn-outline {
    display: inline-block;
    border: 2px solid hsl(var(--primary));
    color: hsl(var(--primary));
    background-color: transparent;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

a {
    text-decoration: none;
}


.card-feature {
    background-color: hsl(var(--card));
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px -2px hsl(var(--foreground) / 0.1);
    border: 1px solid hsl(var(--border) / 0.5);
    transition: all 0.3s;
    transform: translateY(0);
}

.card-feature:hover {
    box-shadow: 0 8px 30px -4px hsl(var(--foreground) / 0.15);
    transform: scale(1.05);
}

.fade-in {
    opacity: 0;
    transform: translateY(2rem);
    transition: all 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.geometric-pattern {
    background-image: 
        radial-gradient(circle at 1px 1px, hsl(var(--accent) / 0.15) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Tailwind-like utility classes */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.h-2 {
    height: 0.5rem;
}

.h-3 {
    height: 0.75rem;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.h-8 {
    height: 2rem;
}

.h-10 {
    height: 2.5rem;
}

.h-12 {
    height: 3rem;
}

.h-16 {
    height: 4rem;
}

.h-24 {
    height: 6rem;
}

.w-1 {
    width: 0.25rem;
}

.w-3 {
    width: 0.75rem;
}

.w-5 {
    width: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.w-10 {
    width: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.w-16 {
    width: 4rem;
}

.w-24 {
    width: 6rem;
}

.min-h-screen {
    min-height: 100vh;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.font-light {
    font-weight: 300;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.leading-relaxed {
    line-height: 1.625;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-t {
    border-top-width: 1px;
}

.bg-cover {
    background-size: cover;
}

.bg-center {
    background-position: center;
}

.bg-no-repeat {
    background-repeat: no-repeat;
}

.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-black\/40 {
    --tw-gradient-from: rgb(0 0 0 / 0.4);
    --tw-gradient-to: rgb(0 0 0 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-black\/20 {
    --tw-gradient-to: rgb(0 0 0 / 0);
    --tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / 0.2), var(--tw-gradient-to);
}

.to-black\/60 {
    --tw-gradient-to: rgb(0 0 0 / 0.6);
}

.from-primary\/90 {
    --tw-gradient-from: hsl(var(--primary) / 0.9);
    --tw-gradient-to: hsl(var(--primary) / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-primary\/70 {
    --tw-gradient-to: hsl(var(--primary) / 0);
    --tw-gradient-stops: var(--tw-gradient-from), hsl(var(--primary) / 0.7), var(--tw-gradient-to);
}

.to-transparent {
    --tw-gradient-to: transparent;
}

.from-primary {
    --tw-gradient-from: hsl(var(--primary));
    --tw-gradient-to: hsl(var(--primary) / 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-secondary {
    --tw-gradient-to: hsl(var(--secondary) / 0);
    --tw-gradient-stops: var(--tw-gradient-from), hsl(var(--secondary)), var(--tw-gradient-to);
}

.to-primary {
    --tw-gradient-to: hsl(var(--primary));
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.opacity-0 {
    opacity: 0;
}

.opacity-30 {
    opacity: 0.3;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-60 {
    opacity: 0.6;
}

.opacity-70 {
    opacity: 0.7;
}

.opacity-80 {
    opacity: 0.8;
}

.opacity-90 {
    opacity: 0.9;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.drop-shadow-lg {
    filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.overflow-hidden {
    overflow: hidden;
}

.z-10 {
    z-index: 10;
}

.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.-translate-x-1\/2 {
    --tw-translate-x: -50%;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Responsive */
@media (min-width: 640px) {
    .sm\:flex-row {
        flex-direction: row;
    }
}

@media (min-width: 768px) {
    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
    
    .md\:text-7xl {
        font-size: 4.5rem;
        line-height: 1;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:mb-0 {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}