/* LCAL CMS Enhanced Design System - Inspired by Deeds Theme */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* CSS Variables for Design System */
:root {
    --primary-color: #f26938;
    --primary-hover: #e55a2b;
    --dark-text: #313131;
    --light-text: #6a6a6a;
    --bg-light: #f6f6f6;
    --white: #ffffff;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700;
    color: var(--dark-text);
    line-height: 1.2;
}

body, p {
    font-family: 'Lato', sans-serif !important;
    font-size: 18px;
    line-height: 1.7;
    color: var(--light-text);
}

/* Enhanced Button Styles */
.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    padding: 12px 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

/* Card Enhancements */
.card-enhanced {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    overflow: hidden;
    border: none;
}

.card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.card-enhanced .card-img-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    transition: var(--transition-smooth);
}

.card-enhanced:hover .card-img-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
}

/* Image Overlay Effects */
.img-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.img-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    z-index: 1;
}

.img-overlay:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.img-overlay .overlay-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    color: white;
    transform: translateY(10px);
    transition: var(--transition-smooth);
}

.img-overlay:hover .overlay-content {
    transform: translateY(0);
}

/* Enhanced Navigation */
.nav-enhanced {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
}

.nav-enhanced.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

/* Pulse Animation */
.pulse-anim {
    animation: pulse 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Markdown Content Styling */
.markdown-content {
    line-height: 1.7;
}

.markdown-content h1 {
    @apply text-3xl font-bold text-gray-900 mb-6 mt-8 first:mt-0;
}

.markdown-content h2 {
    @apply text-2xl font-bold text-gray-800 mb-4 mt-6;
}

.markdown-content h3 {
    @apply text-xl font-semibold text-gray-800 mb-3 mt-5;
}

.markdown-content h4 {
    @apply text-lg font-semibold text-gray-700 mb-2 mt-4;
}

.markdown-content p {
    @apply text-gray-700 mb-4 leading-relaxed;
}

.markdown-content ul, .markdown-content ol {
    @apply mb-4 pl-6;
}

.markdown-content li {
    @apply text-gray-700 mb-2;
}

.markdown-content ul li {
    @apply list-disc;
}

.markdown-content ol li {
    @apply list-decimal;
}

.markdown-content strong {
    @apply font-semibold text-gray-900;
}

.markdown-content em {
    @apply italic;
}

.markdown-content blockquote {
    @apply border-l-4 border-primary pl-4 py-2 my-4 bg-gray-50 italic text-gray-700;
}

.markdown-content code {
    @apply bg-gray-100 text-gray-800 px-2 py-1 rounded text-sm font-mono;
}

.markdown-content pre {
    @apply bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto my-4;
}

.markdown-content pre code {
    @apply bg-transparent text-gray-100 p-0;
}

.markdown-content a {
    @apply text-primary hover:text-primary-hover underline;
}

.markdown-content hr {
    @apply border-gray-300 my-8;
}

/* Enhanced Pagination */
.pagination-enhanced .page-link {
    border: none;
    background-color: var(--bg-light);
    color: var(--dark-text);
    font-weight: 700;
    height: 45px;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 2px;
    transition: var(--transition-smooth);
}

.pagination-enhanced .page-link:hover,
.pagination-enhanced .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Section Spacing */
.section-padding {
    padding: 80px 0;
}

.section-padding-sm {
    padding: 60px 0;
}

/* Text Gradients */
.text-gradient {
    color: #c49d6b;
}

/* Enhanced Focus Styles */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

/* Smooth transitions */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Custom gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* ------------------------------------------------------------
   Global Form Controls (ensure visibility with Tailwind preflight)
   ------------------------------------------------------------ */
/* Text-like inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="week"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    background-color: #ffffff;
    color: #111827; /* gray-900 */
    line-height: 1.5;
}

/* Placeholders */
input::placeholder,
textarea::placeholder {
    color: #9ca3af; /* gray-400 */
}

/* Focus ring */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 105, 56, 0.15);
}

/* Disabled state */
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f3f4f6; /* gray-100 */
    color: #6b7280; /* gray-500 */
    cursor: not-allowed;
}

/* Remove arrow styling inconsistencies and add spacing for selects */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1rem 1rem;
    padding-right: 2.25rem; /* space for chevron */
}

/* ------------------------------------------------------------
   Radio Card Options
   ------------------------------------------------------------ */
.radio-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1.5px solid #e5e7eb; /* gray-200 */
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
}

.radio-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.radio-card input[type="radio"] {
    flex-shrink: 0;
    margin-top: 3px;
}

.radio-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(242, 105, 56, 0.15), var(--shadow-medium);
}

.radio-card .text-sm { line-height: 1.4; }

/* Do not override file inputs with the generic styles above */
input[type="file"] {
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
}

/* ------------------------------------------------------------
   Prefixed input support (e.g., currency symbol)
   ------------------------------------------------------------ */
.with-prefix { position: relative; }
.with-prefix .prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280; /* gray-500 */
    pointer-events: none;
    font-size: 0.95rem;
}
.with-prefix input,
.with-prefix select,
.with-prefix textarea {
    padding-left: 2.25rem; /* ensure enough space for the prefix */
}
