/* Sarvoday Prakruti Trust - Custom Styles */
/* Plain CSS for use with Tailwind CDN */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Aspect Ratio Utilities (not in Tailwind CDN) */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Animation Utilities (not in Tailwind CDN) */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Gradient Utilities (not in Tailwind CDN) */
.gradient-emerald {
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-800) 100%);
}

/* Component styles */

/* Buttons - All buttons have visible borders */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-600-rgb), 0.3);
}

.btn-primary {
    background-color: var(--color-primary-600);
    color: white;
    border-color: var(--color-primary-600);
}

.btn-primary:hover {
    background-color: var(--color-primary-700);
    border-color: var(--color-primary-700);
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #d1d5db;
    border-color: #9ca3af;
}

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

.btn-outline:hover {
    background-color: var(--color-primary-600);
    color: white;
}

/* White outline button for dark backgrounds */
.btn-white {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-white:hover {
    background-color: white;
    color: var(--color-primary-600);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

.card-hover {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: all 0.3s;
}

.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Forms - IMPORTANT: Input styling with visible borders */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #d1d5db !important;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1f2937;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary-600) !important;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-600-rgb), 0.2);
    outline: none;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Select dropdowns */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

/* Textarea */
textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--color-primary-600);
}

/* Section styling */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Utility styles */

/* Custom gradients */
.gradient-emerald {
    background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-500) 100%);
}

.gradient-hero {
    background: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-primary-600) 50%, var(--color-primary-500) 100%);
}

/* Text utilities */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Hero section specific */
.hero-bg {
    background-image: linear-gradient(rgba(6, 78, 59, 0.8), rgba(5, 150, 105, 0.9)), url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Donation amount buttons */
.donation-amount {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-primary-600);
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--color-primary-600);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.donation-amount:hover {
    background-color: var(--color-primary-600);
    color: white;
}

.donation-amount.active {
    background-color: var(--color-primary-600);
    color: white;
}

/* Donation amount buttons - alternative class name */
.donation-amount-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-primary-600);
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--color-primary-600);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.donation-amount-btn:hover,
.donation-amount-btn.selected {
    background-color: var(--color-primary-600);
    color: white;
}

/* Tree card styling */
.tree-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s;
}

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

/* Blog card styling */
.blog-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s;
}

.blog-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

/* Initiative card styling */
.initiative-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: all 0.3s;
}

.initiative-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary-200);
}

/* Stats counter styling */
.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary-600);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3rem;
    }
}

.stat-label {
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Table styling */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Alert/Notification styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: var(--color-primary-100);
    color: var(--color-primary-800);
    border: 1px solid var(--color-primary-300);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background-color: var(--color-primary-100);
    color: var(--color-primary-800);
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-pending {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--color-primary-600);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Prose styling for blog content */
.prose {
    max-width: 65ch;
    color: #374151;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #111827;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

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

.prose a {
    color: var(--color-primary-600);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--color-primary-700);
}

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

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

.prose blockquote {
    border-left: 4px solid var(--color-primary-600);
    padding-left: 1rem;
    font-style: italic;
    color: #6b7280;
    margin: 1.5rem 0;
}

.prose img {
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        color: black;
        background: white;
    }
}
