/* Circle Members Directory Custom Styles */

/* AIJRP Brand Color Palette */
:root {
    /* Primary Colors */
    --brand-main-navy: #013768;
    --brand-sky-blue: #287FC0;
    --brand-cta-orange: #FF7518;
    --brand-growth-green: #A2C617;
    
    /* Light Tints */
    --brand-light-green: #FBFECC;
    --brand-light-orange: #FFF4E9;
    --brand-light-blue: #EAF4FF;
    --brand-light-gray: #F8F8F8;
    
    /* Legacy aliases for backward compatibility */
    --brand-orange: #FF7518;
    --brand-navy: #013768;
    --brand-dark-navy: #013768;
}

/* Base styles - prevent unwanted spacing */
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure footer sticks to bottom without extra space */
footer {
    margin-top: auto;
}

/* Mobile-specific: Remove any bottom padding/margin on body */
@media (max-width: 767px) {
    body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    footer {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* Typography */
/* Default body font - Plus Jakarta Sans */
body, p, span, div, a, button, input, select, textarea {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Bebas Neue for titles */
.bebas-title {
    font-family: 'Bebas Neue', cursive;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', cursive;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 900;
    color: var(--brand-main-navy);
}

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

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

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

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

/* Line clamp for bio text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Member card hover effects */
.member-card {
    transition: all 0.2s ease-in-out;
}

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

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
button:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-offset: 2px;
}

/* Smooth transitions for interactive elements */
button,
input,
select,
a {
    transition: all 0.2s ease-in-out;
}

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

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

.badge-green {
    background-color: #dcfce7;
    color: #166534;
}

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

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

/* Responsive grid improvements */
@media (max-width: 640px) {
    .grid-responsive {
        grid-template-columns: 1fr;
    }
}

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

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

/* Removed 4-column grid - max 3 columns */

/* Search highlight */
.search-highlight {
    background-color: #fef08a;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

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

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

/* Error state styling */
.error-container {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
}

.error-title {
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.error-message {
    color: #7f1d1d;
    font-size: 0.875rem;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    color: #9ca3af;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-title {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Social links styling */
.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.social-link {
    color: #9ca3af;
    transition: color 0.2s ease-in-out;
    font-size: 1rem;
}

.social-link:hover {
    color: #4b5563;
}

.social-link.twitter:hover {
    color: #1da1f2;
}

.social-link.linkedin:hover {
    color: #0077b5;
}

.social-link.website:hover {
    color: #059669;
}

/* Member avatar styling */
.member-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f4f6;
    margin: 0 auto 1rem;
    display: block;
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.pagination-button {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #374151;
    transition: all 0.2s ease-in-out;
}

.pagination-button:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Responsive typography */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 1.5rem;
    }
    
    .text-responsive-lg {
        font-size: 1.25rem;
    }
    
    .text-responsive-base {
        font-size: 1rem;
    }
}

@media (min-width: 641px) {
    .text-responsive-xl {
        font-size: 2rem;
    }
    
    .text-responsive-lg {
        font-size: 1.5rem;
    }
    
    .text-responsive-base {
        font-size: 1.125rem;
    }
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-overlay {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-show .modal-content {
    animation: modalSlideUp 0.3s ease-out;
}

/* Verified Pro info modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Smooth modal transitions - prevent blink/glitch */
#member-modal {
    transition: opacity 0.3s ease-out;
}

#modal-container {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    will-change: transform, opacity;
}

#member-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

#member-modal:not(.hidden) {
    opacity: 1;
}

/* No image processing - use original quality from Circle.so */

/* Print styles */
@media print {
    /* Hide page numbers added by browser */
    @page {
        margin: 0.5in;
        size: letter;
    }
    
    /* Hide non-essential elements */
    .no-print,
    header,
    #close-modal,
    button,
    .no-print-hide,
    footer,
    /* Hide filters and search bar */
    .bg-white.rounded-lg.shadow-sm.border.p-6.mb-6,
    .bg-white.shadow-sm.border,
    form,
    input[type="text"],
    select,
    nav,
    #loading,
    #error,
    #empty-state,
    #pagination,
    .hide-desktop,
    .hide-mobile {
        display: none !important;
    }
    
    /* Show only modal content */
    #member-modal {
        position: static !important;
        background: none !important;
        display: block !important;
    }
    
    #modal-container {
        max-height: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    #modal-content {
        padding: 0 !important;
    }
    
    .print-section {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }
    
    /* Print typography */
    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
    }
    
    h2, h3 {
        page-break-after: avoid;
        color: #000;
    }
    
    /* Print links - don't show URLs for profile links */
    a[href]:after {
        content: "";
    }
    
    /* Image sizing for print */
    img {
        max-width: 150px !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Grid cards - hide during print */
    #members-grid,
    .member-card {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .member-card {
        border: 2px solid #000;
    }
    
    .badge {
        border: 1px solid currentColor;
    }
    
    .social-link {
        border: 1px solid transparent;
    }
    
    .social-link:focus {
        border-color: currentColor;
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-slide-up,
    .animate-spin {
        animation: none;
    }
    
    .member-card {
        transition: none;
    }
    
    button,
    input,
    select,
    a {
        transition: none;
    }
}

/* Desktop tagline font size */
.tagline-desktop {
    font-size: 1.1rem;
}

/* Responsive header text for tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .responsive-header-text h1 {
        font-size: 2rem !important; /* Down from 3rem */
    }
    
    .responsive-header-text .tagline-desktop {
        font-size: 0.9rem; /* Down from 1.1rem */
    }
}

/* Green border for active location filter (mobile) */
#location-filter-mobile.has-filter {
    border-color: var(--brand-growth-green) !important;
    border-width: 1px;
}

/* Main grid card hover effects */
.member-card {
    transition: all 0.3s ease;
}

/* View Full Profile button - turns orange on card hover */
.member-card button:not(.copy-link-btn) {
    transition: all 0.3s ease;
}

.member-card:hover button:not(.copy-link-btn) {
    background: var(--brand-cta-orange) !important;
}

.member-card:hover button:not(.copy-link-btn) i.fa-arrow-right {
    transform: translateX(2px);
    transition: transform 0.3s ease;
}

/* Copy Link button on image - underline on hover */
.copy-link-btn {
    transition: all 0.2s ease;
}

.copy-link-btn:hover {
    text-decoration: underline;
}

/* Modal action buttons - clean solid navy hover */
.modal-action-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.modal-action-btn * {
    pointer-events: none;
}

.modal-action-btn:hover {
    background-color: var(--brand-main-navy) !important;
    color: white !important;
    border-color: var(--brand-main-navy) !important;
}

/* Footer link hover - underline on hover */
.footer-link {
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Mobile Action Capsule - Apple-style Glassmorphism */
.mobile-action-capsule {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 32px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Enhance button hover in glassmorphic capsule */
.mobile-action-capsule a:hover,
.mobile-action-capsule button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(1, 55, 104, 0.2);
}

/* Mobile/Tablet: Show download button, hide desktop QR instructions */
@media (max-width: 1023px) {
    .hide-mobile {
        display: none !important;
    }
    .show-mobile {
        display: block !important;
    }
}

/* Desktop: Hide download button, show QR instructions */
@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }
    .show-desktop {
        display: block !important;
    }
}

/* Typography Utility Classes */
.text-xl {
    font-size: 2.25rem;
    line-height: 1.75rem;
}

.text-lg {
    font-size: 1.7rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 3.875rem;
    line-height: 4.25rem;
}

.text-sm {
    font-size: 0.95rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 500;
}