/* 
 * Prison Guard Reunion Website
 * Custom Theme CSS
 * Primary Color: #035223 (Dark Green)
 * Only green color variations used
 */

:root {
    --primary-color: #035223;
    --primary-light: #046b2d;
    --primary-lighter: #059637;
    --primary-dark: #023918;
    --primary-50: #e6f2ec;
    --primary-100: #b3d9c2;
    --primary-200: #80c098;
    --primary-300: #4da76f;
    --primary-400: #1a8e45;
    --primary-500: #035223;
    --primary-600: #02421c;
    --primary-700: #023215;
    --primary-800: #01210e;
    --primary-900: #011107;
    
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
}

/* Tailwind CSS Custom Configuration */
@layer utilities {
    /* Background Colors */
    .bg-primary { background-color: var(--primary-color) !important; }
    .bg-primary-light { background-color: var(--primary-light) !important; }
    .bg-primary-dark { background-color: var(--primary-dark) !important; }
    .bg-primary-50 { background-color: var(--primary-50) !important; }
    .bg-primary-100 { background-color: var(--primary-100) !important; }
    
    /* Text Colors */
    .text-primary { color: var(--primary-color) !important; }
    .text-primary-light { color: var(--primary-light) !important; }
    .text-primary-dark { color: var(--primary-dark) !important; }
    
    /* Border Colors */
    .border-primary { border-color: var(--primary-color) !important; }
    .border-primary-light { border-color: var(--primary-light) !important; }
    
    /* Hover States */
    .hover\:bg-primary:hover { background-color: var(--primary-color) !important; }
    .hover\:bg-primary-light:hover { background-color: var(--primary-light) !important; }
    .hover\:text-primary:hover { color: var(--primary-color) !important; }
    
    /* Focus States */
    .focus\:ring-primary:focus {
        --tw-ring-color: var(--primary-color) !important;
    }
    
    .focus\:border-primary:focus {
        border-color: var(--primary-color) !important;
    }
}

/* Override Tailwind Green Classes */
.bg-green-50 { background-color: var(--primary-50) !important; }
.bg-green-100 { background-color: var(--primary-100) !important; }
.bg-green-500 { background-color: var(--primary-500) !important; }
.bg-green-600 { background-color: var(--primary-color) !important; }
.bg-green-700 { background-color: var(--primary-dark) !important; }

.text-green-50 { color: var(--primary-50) !important; }
.text-green-500 { color: var(--primary-500) !important; }
.text-green-600 { color: var(--primary-color) !important; }
.text-green-700 { color: var(--primary-dark) !important; }
.text-green-800 { color: var(--primary-800) !important; }

.border-green-500 { border-color: var(--primary-500) !important; }
.border-green-600 { border-color: var(--primary-color) !important; }

.hover\:bg-green-50:hover { background-color: var(--primary-50) !important; }
.hover\:bg-green-600:hover { background-color: var(--primary-color) !important; }
.hover\:bg-green-700:hover { background-color: var(--primary-dark) !important; }
.hover\:text-green-600:hover { color: var(--primary-color) !important; }
.hover\:text-green-700:hover { color: var(--primary-dark) !important; }

.focus\:ring-green-500:focus {
    --tw-ring-color: var(--primary-500) !important;
}

.focus\:border-green-500:focus {
    border-color: var(--primary-500) !important;
}

/* Override Tailwind Red Classes to Green */
.bg-red-50 { background-color: var(--primary-50) !important; }
.bg-red-100 { background-color: var(--primary-100) !important; }
.bg-red-500 { background-color: var(--primary-500) !important; }
.bg-red-600 { background-color: var(--primary-color) !important; }
.bg-red-700 { background-color: var(--primary-dark) !important; }

.text-red-50 { color: var(--primary-50) !important; }
.text-red-500 { color: var(--primary-500) !important; }
.text-red-600 { color: var(--primary-color) !important; }
.text-red-700 { color: var(--primary-dark) !important; }
.text-red-800 { color: var(--primary-800) !important; }

.border-red-500 { border-color: var(--primary-500) !important; }
.border-red-600 { border-color: var(--primary-color) !important; }

.hover\:bg-red-50:hover { background-color: var(--primary-50) !important; }
.hover\:bg-red-600:hover { background-color: var(--primary-color) !important; }
.hover\:bg-red-700:hover { background-color: var(--primary-dark) !important; }
.hover\:text-red-600:hover { color: var(--primary-color) !important; }
.hover\:text-red-700:hover { color: var(--primary-dark) !important; }

.focus\:ring-red-500:focus {
    --tw-ring-color: var(--primary-500) !important;
}

.focus\:border-red-500:focus {
    border-color: var(--primary-500) !important;
}

/* Override gradient with red to green only */
.from-primary.to-red-600 { 
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
}

.from-primary-50.to-red-100,
.from-green-50.to-red-100 { 
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%) !important;
}

/* Gradient Overrides */
.from-green-50 { --tw-gradient-from: var(--primary-50) !important; }
.from-green-100 { --tw-gradient-from: var(--primary-100) !important; }
.from-green-500 { --tw-gradient-from: var(--primary-500) !important; }
.from-green-600 { --tw-gradient-from: var(--primary-color) !important; }
.from-green-700 { --tw-gradient-from: var(--primary-dark) !important; }

.via-green-500 { --tw-gradient-via: var(--primary-500) !important; }
.via-green-600 { --tw-gradient-via: var(--primary-color) !important; }

.to-green-50 { --tw-gradient-to: var(--primary-50) !important; }
.to-green-100 { --tw-gradient-to: var(--primary-100) !important; }
.to-green-500 { --tw-gradient-to: var(--primary-500) !important; }
.to-green-600 { --tw-gradient-to: var(--primary-color) !important; }

.from-red-50 { --tw-gradient-from: var(--primary-50) !important; }
.from-red-100 { --tw-gradient-from: var(--primary-100) !important; }
.from-red-500 { --tw-gradient-from: var(--primary-500) !important; }
.from-red-600 { --tw-gradient-from: var(--primary-color) !important; }
.from-red-700 { --tw-gradient-from: var(--primary-dark) !important; }

.via-red-500 { --tw-gradient-via: var(--primary-500) !important; }
.via-red-600 { --tw-gradient-via: var(--primary-color) !important; }

.to-red-50 { --tw-gradient-to: var(--primary-50) !important; }
.to-red-100 { --tw-gradient-to: var(--primary-100) !important; }
.to-red-500 { --tw-gradient-to: var(--primary-500) !important; }
.to-red-600 { --tw-gradient-to: var(--primary-color) !important; }

/* Custom Components */

/* Header Gradient */
.header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
}

/* Button Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(3, 82, 35, 0.3);
}

/* Button Secondary (converted to green) */
.btn-secondary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(3, 82, 35, 0.3);
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(3, 82, 35, 0.15);
}

/* Badge Primary */
.badge-primary {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Section Header with Border */
.section-header-primary {
    position: relative;
    padding-left: 1rem;
}

.section-header-primary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
}

/* Navigation Active State */
.nav-active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
}

/* Form Inputs */
.form-input-primary:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3, 82, 35, 0.1);
}

/* Progress Bar */
.progress-bar-primary {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    height: 4px;
    border-radius: 2px;
}

/* Alert Primary */
.alert-primary {
    background-color: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-dark);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
}

/* Custom Scrollbar */
.custom-scrollbar-primary::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar-primary::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.custom-scrollbar-primary::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
    border-radius: 4px;
}

.custom-scrollbar-primary::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-dark), var(--primary-color));
}

/* Icon Colors */
.icon-primary {
    color: var(--primary-color);
}

.icon-primary-light {
    color: var(--primary-light);
}

/* Link Colors */
a.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a.link-primary:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Shadow Effects */
.shadow-primary {
    box-shadow: 0 10px 30px rgba(3, 82, 35, 0.2);
}

.shadow-primary-lg {
    box-shadow: 0 20px 50px rgba(3, 82, 35, 0.25);
}

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

/* Photo Container Border */
.photo-border-primary {
    border: 4px solid var(--primary-color);
}

/* Divider */
.divider-primary {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Dot */
.notification-dot-primary {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
}

/* Feature Box */
.feature-box-primary {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border: 1px solid var(--primary-100);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-box-primary:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(3, 82, 35, 0.15);
}

/* Stats Card */
.stats-card-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(3, 82, 35, 0.3);
}

/* Timeline Dot */
.timeline-dot-primary {
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border: 4px solid var(--primary-50);
    border-radius: 50%;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Mobile Navigation */
    .mobile-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9999;
        backdrop-filter: blur(2px);
    }
    
    .mobile-nav.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .mobile-nav-content {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        background: white;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        animation: slideInLeft 0.3s ease;
    }
    
    @keyframes slideInLeft {
        from { transform: translateX(-100%); }
        to { transform: translateX(0); }
    }
    
    .mobile-nav-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
        color: white;
        padding: 1rem 1.25rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 8px rgba(3, 82, 35, 0.2);
    }
    
    .mobile-nav-header h3 {
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .mobile-nav-close {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 0.5rem;
        padding: 0.5rem;
        transition: all 0.2s;
        border: none;
        cursor: pointer;
    }
    
    .mobile-nav-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: rotate(90deg);
    }
    
    .mobile-nav-content a {
        display: block;
        padding: 1rem 1.5rem;
        color: #374151;
        font-weight: 500;
        border-bottom: 1px solid #f3f4f6;
        transition: all 0.2s;
        font-size: 1rem;
    }
    
    .mobile-nav-content a:hover,
    .mobile-nav-content a:active {
        background: var(--primary-50);
        color: var(--primary-color);
        padding-left: 2rem;
    }
    
    .mobile-nav-content a.active {
        background: var(--primary-50);
        color: var(--primary-color);
        border-left: 4px solid var(--primary-color);
        font-weight: 600;
    }
    
    .mobile-menu-btn {
        display: block !important;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        transition: all 0.2s;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(3, 82, 35, 0.1);
        border-radius: 0.5rem;
    }
    
    .desktop-nav {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .desktop-nav {
        display: flex !important;
    }
}

/* Fix slider white space */
.compact-slider {
    margin-bottom: 0 !important;
}

section.container.mx-auto.px-4.py-6 {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove extra spacing after slider */
.compact-slider + * {
    margin-top: 0 !important;
}

/* Print Styles */
@media print {
    .header-gradient {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Footer Styles */
footer.bg-gray-800 {
    background: var(--primary-light) !important;
}

footer .border-gray-700 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

footer .text-gray-300,
footer .text-gray-400 {
    color: rgba(255, 255, 255, 0.9) !important;
}

footer a.text-gray-300:hover {
    color: white !important;
}