/* Mahadibya Farm Custom Styles */

/* Smooth Transitions */
* {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* Line Clamp Utility - Fixed with standard properties */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

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

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

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

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Flash Messages Animation */
.flash-message {
    animation: slide-down 0.3s ease-out;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom Scrollbar - Webkit */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FDF8F0;
}

::-webkit-scrollbar-thumb {
    background: #C6A43F;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a88b34;
}

/* Standard scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #C6A43F #FDF8F0;
}

/* Image Hover Effects */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Button Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-pulse:hover {
    animation: pulse 1s infinite;
}

/* Card Shadow Transitions */
.card-shadow {
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Loading Spinner */
.spinner {
    border: 3px solid #FDF8F0;
    border-top: 3px solid #C6A43F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0B3B2F 0%, #C6A43F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Focus States - Fixed (removed ring/ring-color) */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #C6A43F;
    border-color: #C6A43F;
}

/* Responsive Text */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}

/* Accessibility - Focus Visible */
*:focus-visible {
    outline: 2px solid #C6A43F;
    outline-offset: 2px;
}

/* Image Loading State */
img {
    background: #f3f4f6;
}

img[src=""],
img:not([src]) {
    opacity: 0;
}

/* Table Responsive */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
}

/* Hero Section Background Pattern */
.hero-pattern {
    background-image: 
        linear-gradient(135deg, rgba(11, 59, 47, 0.95) 0%, rgba(13, 71, 57, 0.95) 100%),
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h60v60H0z" fill="none"/><path d="M30 30m-10 0a10 10 0 1 0 20 0a10 10 0 1 0 -20 0" fill="rgba(198, 164, 63, 0.1)"/></svg>');
}

/* ============================================ */
/* DARK MODE STYLES - Pure Black with Gold Hover Shadows */
/* ============================================ */

.dark {
    color-scheme: dark;
}

/* Pure black background */
.dark body {
    background-color: #000000 !important;
}

/* Soft white text for readability */
.dark body,
.dark p,
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6,
.dark li,
.dark span,
.dark a,
.dark label {
    color: #e5e5e5;
}

/* Keep farm gold color */
.dark .text-farm-gold,
.dark a.text-farm-gold,
.dark .text-farm-gold * {
    color: #C6A43F !important;
}

/* Boxes blend completely with background - no shadow by default */
.dark .bg-white,
.dark .bg-gray-50,
.dark .bg-gray-100,
.dark .bg-gray-200,
.dark .bg-farm-cream,
.dark .rounded-xl,
.dark .rounded-2xl,
.dark .rounded-lg,
.dark .bg-gradient-to-br {
    background-color: #000000 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

/* Subtle gold shadow ONLY on hover */
.dark .rounded-xl:hover,
.dark .rounded-2xl:hover,
.dark .rounded-lg:hover,
.dark .bg-white:hover,
.dark .bg-farm-cream:hover,
.dark .bg-gradient-to-br:hover,
.dark [class*="shadow-"]:hover {
    box-shadow: 0 8px 25px rgba(198, 164, 63, 0.15) !important;
    transform: translateY(-2px);
}

/* Card backgrounds from about page */
.dark .from-white,
.dark .to-farm-cream {
    --tw-gradient-from: #000000 !important;
    --tw-gradient-to: #000000 !important;
}

/* Farm green background - darker */
.dark .bg-farm-green {
    background-color: #0a1a15 !important;
}

/* Farm gold background */
.dark .bg-farm-gold {
    background-color: #C6A43F !important;
}

/* Gradient backgrounds (hero sections) - pure black */
.dark .bg-gradient-to-r,
.dark .bg-gradient-to-br,
.dark .bg-gradient-to-tl {
    background-image: none !important;
    background-color: #000000 !important;
}

/* Stats section */
.dark .bg-farm-green .text-white,
.dark .bg-farm-green .text-5xl {
    color: white !important;
}

.dark .bg-farm-green .text-gray-300 {
    color: rgb(209, 213, 219) !important;
}

/* Border colors - subtle */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-300,
.dark .border-farm-gold\/20,
.dark .border-green-700 {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Footer */
.dark footer {
    background-color: #000000 !important;
}

.dark footer,
.dark footer p,
.dark footer li,
.dark footer h3,
.dark footer h4 {
    color: rgb(209, 213, 219) !important;
}

.dark footer .text-farm-gold {
    color: #C6A43F !important;
}

/* Form inputs - pure black */
.dark input,
.dark textarea,
.dark select {
    background-color: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e5e5e5 !important;
}

.dark input:focus,
.dark textarea:focus {
    border-color: #C6A43F !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(198, 164, 63, 0.2) !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Buttons */
.dark button:not(.bg-farm-gold):not(.bg-farm-green) {
    background-color: #0a0a0a !important;
    color: #e5e5e5 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.dark button:hover:not(.bg-farm-gold) {
    background-color: #111111 !important;
    box-shadow: 0 4px 15px rgba(198, 164, 63, 0.1) !important;
    transform: translateY(-1px);
}

/* Links */
.dark a:not(.text-farm-gold):not(.text-white) {
    color: rgb(209, 213, 219) !important;
}

.dark a:hover:not(.text-farm-gold) {
    color: #C6A43F !important;
}

/* Scrollbar in dark mode */
.dark::-webkit-scrollbar-track {
    background: #000000;
}

.dark::-webkit-scrollbar-thumb {
    background: #C6A43F;
    border-radius: 5px;
}

.dark::-webkit-scrollbar-thumb:hover {
    background: #a88b34;
}

/* Firefox scrollbar dark mode */
.dark {
    scrollbar-color: #C6A43F #000000;
}

/* Images - slightly dimmed */
.dark img {
    filter: brightness(0.85);
}

/* White text on dark green backgrounds */
.dark .bg-farm-green * {
    color: white !important;
}

.dark .bg-farm-green .text-farm-gold {
    color: #C6A43F !important;
}

/* Navigation bar */
.dark nav {
    background-color: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Mobile menu */
.dark #mobile-menu {
    background-color: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Keep gold color on hover */
.dark nav a:hover,
.dark #mobile-menu a:hover {
    color: #C6A43F !important;
}

/* =========================================
   FIX FONT AWESOME ICONS
========================================= */

.fa,
.fas,
.fa-solid,
.fa-regular,
.fa-brands,
.far,
.fab,
[class^="fa-"],
[class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal !important;
    font-weight: 900;
    display: inline-block;
    line-height: 1;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Regular icons */
.fa-regular,
.far {
    font-weight: 400 !important;
}

/* Brand icons */
.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Prevent dark mode overrides from affecting icons */
.dark i,
.dark .fa,
.dark .fas,
.dark .far,
.dark .fab,
.dark .fa-solid,
.dark .fa-regular,
.dark .fa-brands {
    color: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}