/* static/css/input.css */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom CSS for VamiHomes */
@layer base {
    ::selection {
        background: #ef4444;
        color: white;
    }
}

.filter-btn,
.category-btn {
    background-color: #f3f4f6;
    color: #374151;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover,
.category-btn:hover {
    background-color: #fee2e2;
    color: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-btn.active,
.category-btn.active {
    background-color: #dc2626;
    color: #ffffff;
}

.filter-btn.active:hover,
.category-btn.active:hover {
    background-color: #b91c1b;
}

/* Ensure proper background colors are applied */
.filter-btn.bg-gray-100,
.category-btn.bg-gray-100 {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}

.filter-btn.bg-red-600,
.category-btn.bg-red-600 {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

.filter-btn.hover\:bg-red-100:hover,
.category-btn.hover\:bg-red-100:hover {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

/* Filter Forms */
.filter-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-form select,
.filter-form input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-form select:focus,
.filter-form input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

.filter-form label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Search Bar */
.search-bar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.search-bar input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

/* Filter Buttons */
.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-actions button,
.filter-actions a {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-actions button:hover,
.filter-actions a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card hover effects */
.project-card,
.news-card,
.event-card {
    transition: all 0.3s ease;
}

.project-card:hover,
.news-card:hover,
.event-card:hover {
    transform: translateY(-4px);
}

/* Image modal */
#imageModal {
    backdrop-filter: blur(5px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

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

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Button animations */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

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

/* Border gradients */
.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) 1;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #dc2626;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
@keyframes ring {
    0% {
        transform: scale(1);
    }
    6% {
        transform: scale(1.1);
    }
    12% {
        transform: scale(0.9);
    }
    18% {
        transform: scale(1.05);
    }
    24% {
        transform: scale(0.95);
    }
    30% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
    }
}

.ringing {
    animation: ring 5s infinite;
    transform-origin: center;
}

.content-body img {
    width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
