/* Security Directory - Custom Styles */
/* Orange (#ff6b00) and Black (#1a1a1a) Theme */

:root {
    --primary-orange: #ff6b00;
    --primary-orange-hover: #e55a00;
    --primary-orange-light: #ff8533;
    --primary-black: #1a1a1a;
    --text-light: #f4f4f4;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background-color: #ffffff;
    padding-top: 0; /* No padding - specific elements will handle navbar clearance */
}

/* Additional spacing for fixed navbar */
.navbar.fixed-top {
    z-index: 1030; /* Ensure navbar stays on top */
}

/* Universal navbar clearance for all content */
body {
    padding-top: 90px; /* Increased navbar height clearance for larger logo */
}

/* Hero sections override body padding to connect seamlessly with navbar */
.hero-section {
    margin-top: -90px !important; /* Pull up to connect with navbar */
    padding-top: 90px !important; /* Internal padding for content */
    padding-bottom: 4rem;
}

/* Ensure hero section content has proper internal spacing */
.hero-section .container {
    padding-top: 2rem; /* Additional internal spacing for hero content */
}

.hero-section.bg-dark {
    background: linear-gradient(135deg, var(--primary-black) 0%, #2c2c2c 100%) !important;
    color: var(--text-light);
}

/* Improved contrast for hero sections */
.hero-section .display-4,
.hero-section h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 700;
}

.hero-section .lead {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Remove conflicting spacing rules */
body > section:first-of-type,
.container-fluid > .row:first-child {
    margin-top: 0; /* Remove since body has padding-top */
}

/* CTA Section spacing fix */
.cta-section {
    margin-bottom: 2rem; /* Ensure section isn't cut off */
}

/* News section spacing and uniform card heights */
.news-section {
    padding-bottom: 4rem; /* Extra bottom padding */
}

.news-section .row {
    display: flex;
    align-items: stretch; /* Ensure equal height columns */
}

.news-section .col-lg-4 {
    display: flex;
    flex-direction: column;
}

.news-section .card,
.news-section .product-of-day,
.news-section .upcoming-events {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-section .card {
    height: 100%;
}

.news-section .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Ensure proper section spacing on all pages */
.py-5 {
    padding-bottom: 4rem !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-black);
}

.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-weight: 700;
}
h1 {
    margin-top:20px !important;
}
/* Custom Button Styles */
.btn-primary {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-orange-hover);
    border-color: var(--primary-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 0, 0.3);
}

.btn-outline-primary {
    color: var(--primary-orange);
    border-color: var(--primary-orange);
}

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

/* Navigation Styles */
.navbar-dark {
    background-color: #0a0907 !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0.5rem 0; /* Add vertical padding for larger logo */
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-orange) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--primary-orange);
    color: white;
}

/* Hero Section - Legacy (overridden by earlier rules) */
/* This rule is overridden by the stronger hero-section rules above */

.hero-section h1 {
    color: white;
    margin-bottom: 1.5rem;
}

/* About page specific styles */
.bg-orange {
    background-color: var(--primary-orange) !important;
}

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

/* Ensure perfect alignment on all sections */
.container {
    max-width: 1200px;
}

/* About page card alignment */
.about-section .row {
    margin-left: -15px;
    margin-right: -15px;
}

.about-section .col-md-4,
.about-section .col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
}

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

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 0.5rem;
}

.hero-image img {
    border-radius: 1rem;
    max-height: 400px;
    object-fit: cover;
    width: 100%;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Stats Section */
.stats-section {
    background-color: var(--primary-black);
    color: white;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-orange) !important;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Feature Cards */
.feature-card {
    padding: 2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Directory Cards */
.directory-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.directory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange);
}

.directory-card .card-title a {
    color: var(--primary-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.directory-card .card-title a:hover {
    color: var(--primary-orange);
}

/* Grid/List View Toggle Styles */
.view-toggle {
    display: flex;
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
}

.view-toggle .btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.view-toggle .btn.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 107, 0, 0.3);
}

.view-toggle .btn:hover:not(.active) {
    color: var(--primary-orange);
    background: rgba(255, 107, 0, 0.1);
}

/* List View Styles */
.directory-list-view .directory-item {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
}

.directory-list-view .directory-item:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.directory-list-view .profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.directory-list-view .profile-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.directory-list-view .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.directory-list-view .profile-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.directory-list-view .profile-details {
    flex-grow: 1;
    min-width: 0;
}

.directory-list-view .profile-actions {
    flex-shrink: 0;
}

.directory-list-view .profile-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.directory-list-view .profile-title a {
    color: var(--primary-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.directory-list-view .profile-title a:hover {
    color: var(--primary-orange);
}

.directory-list-view .profile-subtitle {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.directory-list-view .profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.directory-list-view .profile-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.directory-list-view .profile-meta > div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Grid View (default) */
.directory-grid-view .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.directory-grid-view .col-lg-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .view-toggle {
        flex-direction: column;
        width: 100%;
    }
    
    .directory-list-view .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .directory-list-view .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Profile Styles */
.profile-card {
    box-shadow: var(--shadow-lg);
    border: none;
}

.profile-avatar {
    margin-bottom: 1rem;
}

.specialty-tags .badge {
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
}

/* Event Cards */
.event-card {
    border-left: 4px solid var(--primary-orange);
    transition: all 0.3s ease;
}

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

.event-date {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-light));
    color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.date-month {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.date-day {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.date-year {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Resource Cards */
.resource-card {
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-orange);
}

.resource-card .card-title {
    color: var(--primary-black);
    font-weight: 600;
}

/* Pricing Cards */
.pricing-card {
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

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

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

.pricing-card .card-header {
    border-bottom: none;
    padding: 2rem 1rem 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 1rem;
}

.price .currency,
.price .period {
    font-size: 1rem;
    font-weight: normal;
    opacity: 0.8;
}

.price .amount {
    font-size: 3rem;
}

.features-list {
    padding: 1rem 0;
}

.features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fc;
}

.features-list li:last-child {
    border-bottom: none;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.invalid-feedback {
    font-size: 0.875rem;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background-color: var(--primary-orange) !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: var(--primary-black) !important;
}

/* List Group */
.list-group-item.active {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.list-group-item.active:hover {
    background-color: var(--primary-orange-hover);
    border-color: var(--primary-orange-hover);
}

.list-group-item:hover {
    background-color: rgba(255, 107, 0, 0.1);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-orange);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.pagination .page-link:hover {
    color: var(--primary-orange-hover);
    background-color: rgba(255, 107, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--primary-black) !important;
    color: var(--text-light);
}

footer h5,
footer h6 {
    color: var(--text-light);
}

footer .text-muted {
    color: rgba(244, 244, 244, 0.7) !important;
}

footer .text-muted:hover {
    color: var(--primary-orange) !important;
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-orange) !important;
}

/* Admin Panel Styles */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-orange) !important;
}

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

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* Alert Styles */
.alert-primary {
    background-color: rgba(255, 107, 0, 0.1);
    border-color: rgba(255, 107, 0, 0.2);
    color: var(--primary-orange-hover);
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
        padding-top: 100px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .event-date {
        display: inline-block;
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .date-day {
        font-size: 1.5rem;
    }
    
    .price .amount {
        font-size: 2rem;
    }
    
    .display-1 {
        font-size: 4rem;
    }
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .stat-item {
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .btn,
    footer {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-black: #ffffff;
        --text-light: #1a1a1a;
        --bg-light: #2c2c2c;
        --border-color: #404040;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--primary-black);
    }
    
    .card {
        border: 2px solid var(--primary-black);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Inline Editor Styles */
.editable-content {
    position: relative;
    transition: all 0.2s ease;
}

.editable-content:hover::after {
    content: "✏️ Click to edit";
    position: absolute;
    top: -25px;
    right: 0;
    background: #ff6b00;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0.9;
}

.inline-editor-container {
    position: relative;
    margin: 10px 0;
    border: 2px solid #ff6b00;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.15);
}

.inline-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ff6b00;
    color: white;
    padding: 8px 15px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
}

.inline-editor-label {
    font-size: 14px;
}

.inline-editor-actions {
    display: flex;
    gap: 8px;
}

.inline-editor-input {
    padding: 15px;
}

.inline-editor-input textarea {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}

.inline-editor-input textarea:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
}

.inline-editor-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Admin edit mode indicator */
body[data-is-admin="true"] .editable-content {
    position: relative;
}

body[data-is-admin="true"] .editable-content:not(:hover)::before {
    content: "✏️";
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff6b00;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0.7;
    z-index: 100;
}
