/* Mandela Custom Styles */
:root {
    --mandela-dark: #0f1a17;
    --mandela-darker: #13231e;
    --mandela-accent: #d9a441;
    --mandela-accent-dark: #b76b2a;
    --mandela-green: #1f4d3a;
    --mandela-text: #f2e6c9;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--mandela-dark);
    color: var(--mandela-text);
    line-height: 1.6;
}

/* Utility Classes */
.bg-mandela-dark {
    background-color: var(--mandela-dark);
}

.bg-mandela-darker {
    background-color: var(--mandela-darker);
}

.bg-mandela-accent {
    background-color: var(--mandela-accent);
}

.bg-mandela-green {
    background-color: var(--mandela-green);
}

.text-mandela-text {
    color: var(--mandela-text);
}

.text-mandela-accent {
    color: var(--mandela-accent);
}

.text-mandela-text\/80 {
    color: rgba(242, 230, 201, 0.8);
}

.text-mandela-text\/70 {
    color: rgba(242, 230, 201, 0.7);
}

.text-mandela-text\/60 {
    color: rgba(242, 230, 201, 0.6);
}

.text-mandela-darker {
    color: var(--mandela-darker);
}

.border-mandela-accent\/20 {
    border-color: rgba(217, 164, 65, 0.2);
}

.border-mandela-accent\/30 {
    border-color: rgba(217, 164, 65, 0.3);
}

.border-mandela-accent\/60 {
    border-color: rgba(217, 164, 65, 0.6);
}

/* Layout */
.min-h-screen {
    min-height: 100vh;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-\[1200px\] {
    max-width: 1200px;
}

.max-w-\[800px\] {
    max-width: 800px;
}

.max-w-\[1400px\] {
    max-width: 1400px;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-5 {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.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;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mt-20 {
    margin-top: 5rem;
}

/* Flexbox */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Grid */
.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));
}

/* Typography */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.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-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

/* Borders and Rounded */
.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadows */
.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Positioning */
.sticky {
    position: sticky;
}

.fixed {
    position: fixed;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

/* Display */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-flex {
    display: inline-flex;
}

/* Width and Height */
.w-full {
    width: 100%;
}

.h-11 {
    height: 2.75rem;
}

.h-3 {
    height: 0.75rem;
}

.h-5 {
    height: 1.25rem;
}

.h-6 {
    height: 1.5rem;
}

.max-h-\[600px\] {
    max-height: 600px;
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Hover Effects */
.hover\:opacity-90:hover {
    opacity: 0.9;
}

.hover\:text-mandela-accent:hover {
    color: var(--mandela-accent);
}

.hover\:border-mandela-accent\/60:hover {
    border-color: rgba(217, 164, 65, 0.6);
}

.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Backdrop */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* Opacity */
.opacity-60 {
    opacity: 0.6;
}

.opacity-50 {
    opacity: 0.5;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Select */
.select-none {
    user-select: none;
}

/* Truncate */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Space */
.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

/* Responsive */
@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-\[320px_1fr_380px\] {
        grid-template-columns: 320px 1fr 380px;
    }
}

/* Custom Components */
.bg-gradient-mandela {
    background: linear-gradient(to right, var(--mandela-accent), var(--mandela-accent-dark));
}

.accent-mandela {
    accent-color: var(--mandela-accent);
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--mandela-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mandela-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--mandela-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mandela-accent-dark);
}

/* Disabled State */
.disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

/* Aspect Ratio */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

/* Ring */
.ring-1 {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.ring-mandela-accent\/20 {
    box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.2);
}

/* Mix Blend */
.mix-blend-overlay {
    mix-blend-mode: overlay;
}

.mix-blend-screen {
    mix-blend-mode: screen;
}

/* Pointer Events */
.pointer-events-none {
    pointer-events: none;
}

/* Transform */
.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));
}

.hover\:scale-105:hover {
    --tw-scale-x: 1.05;
    --tw-scale-y: 1.05;
}

/* Animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Additional Utilities */
.max-w-2xl {
    max-width: 42rem;
}

.max-w-3xl {
    max-width: 48rem;
}

.leading-relaxed {
    line-height: 1.625;
}

/* Icon and Text Alignment Fixes */
.mandela-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.mandela-logo .icon {
    color: #d9a441;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

.mandela-logo .text {
    color: #f2e6c9;
}

.mandela-button {
    background: linear-gradient(to right, #d9a441, #b76b2a);
    color: #13231e;
    padding: 0.75rem 2rem;
    border-radius: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.mandela-button:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.mandela-button .icon {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Fix for all icon-text combinations */
.icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-text .icon {
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

/* Navigation fixes */
.mandela-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: rgba(242, 230, 201, 0.8);
}

.mandela-nav a {
    color: rgba(242, 230, 201, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid transparent;
}

.mandela-nav a:hover {
    color: #d9a441;
    background-color: rgba(217, 164, 65, 0.1);
}

.mandela-nav a.active {
    color: #d9a441;
    background-color: rgba(217, 164, 65, 0.2);
    border: 1px solid rgba(217, 164, 65, 0.3);
}

/* Card improvements */
.mandela-card {
    background-color: #13231e;
    border: 1px solid rgba(217, 164, 65, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.mandela-card:hover {
    border-color: rgba(217, 164, 65, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Button improvements */
.mandela-btn {
    background: linear-gradient(to right, #d9a441, #b76b2a);
    color: #13231e;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-height: 3rem;
}

.mandela-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

.mandela-btn.secondary {
    background: #13231e;
    color: #f2e6c9;
    border: 1px solid rgba(217, 164, 65, 0.3);
}

.mandela-btn.secondary:hover {
    border-color: rgba(217, 164, 65, 0.6);
    background-color: rgba(217, 164, 65, 0.1);
}

/* Icon alignment fixes for all elements */
h1 .icon,
h2 .icon,
h3 .icon,
h4 .icon,
h5 .icon,
h6 .icon {
    vertical-align: middle;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
}

/* Specific fixes for common icon patterns */
.text-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-with-icon .icon {
    flex-shrink: 0;
}

/* Article buttons */
.article-button {
    background: linear-gradient(135deg, #13231e, #1f4d3a);
    color: #f2e6c9;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(217, 164, 65, 0.2);
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.article-button:hover {
    border-color: rgba(217, 164, 65, 0.6);
    background: linear-gradient(135deg, #1f4d3a, #13231e);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.article-button h3 {
    color: #d9a441;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-button p {
    color: rgba(242, 230, 201, 0.8);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(242, 230, 201, 0.6);
    font-size: 0.875rem;
}

.article-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta .icon {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

/* Additional utility classes for articles page */
.space-y-6>*+* {
    margin-top: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.font-extrabold {
    font-weight: 800;
}