/* Agricon Shared Styles - Reusable across all pages */

/* Chart Gradient */
.chart-gradient {
    background: linear-gradient(180deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0) 100%);
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Material Icons */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Icon Fill States */
.fill-0 { font-variation-settings: 'FILL' 0; }
.fill-1 { font-variation-settings: 'FILL' 1; }

/* Interactive States */
.scale-98:active { transform: scale(0.98); }

/* Text Truncation */
.line-clamp-2 {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

/* Bootstrap Compatibility */
.modal-backdrop { z-index: 40; }
.modal { z-index: 50; }

/* Additional Layout Classes */
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-8 { grid-column: span 8 / span 8; }
.col-span-4 { grid-column: span 4 / span 4; }

/* Additional Gap Classes */
.gap-1 { gap: 0.25rem; }
.gap-6 { gap: 1.5rem; }

/* Additional Flex Classes */
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow-1 { flex-grow: 1; }

/* Width Classes */
.w-14 { width: 3.5rem; }
.w-10 { width: 2.5rem; }
.w-8 { width: 2rem; }
.w-20 { width: 5rem; }
.w-full { width: 100%; }
.w-px { width: 1px; }
.h-px { height: 1px; }

/* Height Classes */
.h-14 { height: 3.5rem; }
.h-10 { height: 2.5rem; }
.h-6 { height: 1.5rem; }
.h-20 { height: 5rem; }
.min-w-200px { min-width: 200px; }
.max-w-md { max-width: 28rem; }
.max-w-none { max-width: none; }
.max-w-xs { max-width: 20rem; }

/* Border Classes */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-x { border-left-width: 1px; border-right-width: 1px; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }

/* Border Radius Classes */
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Position Classes */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.top-full { top: 100%; }
.right-0 { right: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* Display Classes */
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }

/* Text Classes */
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-10px { font-size: 10px; }
.text-11px { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }

/* Color Classes using Material Design Tokens */
.text-primary { color: var(--md-sys-color-primary); }
.text-on-surface { color: var(--md-sys-color-on-surface); }
.text-on-surface-variant { color: var(--md-sys-color-on-surface-variant); }
.text-on-primary-fixed { color: var(--md-sys-color-on-primary-fixed); }
.text-primary-fixed { color: var(--md-sys-color-primary-fixed); }
.text-success { color: var(--md-sys-color-tertiary); }

/* Background Classes */
.bg-white { background-color: white; }
.bg-surface-container-low { background-color: var(--md-sys-color-surface-container-low); }
.bg-surface-container-high { background-color: var(--md-sys-color-surface-container-high); }
.bg-surface { background-color: var(--md-sys-color-surface); }
.bg-black { background-color: black; }
.bg-primary { background-color: var(--md-sys-color-primary); }

/* Background with opacity */
.bg-black-50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-primary-10 { background-color: rgba(0, 108, 64, 0.1); }

/* Border Color Classes */
.border-primary { border-color: var(--md-sys-color-primary); }
.border-outline-variant { border-color: var(--md-sys-color-outline-variant); }
.border-primary-50 { border-color: rgba(0, 108, 64, 0.5); }

/* Padding Classes */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-32 { padding-top: 8rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-2 { margin-right: 0.5rem; }

/* Margin Classes */
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-1280px { max-width: 1280px; }

/* Transform Classes */
.transform { transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1)); }
.translate-x-minus-half { --tw-translate-x: -50%; }

/* Transition Classes */
.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-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover States */
.hover\:bg-surface-container-low:hover { background-color: var(--md-sys-color-surface-container-low); }
.hover\:bg-surface-container-high:hover { background-color: var(--md-sys-color-surface-container-high); }
.hover\:bg-primary-container:hover { background-color: var(--md-sys-color-primary-container); }
.hover\:bg-primary:hover { background-color: var(--md-sys-color-primary); }
.hover\:text-primary:hover { color: var(--md-sys-color-primary); }
.hover\:fill-current:hover { font-variation-settings: 'FILL' 1; }
.hover\:underline:hover { text-decoration: underline; }

/* Active States */
.active\:scale-95:active { transform: scale(0.95); }

/* Group States */
.group:hover .group-hover\:text-primary { color: var(--md-sys-color-primary); }
.group:hover .group-hover\:fill-current { font-variation-settings: 'FILL' 1; }

/* Shadow Classes */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Opacity Classes */
.opacity-80 { opacity: 0.8; }
.opacity-100 { opacity: 1; }

/* Overflow Classes */
.overflow-hidden { overflow: hidden; }

/* Success Story Component */
.success-story {
    background: var(--md-sys-color-primary);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.success-story-overlay {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.success-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-tertiary) 100%);
    opacity: 0.9;
    z-index: 0;
}

/* Alert Component */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--md-sys-color-tertiary);
    color: var(--md-sys-color-tertiary);
}

/* Form Components */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 3px rgba(0, 108, 64, 0.1);
}

/* Custom Spacing from Tailwind Config */
.pt-32 { padding-top: 8rem; }
.pb-section-gap { padding-bottom: 5rem; }
.gap-gutter { gap: 1.5rem; }
.mb-stack-lg { margin-bottom: 2rem; }

/* Pagination Styles */
.pagination .page-link {
    border-radius: 0.75rem;
    margin: 0 4px;
    border: none;
    color: #6e7a70;
    font-weight: 600;
    padding: 10px 18px;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background-color: #006c40;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 108, 64, 0.2);
}

.pagination .page-link:hover {
    background-color: #ebeef3;
    color: #006c40;
}

/* Hero Gradient */
.hero-gradient {
    background: linear-gradient(to bottom, rgba(24, 28, 32, 0.4), rgba(24, 28, 32, 0.8)), url('https://images.unsplash.com/photo-1592982537447-7440770cbfc9?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

/* Stats Background */
.stats-bg {
    background-image: radial-gradient(circle at 2px 2px, rgba(25, 135, 84, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
}

/* Common Section Spacing */
.pt-32 { padding-top: 8rem; }
.pb-section-gap { padding-bottom: 4rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.mb-stack-lg { margin-bottom: 2rem; }
.mt-section-gap { margin-top: 4rem; }

/* Common Container */
.max-w-1280 { max-width: 1280px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.lg\:grid-cols-3 { @media (min-width: 1024px) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lg\:grid-cols-4 { @media (min-width: 1024px) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.lg\:grid-cols-6 { @media (min-width: 1024px) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.lg\:grid-cols-8 { @media (min-width: 1024px) { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.lg\:grid-cols-12 { @media (min-width: 1024px) { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.gap-gutter { gap: 1.5rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.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; }

/* Card Components */
.card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--md-sys-color-outline-variant);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 10px 25px -5px rgba(0, 108, 64, 0.1);
}

.card-header {
    padding: 2rem;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.card-body {
    padding: 2rem;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: 0 4px 14px 0 rgba(0, 108, 64, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--md-sys-color-surface-container-lowest);
    color: var(--md-sys-color-primary);
    border: 2px solid var(--md-sys-color-primary);
}

.btn-secondary:hover {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 2px solid var(--md-sys-color-primary);
}

.btn-outline:hover {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: rgba(0, 108, 64, 0.1);
    color: var(--md-sys-color-primary);
}

.badge-secondary {
    background-color: rgba(255, 152, 0, 0.1);
    color: #f97316;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Stats Cards */
.stat-card {
    background: var(--md-sys-color-surface-container-lowest);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0.75rem;
    padding: 1rem;
    min-width: 180px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-top: 0.25rem;
}

/* Header Section */
.header-section {
    margin-bottom: 2rem;
}

.header-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: var(--md-sys-color-primary-fixed);
    color: var(--md-sys-color-on-primary-fixed);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--md-sys-color-on-background);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.header-description {
    font-size: 1.125rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    padding: 3rem;
    margin-top: 4rem;
}

.cta-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 108, 64, 0.4);
    backdrop-filter: blur(4px);
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 768px;
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Form Components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0.75rem;
    background-color: white;
    color: var(--md-sys-color-on-surface);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(0, 108, 64, 0.2);
}

.form-textarea {
    min-height: 3.5rem;
    resize: vertical;
}

/* Search Component */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0.5rem;
    background-color: white;
    color: var(--md-sys-color-on-surface);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(0, 108, 64, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
}

/* Table Components */
.table-container {
    background: white;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 0.75rem;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.table-subtitle {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 0.25rem;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.data-table th {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--md-sys-color-on-surface-variant);
    letter-spacing: 0.05em;
    background-color: var(--md-sys-color-surface-container-low);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.data-table td {
    padding: 1.5rem;
    color: var(--md-sys-color-on-surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive Utilities */
@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:items-end { align-items: flex-end; }
    .md\:w-96 { width: 24rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:text-right { text-align: right; }
}

@media (min-width: 1024px) {
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-6 { grid-column: span 6 / span 6; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:col-span-12 { grid-column: span 12 / span 12; }
}

/* Animation Utilities */
.transition-all { transition: all 0.3s ease; }
.transition-colors { transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; }
.transition-transform { transition: transform 0.3s ease; }

/* Hover Effects */
.hover\:border-primary:hover { border-color: var(--md-sys-color-primary); }
.hover\:bg-primary:hover { background-color: var(--md-sys-color-primary); }
.hover\:text-primary:hover { color: var(--md-sys-color-primary); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.hover\:scale-110:hover { transform: scale(1.1); }
.hover\:brightness-110:hover { filter: brightness(1.1); }

/* Common Spacing */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-28 { top: 7rem; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Common Colors */
.text-white { color: white; }
.text-on-surface { color: var(--md-sys-color-on-surface); }
.text-on-surface-variant { color: var(--md-sys-color-on-surface-variant); }
.text-on-background { color: var(--md-sys-color-on-background); }
.text-primary { color: var(--md-sys-color-primary); }
.text-error { color: var(--md-sys-color-error); }

.bg-white { background-color: white; }
.bg-surface-container { background-color: var(--md-sys-color-surface-container); }
.bg-surface-container-low { background-color: var(--md-sys-color-surface-container-low); }
.bg-surface-container-lowest { background-color: var(--md-sys-color-surface-container-lowest); }
.bg-primary { background-color: var(--md-sys-color-primary); }
.bg-primary-container { background-color: var(--md-sys-color-primary-container); }

.border-outline-variant { border-color: var(--md-sys-color-outline-variant); }
.border-primary { border-color: var(--md-sys-color-primary); }

/* 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 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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); }

/* Rounded Utilities */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* Display Utilities */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-visible { overflow: visible; }

/* Opacity Utilities */
.opacity-90 { opacity: 0.9; }
.opacity-50 { opacity: 0.5; }
.opacity-30 { opacity: 0.3; }

/* Cursor Utilities */
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* Select Utilities */
.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* Pointer Events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Custom Components */
.upload-area {
    position: relative;
    cursor: pointer;
    border: 2px dashed var(--md-sys-color-outline-variant);
    border-radius: 1rem;
    background-color: var(--md-sys-color-surface-container-low);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--md-sys-color-primary);
}

.upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
}

.category-link:hover {
    background-color: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}

.category-link.active {
    background-color: var(--md-sys-color-primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(0, 108, 64, 0.2);
}

.post-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.post-card:hover {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 10px 25px -5px rgba(0, 108, 64, 0.1);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.post-author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--md-sys-color-surface-container-highest);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.post-meta {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface);
}

.post-time {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--md-sys-color-on-surface-variant);
}

.post-badges {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.post-content {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--md-sys-color-primary);
}

.post-excerpt {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-action:hover {
    color: var(--md-sys-color-primary);
}

.post-action-count {
    font-weight: 700;
}

/* Expert Card */
.expert-card {
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: var(--md-sys-color-surface-container-low);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.expert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.expert-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--md-sys-color-primary-fixed);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.expert-info {
    flex: 1;
}

.expert-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface);
}

.expert-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--md-sys-color-primary);
}

.expert-quote {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Success Story Card */
.success-story {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.75rem;
    height: 14rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.success-story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.success-story:hover img {
    transform: scale(1.1);
}

.success-story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.success-story-title {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.success-story-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--md-sys-color-primary-fixed);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alert Components */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        border-width: 2px;
    }
}
