/**
 * Custom Styles for führung.org Theme
 * Page-specific styles that complement the Tailwind CSS
 */

/* Hero background pattern */
.hero-pattern {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(20, 184, 166, 0.08), transparent),
        linear-gradient(to bottom, #F8FAFC, #FFFFFF);
}

/* Subtle grid overlay */
.hero-grid {
    background-image:
        linear-gradient(rgba(11, 31, 59, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 31, 59, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Pillar card hover line */
.pillar-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #14B8A6;
    transform: scaleY(0);
    transition: transform 0.2s ease-out;
}

.pillar-card:hover::before {
    transform: scaleY(1);
}

/* Article card image overlay */
.article-image-overlay {
    background: linear-gradient(to top, rgba(11, 31, 59, 0.6), transparent);
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #14B8A6;
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Article prose styling */
.prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #0F172A;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose h2 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #0B1F3B;
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0B1F3B;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.prose strong {
    font-weight: 600;
    color: #0B1F3B;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: #14B8A6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #0d9488;
}

/* Sidebar sticky */
.sidebar-sticky {
    position: sticky;
    top: 96px;
}

/* TOC active state */
.toc-link {
    position: relative;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.toc-link.active {
    color: #14B8A6;
    font-weight: 500;
}

.toc-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #14B8A6;
    border-radius: 2px;
}

/* Copy button feedback */
.copy-success {
    animation: copyPulse 0.3s ease-out;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Checklist item checked */
.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: #475569;
}

.checklist-item.checked .checklist-checkbox {
    background: #14B8A6;
    border-color: #14B8A6;
}

.checklist-item.checked .checklist-checkbox svg {
    opacity: 1;
}

/* Mobile menu - complete styles */
.mobile-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -288px; /* w-72 = 18rem = 288px */
    width: 288px;
    background-color: #FFFFFF;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease-out;
    overflow-y: auto;
}

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

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    .mobile-menu {
        display: none;
    }
}

/* Mobile overlay - complete styles */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 31, 59, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    z-index: 9998;
    transition: opacity 0.3s ease-out;
}

.mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Hide mobile overlay on desktop */
@media (min-width: 1024px) {
    .mobile-overlay {
        display: none;
    }
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* Newsletter gradient */
.newsletter-gradient {
    background: linear-gradient(135deg, #0B1F3B 0%, #0d2847 100%);
}

/* Trust bar subtle separator */
.trust-divider {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, #E2E8F0, transparent);
}

/* Script line highlighting */
.script-block-line:hover {
    background: rgba(20, 184, 166, 0.08);
}

/* Feature card improvements */
.feature-card {
    display: block;
    padding: 2rem;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    text-align: center;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: #14B8A6;
    box-shadow: 0 4px 12px rgba(11, 31, 59, 0.08);
}

.feature-card .w-14 {
    margin-left: auto;
    margin-right: auto;
}

/* Section header fixes */
.section-header.text-center {
    display: block;
    text-align: center;
}

/* Responsive section header */
@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* WordPress specific adjustments */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Admin bar adjustment */
body.admin-bar .sticky.top-0 {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sticky.top-0 {
        top: 46px;
    }
}

/* Category archive hero gradient */
.category-hero {
    background: linear-gradient(135deg, #0B1F3B 0%, #14B8A6 100%);
}

/* ==========================================
   Additional Tailwind-style Utility Classes
   ========================================== */

/* Red color utilities */
.bg-red-500 {
    background-color: #ef4444;
}
.bg-red-600 {
    background-color: #dc2626;
}
.hover\:bg-red-600:hover {
    background-color: #dc2626;
}
.text-red-500 {
    color: #ef4444;
}
.border-red-500 {
    border-color: #ef4444;
}
.border-t-red-500 {
    border-top-color: #ef4444;
}

/* Emerald/Green color utilities */
.bg-emerald-500 {
    background-color: #10b981;
}
.bg-emerald-600 {
    background-color: #059669;
}
.hover\:bg-emerald-600:hover {
    background-color: #059669;
}
.text-emerald-500 {
    color: #10b981;
}

/* Violet color utilities */
.bg-violet-500 {
    background-color: #8b5cf6;
}
.bg-violet-600 {
    background-color: #7c3aed;
}
.hover\:bg-violet-600:hover {
    background-color: #7c3aed;
}
.text-violet-500 {
    color: #8b5cf6;
}

/* Gray utilities */
.bg-gray-100 {
    background-color: #f3f4f6;
}
.bg-gray-200 {
    background-color: #e5e7eb;
}
.bg-gray-300 {
    background-color: #d1d5db;
}
.text-gray-400 {
    color: #9ca3af;
}
.text-gray-500 {
    color: #6b7280;
}
.text-gray-100 {
    color: #f3f4f6;
}
.border-gray-300 {
    border-color: #d1d5db;
}

/* Fix: btn-outline needs border-style since .btn sets border-style: none */
.btn.btn-outline {
    border-style: solid;
}

/* Animated progress gradient fix */
.from-teal {
    --tw-gradient-from: #14B8A6;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}
.to-navy {
    --tw-gradient-to: #0B1F3B;
}
.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

/* Gradient to bottom-right */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to));
}

/* Teal gradients */
.from-teal {
    --tw-gradient-from: #14B8A6;
}
.to-teal-dark {
    --tw-gradient-to: #0d9488;
}

/* Navy gradients */
.from-navy {
    --tw-gradient-from: #0B1F3B;
}
.to-navy-light {
    --tw-gradient-to: #1e3a5f;
}

/* Amber gradients */
.from-amber {
    --tw-gradient-from: #F59E0B;
}
.to-amber-dark {
    --tw-gradient-to: #d97706;
}

/* Text with opacity */
.text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

/* Negative margin for tabs */
.-mb-px {
    margin-bottom: -1px;
}

/* Border width for tabs */
.border-b-2 {
    border-bottom-width: 2px;
}

/* Padding utilities */
.p-1 {
    padding: 0.25rem;
}

/* Gap utilities */
.gap-2 {
    gap: 0.5rem;
}

/* Inline flex for pill tabs */
.inline-flex {
    display: inline-flex;
}

/* ==========================================
   Shadow Utilities
   ========================================== */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}
.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ==========================================
   List Styling Utilities
   ========================================== */
.list-disc {
    list-style-type: disc;
}
.list-decimal {
    list-style-type: decimal;
}
.list-none {
    list-style-type: none;
}
.list-inside {
    list-style-position: inside;
}
.list-outside {
    list-style-position: outside;
}
ul.list-disc,
ol.list-decimal {
    padding-left: 1.5rem;
}
ul.list-disc li,
ol.list-decimal li {
    margin-bottom: 0.5rem;
}

/* ==========================================
   Additional Color Utilities
   ========================================== */
.bg-green-500 {
    background-color: #22c55e;
}
.bg-rose-500 {
    background-color: #f43f5e;
}
.bg-rose-100 {
    background-color: #ffe4e6;
}
.text-rose-700 {
    color: #be123c;
}
.bg-violet-100 {
    background-color: #ede9fe;
}
.text-violet-700 {
    color: #6d28d9;
}
.bg-emerald-100 {
    background-color: #d1fae5;
}
.text-emerald-700 {
    color: #047857;
}
.bg-blue-50 {
    background-color: #eff6ff;
}
.bg-blue-100 {
    background-color: #dbeafe;
}
.border-blue-200 {
    border-color: #bfdbfe;
}
.text-blue-600 {
    color: #2563eb;
}
.text-blue-800 {
    color: #1e40af;
}
.text-blue-900 {
    color: #1e3a8a;
}
.bg-red-50 {
    background-color: #fef2f2;
}
.bg-red-100 {
    background-color: #fee2e2;
}
.border-red-200 {
    border-color: #fecaca;
}
.text-red-600 {
    color: #dc2626;
}
.text-red-800 {
    color: #991b1b;
}
.text-red-900 {
    color: #7f1d1d;
}
.bg-amber-50 {
    background-color: #fffbeb;
}
.bg-amber-100 {
    background-color: #fef3c7;
}
.border-amber-200 {
    border-color: #fde68a;
}
.text-amber-600 {
    color: #d97706;
}
.text-amber-800 {
    color: #92400e;
}
.text-amber-900 {
    color: #78350f;
}
.bg-gray-400 {
    background-color: #9ca3af;
}
.text-gray-600 {
    color: #4b5563;
}

/* ==========================================
   Opacity Background Utilities
   ========================================== */
.bg-teal\/10 {
    background-color: rgba(20, 184, 166, 0.1);
}
.bg-teal\/20 {
    background-color: rgba(20, 184, 166, 0.2);
}
.bg-navy\/10 {
    background-color: rgba(11, 31, 59, 0.1);
}
.bg-navy\/20 {
    background-color: rgba(11, 31, 59, 0.2);
}
.bg-navy\/60 {
    background-color: rgba(11, 31, 59, 0.6);
}
.bg-navy\/80 {
    background-color: rgba(11, 31, 59, 0.8);
}
.bg-amber\/10 {
    background-color: rgba(245, 158, 11, 0.1);
}
.bg-amber\/20 {
    background-color: rgba(245, 158, 11, 0.2);
}
.bg-gray-50 {
    background-color: #f9fafb;
}
.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

/* Button Group - no inherited border-radius */
.inline-flex > button {
    border-radius: 0;
}

/* Border utilities */
.border-border {
    border-color: #E2E8F0;
}
.border-r {
    border-right-width: 1px;
    border-right-style: solid;
}
.border-l-2 {
    border-left-width: 2px;
    border-left-style: solid;
}
.border-4 {
    border-width: 4px;
    border-style: solid;
}
.border-2 {
    border-width: 2px;
    border-style: solid;
}

/* Navy light for button hover */
.hover\:bg-navy-light:hover {
    background-color: #1e3a5f;
}

/* Amber text */
.text-amber-dark {
    color: #d97706;
}

/* ==========================================
   Padding Utilities
   ========================================== */
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Amber border */
.border-amber {
    border-color: #F59E0B;
}

/* Border teal */
.border-teal {
    border-color: #14B8A6;
}

/* ==========================================
   Gradient Box Content Overrides
   ========================================== */

/* Override prose heading color inside gradient boxes */
[style*="gradient"] h1,
[style*="gradient"] h2,
[style*="gradient"] h3,
[style*="gradient"] h4,
.bg-gradient-to-br h1,
.bg-gradient-to-br h2,
.bg-gradient-to-br h3,
.bg-gradient-to-br h4 {
    color: #ffffff !important;
}

/* Ensure text-white works in any context */
.text-white {
    color: #ffffff !important;
}

/* ==========================================
   Responsive Table Styles
   ========================================== */

/* Ensure overflow-x-auto works */
.overflow-x-auto {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Prevent table content from collapsing on mobile */
.overflow-x-auto table {
    min-width: 600px;
}

/* Whitespace utilities */
.whitespace-nowrap {
    white-space: nowrap;
}

.whitespace-normal {
    white-space: normal;
}

/* ==========================================
   Additional Gradient Aliases (Tailwind-compat)
   ========================================== */

/* Teal gradient stops - Tailwind naming */
.to-teal-700 {
    --tw-gradient-to: #0d9488;
}

.to-teal-600 {
    --tw-gradient-to: #0d9488;
}

/* Navy gradient stops */
.to-navy-700 {
    --tw-gradient-to: #14405c;
}

/* Gradient with opacity */
.from-navy\/5 {
    --tw-gradient-from: rgba(11, 31, 59, 0.05);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.to-teal\/5 {
    --tw-gradient-to: rgba(20, 184, 166, 0.05);
}

.from-navy\/10 {
    --tw-gradient-from: rgba(11, 31, 59, 0.1);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent);
}

.to-teal\/10 {
    --tw-gradient-to: rgba(20, 184, 166, 0.1);
}

/* ==========================================
   Button Text Visibility Fix
   ========================================== */

/* Ensure button text is visible */
.btn.bg-teal,
.btn-primary.bg-teal,
a.bg-teal {
    color: #ffffff;
}

/* ==========================================
   Callout Component Styles
   ========================================== */

/* Teal callout */
.bg-teal\/5 {
    background-color: rgba(20, 184, 166, 0.05);
}

.border-teal\/20 {
    border-color: rgba(20, 184, 166, 0.2);
}

/* Text colors with opacity */
.text-teal-dark\/80 {
    color: rgba(13, 148, 136, 0.8);
}

/* Rose callout extras */
.text-rose-800 {
    color: #9f1239;
}

/* ==========================================
   WordPress Pagination Styles
   ========================================== */

/* Pagination container */
.navigation.pagination {
    margin-top: 3rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* All page number elements */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background-color: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-numbers:hover {
    color: #14B8A6;
    border-color: #14B8A6;
    background-color: rgba(20, 184, 166, 0.05);
}

/* Current page */
.page-numbers.current {
    color: #ffffff;
    background-color: #14B8A6;
    border-color: #14B8A6;
}

/* Prev/Next arrows */
.page-numbers.prev,
.page-numbers.next {
    padding: 0;
}

.page-numbers.prev svg,
.page-numbers.next svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Dots/ellipsis */
.page-numbers.dots {
    border: none;
    background: transparent;
    color: #94a3b8;
    min-width: auto;
    padding: 0 0.25rem;
}

.page-numbers.dots:hover {
    background: transparent;
    color: #94a3b8;
}

/* ==========================================
   Flex Utilities
   ========================================== */

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

.self-start {
    align-self: flex-start;
}

/* Line clamp for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Height utilities */
.h-40 {
    height: 10rem; /* 160px */
}

/* Width utilities */
.w-56 {
    width: 14rem; /* 224px */
}

/* Space between */
.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* ==========================================
   Blog Card Component
   ========================================== */

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 640px) {
    .blog-card {
        flex-direction: row;
    }
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(11, 31, 59, 0.1), rgba(20, 184, 166, 0.1));
}

@media (min-width: 640px) {
    .blog-card-image {
        width: 280px;
        height: 180px;
    }
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0B1F3B;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    color: #64748B;
    line-height: 1.6;
    flex: 1;
}

.blog-card-meta {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}
