/* Custom styles for South Carolina Locksmith Association */

:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0891b2;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --accent-color: #7c3aed;
    --gold-color: #f59e0b;
    
    /* New color palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--slate-700);
    background-color: var(--slate-50);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--slate-800);
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading);
    font-weight: 800;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--slate-700);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    text-transform: none;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    color: white;
}

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

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 15px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
    border-radius: 8px;
}

.card {
    border-radius: 20px;
    border: none;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-body {
    padding: 2rem;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    font-weight: 600;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.15);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    background: linear-gradient(45deg, var(--gold-color), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.25), rgba(30, 58, 138, 0.2)),
                url('assets/images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 64, 175, 0.6));
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(15, 23, 42, 0.5) 100%);
    pointer-events: none;
}

.hero-section h1 {
    color: #ffffff !important;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-section p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5), 0 1px 5px rgba(0, 0, 0, 0.3);
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 1;
}

.hero-section .btn {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    font-weight: 600;
    border: none;
}

.hero-section .btn-light {
    background: rgba(255, 255, 255, 0.98);
    color: var(--slate-800) !important;
    border: 2px solid rgba(255, 255, 255, 0.98);
}

.hero-section .btn-light:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 1);
    color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Member Directory */
.member-photo {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.member-card .card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--slate-200);
}

.member-card:hover .card {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(30, 64, 175, 0.15);
    border-color: var(--primary-light);
}

.member-card:hover .member-photo {
    transform: scale(1.05);
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.bg-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light)) !important;
}

.badge.bg-success {
    background: linear-gradient(45deg, var(--success-color), #10b981) !important;
}

.badge.bg-warning {
    background: linear-gradient(45deg, var(--warning-color), #f59e0b) !important;
    color: white !important;
}

.badge.bg-info {
    background: linear-gradient(45deg, var(--info-color), #06b6d4) !important;
}

/* Board Members */
.board-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 4px solid var(--slate-200);
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.board-photo:hover {
    border-color: var(--primary-color);
    transform: scale(1.08);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.2);
}

/* Classifieds */
.classified-item .card {
    transition: all 0.3s ease;
}

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

.object-cover {
    object-fit: cover;
}

/* Meetings Section */
.border-4 {
    border-width: 4px !important;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Contact Section */
.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800)) !important;
    position: relative;
    color: #ffffff !important;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Footer text overrides for better readability */
footer .text-muted,
footer .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer .text-muted:hover,
footer .text-secondary:hover {
    color: rgba(255, 255, 255, 1) !important;
}

footer h5, footer h6 {
    color: #ffffff !important;
}

footer a.text-muted,
footer a.text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
}

footer a.text-muted:hover,
footer a.text-secondary:hover {
    color: #ffffff !important;
}

.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
    color: rgba(255, 255, 255, 0.8) !important;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-light) !important;
}

/* Utility Classes */
.shadow-soft {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.rounded-lg {
    border-radius: 1.5rem !important;
}

.rounded-xl {
    border-radius: 2rem !important;
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold {
    background: linear-gradient(45deg, var(--gold-color), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Page Headers */
.py-5.bg-light {
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100)) !important;
    position: relative;
}

.py-5.bg-light::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--slate-300), transparent);
}

/* Enhanced sections */
section {
    position: relative;
}

.bg-light {
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100)) !important;
}

/* Icon enhancements */
.fa-3x {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-primary.fa-3x,
.text-success.fa-3x,
.text-warning.fa-3x,
.text-info.fa-3x {
    background: linear-gradient(45deg, currentColor, currentColor);
    -webkit-background-clip: text;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, var(--slate-200) 25%, var(--slate-100) 50%, var(--slate-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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



/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .member-photo {
        height: 250px;
    }
    
    .board-photo {
        width: 100px;
        height: 100px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 0.5rem;
        border-radius: 8px !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Search and Filter Styles */
.input-group {
    border-radius: 8px;
    overflow: hidden;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 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 #ccc;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* Custom Bootstrap Overrides */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #047857);
    border: none;
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ea580c);
    border: none;
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0e7490);
    border: none;
    color: white;
}

/* Modern spacing */
.py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

/* Additional text contrast fixes */
.card-text {
    color: var(--slate-700) !important;
}

.card-text.small {
    color: var(--slate-600) !important;
}

/* Improve link readability */
a.text-decoration-none {
    transition: color 0.3s ease;
}

a.text-decoration-none:hover {
    color: var(--primary-color) !important;
}

/* Better contrast for table text */
.table td, .table th {
    color: var(--slate-800) !important;
}

.table .text-muted {
    color: var(--slate-600) !important;
}

/* Accordion text improvements */
.accordion-body {
    color: var(--slate-700) !important;
}

/* Card Enhancements */
.card-header {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.list-group-item {
    border: none;
    padding: 1rem;
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Form Enhancements */
.form-control,
.form-select {
    border: 2px solid var(--slate-200);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 0.5rem;
}

/* Text contrast improvements */
.text-muted {
    color: var(--slate-700) !important;
}

.text-secondary {
    color: var(--slate-800) !important;
}

.card .text-muted {
    color: var(--slate-600) !important;
}

.card .text-secondary {
    color: var(--slate-700) !important;
}

.small.text-muted {
    color: var(--slate-700) !important;
}

.small.text-secondary {
    color: var(--slate-800) !important;
}

/* Ensure readable text on light backgrounds */
.bg-light .text-muted {
    color: var(--slate-700) !important;
}

.bg-light .text-secondary {
    color: var(--slate-800) !important;
}

/* Page header text improvements */
.py-5.bg-light .lead {
    color: var(--slate-700) !important;
    font-weight: 500;
}

.py-5.bg-light h1, .py-5.bg-light h2, .py-5.bg-light h3 {
    color: var(--slate-900) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.input-group .form-control {
    border-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-radius: 0;
    border-left: none;
}

/* Table Enhancements */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    border-bottom: none;
    color: var(--dark-color);
}

.table tbody td {
    border-color: rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

/* Progress Indicators */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 4px;
}

/* Tooltip and Popover Enhancements */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 6px;
    font-size: 0.875rem;
}

.popover {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

/* Image Hover Effects */
img {
    transition: all 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

/* Accessibility Improvements */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* CTA Section Improvements */
.card.bg-primary.text-white h3,
.card.bg-primary.text-white .lead {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card.bg-primary.text-white .lead {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

.card.bg-primary.text-white {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    border: none;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

.card.bg-primary.text-white .btn-light {
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--slate-800) !important;
    border: 2px solid rgba(255, 255, 255, 0.98) !important;
    font-weight: 600;
    text-shadow: none;
}

.card.bg-primary.text-white .btn-light:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: var(--primary-color) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card.bg-primary.text-white .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.98) !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card.bg-primary.text-white .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 1) !important;
    color: rgba(255, 255, 255, 1) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}



/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    footer {
        display: none;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}



.member-card {
    transition: all 0.3s ease;
}

.member-card:hover {
    transform: translateY(-2px);
}

.member-card:hover .card {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Remove blue outline from search fields */
#memberSearch:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
    box-shadow: none;
    border-color: #ced4da;
}

/* Performance Optimizations for Smooth Scrolling */
.btn,
.card,
.member-card,
.classified-item,
.contact-card,
.social-links a,
.navbar {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* Reduce animation intensity for better performance */
.card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.member-card:hover .card {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 15px 30px rgba(30, 64, 175, 0.1);
}

.btn:hover {
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Disable hover effects on touch devices to prevent flickering */
@media (hover: none) {
    .card:hover,
    .member-card:hover .card,
    .btn:hover,
    .classified-item:hover .card,
    .contact-card:hover,
    .social-links a:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Optimize scroll performance */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-overflow-scrolling: touch;
}

/* Clickable contact info styling */
.member-card .card-text a {
    color: inherit;
    transition: color 0.2s ease;
}

.member-card .card-text a:hover {
    color: var(--primary-color);
    text-decoration: none !important;
}

/* Board member contact info styling */
.card-body p a {
    color: inherit;
    transition: color 0.2s ease;
}

.card-body p a:hover {
    color: var(--primary-color);
    text-decoration: none !important;
}

/* Ensure call button always has visible border like email button */
.btn-outline-success {
    border: 2px solid #198754 !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active {
    border: 2px solid #198754 !important;
}
