/**
 * Directory Card Styles
 * 
 * Responsive card layout for the coaches directory grid.
 * Works with Divi Machine's grid system.
 * 
 * @package InGoal
 * @since 2026-01
 * @updated 2026-01-20 - Round 2 UX improvements
 */

/* ==========================================================================
   Card Base & Container
   ========================================================================== */

/* ==========================================================================
   Card Flip Animation
   3D flip effect when showing/hiding expanded contact view
   ========================================================================== */

/* Wrapper provides the 3D perspective */
.directory-card {
    --card-radius: 8px;
    --card-padding: 20px;
    --card-gap: 16px;
    --tier-color: #64748B;
    --card-max-height: 820px;
    --card-min-promo: 120px;
    
    position: relative;
    height: 100%;
    max-height: var(--card-max-height);
    perspective: 1200px;
}

/* Inner container that actually flips */
.directory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.directory-card.flipped .directory-card-inner {
    transform: rotateY(180deg);
}

/* Front face of card - constrained to card height */
.directory-card-front {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: var(--card-max-height);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--card-radius);
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Tier accent - subtle top border */
.directory-card-front::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--tier-color);
    flex-shrink: 0;
}

/* Back face of card (expanded contact) - absolute positioned over front */
.directory-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    text-align: center;
    background: #ffffff;
    border: 3px solid var(--tier-color);
    border-radius: var(--card-radius);
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
}

/* Hover state on card */
.directory-card:hover .directory-card-front {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: var(--tier-color);
}

/* Partner cards get subtle cyan left border on PAID tiers only */
.directory-card.tier-maximum-visibility[data-partner="true"] .directory-card-front,
.directory-card.tier-high-visibility[data-partner="true"] .directory-card-front,
.directory-card.tier-enhanced-listing[data-partner="true"] .directory-card-front {
    border-left: 2px solid #0891b2;
}

/* ==========================================================================
   Partner Badge - INLINE with Tooltip (original goalie mask badge)
   ========================================================================== */

.card-partner-badge {
    position: relative;
    display: inline-block;
    margin-top: 8px;
    cursor: help;
}

.card-partner-badge img {
    height: 28px;
    width: auto;
    transition: transform 0.2s ease;
}

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

/* Tooltip */
.card-partner-badge::after {
    content: 'This school supplies free InGoal memberships to all or some students – request info to learn more';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    width: 220px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.card-partner-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 101;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-partner-badge:hover::after,
.card-partner-badge:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Clickable Zones - Top & Bottom Link Areas
   These create larger click targets to drive traffic to individual pages
   ========================================================================== */

.card-top-link,
.card-bottom-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
}

/* Top link area - header + image */
.card-top-link {
    flex-shrink: 0;
}

/* Hover effect on top area - background highlight */
.card-top-link:hover {
    background: rgba(0, 217, 255, 0.04); /* Very subtle cyan tint */
}

.card-top-link:hover .card-title {
    color: var(--tier-color);
}

.card-top-link:hover .card-image {
    transform: scale(1.03);
}

/* Visual cue overlay on image hover - "View More" hint */
.card-media {
    position: relative;
}

.card-top-link:hover .card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 24, 40, 0.5) 0%, transparent 50%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Bottom link area - promo text + footer */
.card-bottom-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Allow flex child to shrink */
}

/* Hover effect on bottom area - background highlight */
.card-bottom-link:hover {
    background: rgba(0, 217, 255, 0.04); /* Very subtle cyan tint */
}

.card-bottom-link:hover .promo-text-scroll {
    color: #334155; /* Slightly darker text on hover */
}

/* Hover effect on bottom area - CTA button */
.card-bottom-link:hover .card-cta-button {
    background: var(--tier-color);
    border-color: var(--tier-color);
    color: white;
}

/* Image wrapper (replaces the old link) */
.card-image-wrapper {
    display: block;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Card Header: Logo + Title
   ========================================================================== */

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--card-padding);
    padding-bottom: calc(var(--card-padding) / 2);
    text-align: center;
    gap: 10px;
    position: relative;
}

.card-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-title-block {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.card-title {
    margin: 0 0 2px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

/* Title color is now controlled by parent link hover */
.card-title {
    transition: color 0.15s ease;
}

.card-location {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.3;
    /* Truncate long locations to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Location with overflow - pointer cursor, not question mark */
.card-location.has-more {
    cursor: pointer;
}

/* ==========================================================================
   Card Media: Image / Slider
   ========================================================================== */

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 140px; /* Ensure image always has reasonable height */
    background: #f1f5f9;
    overflow: hidden;
    flex-shrink: 0; /* Don't let flex layout shrink the image */
}

.card-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Image hover is now controlled by parent link */
.card-image {
    transition: transform 0.3s ease;
}

/* Image Slider */
.card-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-track {
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.slider-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-slider:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slider-prev {
    left: 8px;
}

.slider-next {
    right: 8px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

/* ==========================================================================
   Contact Info Block - COMPACT ICON ROW DESIGN
   Icons with tooltips - saves vertical space while preserving info access
   ========================================================================== */

.card-contact {
    padding: 10px var(--card-padding);
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Contact icons row */
.contact-icons-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
}

.contact-icon-btn {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    /* Reset button styles */
    border: none;
    padding: 0;
    font: inherit;
    outline: inherit;
}

.contact-icon-btn:hover {
    background: #0891b2;
    transform: scale(1.1);
}

.contact-icon-btn:hover svg {
    fill: white;
}

.contact-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: #475569;
    transition: fill 0.2s ease;
}

/* Tooltip for contact icons */
.contact-icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    pointer-events: none;
    max-width: 200px;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Tooltip arrow */
.contact-icon-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 101;
}

.contact-icon-btn:hover::after,
.contact-icon-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Request Info button - compact with subtle background */
.card-contact .card-request-btn {
    margin-top: 0;
    padding: 8px 14px;
    background: rgba(8, 145, 178, 0.08);
    color: #0891b2;
    border: 2px solid #0891b2;
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    width: 100%;
    display: block;
}

.card-contact .card-request-btn:hover {
    background: #0891b2;
    color: white;
}

/* Legacy contact row styles - for fallback/backwards compat */
.contact-row {
    padding: 3px 0;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.3;
}

/* Subtle dot separator */
.contact-row + .contact-row::before {
    content: '•';
    display: block;
    color: #cbd5e1;
    font-size: 0.4rem;
    line-height: 1;
    margin-bottom: 3px;
}

.contact-value {
    color: #334155;
    display: block;
}

/* Website display (non-clickable) */
.contact-website {
    color: #64748b;
    display: block;
}

/* ==========================================================================
   Email/URL Overflow Handling - LARGER Icons + Label fallback
   ========================================================================== */

/* Icons - LARGER size per feedback */
.contact-row .contact-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    fill: currentColor;
    opacity: 0.8;
}

/* When showing label instead of full text */
.contact-value.show-label,
.contact-website.show-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.contact-value.show-label .contact-text,
.contact-website.show-label .contact-text {
    display: none;
}

.contact-value.show-label .contact-label,
.contact-website.show-label .contact-label {
    display: inline;
}

/* Hide label by default, show text */
.contact-label {
    display: none;
}

.contact-text {
    display: inline;
}

/* ==========================================================================
   Social Icons - sized to match contact icons
   ========================================================================== */

.card-social {
    padding: 10px var(--card-padding);
    display: flex;
    justify-content: center;
    border-top: 1px solid #f1f5f9;
}

.card-social-icons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Social icons - 32px to match contact icons */
.card-social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1e293b;
    color: white;
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.card-social-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.card-social-icon:hover {
    transform: scale(1.1);
}

/* Platform-specific colors on hover */
.card-social-icon.facebook:hover { background: #1877f2; }
.card-social-icon.instagram:hover { background: #e4405f; }
.card-social-icon.x:hover { background: #000000; }
.card-social-icon.youtube:hover { background: #ff0000; }

/* ==========================================================================
   Promotional Text (Scrollable) - WITH FADE HINT
   Adaptive height: fills available card space so cards with less content
   above give more room to the scrolling text area.
   ========================================================================== */

.card-promo {
    flex: 1;
    padding: 0 var(--card-padding);
    padding-top: 8px;
    min-height: var(--card-min-promo); /* Minimum height ensures some promo text is always visible */
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contain the scrollable area */
}

.promo-text-scroll {
    flex: 1;
    overflow-y: auto;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #475569;
    padding-right: 8px;
    /* Add padding at bottom for fade effect */
    padding-bottom: 20px;
}

/* Fade gradient at bottom to indicate scrollable content */
.card-promo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--card-padding);
    right: var(--card-padding);
    height: 40px;
    background: linear-gradient(to bottom, transparent 0%, white 80%);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Hide fade when scrolled to bottom (JS will add this class) */
.card-promo.scrolled-bottom::after {
    opacity: 0;
}

/* No content to scroll - hide fade */
.card-promo.no-scroll::after {
    opacity: 0;
}

/* Subtle scrollbar styling - VISIBLE per UX feedback */
.promo-text-scroll::-webkit-scrollbar {
    width: 6px;
}

.promo-text-scroll::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.promo-text-scroll::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

.promo-text-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Text formatting inside promo */
.promo-text-scroll p {
    margin: 0 0 0.75em;
}

.promo-text-scroll p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Card Footer: CTA Button
   ========================================================================== */

.card-footer {
    padding: 12px var(--card-padding);
    margin-top: auto;
}

/* Learn More button - EXACTLY matches Request Info size & style but lighter */
.card-cta-button {
    display: block;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    color: #64748b;
    border: 2px solid #94a3b8;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 6px;
    box-sizing: border-box;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.card-cta-button:hover {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

/* Request button in footer (hidden - now in contact card) */
.card-footer .card-request-btn {
    display: none;
}

/* ==========================================================================
   Tier-Specific Styles
   ========================================================================== */

/* Maximum Exposure - Gold accent */
.directory-card.tier-maximum-visibility {
    --tier-color: #D4AF37;
}

/* High Visibility - Silver accent */
.directory-card.tier-high-visibility {
    --tier-color: #71717a;
}

/* Enhanced - Bronze/Copper accent */
.directory-card.tier-enhanced-listing {
    --tier-color: #CD7F32;
}

/* ==========================================================================
   FREE TIER - NO colored borders, subtle styling
   ========================================================================== */

.directory-card.tier-free-listing {
    --tier-color: #cbd5e1; /* Light gray for hover border */
    background: #fafbfc;
}

/* Remove top border on free tier */
.directory-card.tier-free-listing::before {
    display: none;
}

/* Free tier partners should NOT have the cyan left border - already handled by :not() selector above */

.directory-card.tier-free-listing .card-header {
    padding-bottom: var(--card-padding);
}

.directory-card.tier-free-listing .card-contact {
    background: #f1f5f9;
}

/* ==========================================================================
   Expanded Contact Card (Back Face) - Additional Styles
   ========================================================================== */

.directory-card-back .card-contact-expanded-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    transition: background 0.2s ease, color 0.2s ease;
}

.directory-card-back .card-contact-expanded-close:hover {
    background: #cbd5e1;
    color: #1e293b;
}

/* Click anywhere on back to close */
.directory-card-back {
    cursor: pointer;
}

/* Interactive elements get default cursor */
.directory-card-back a,
.directory-card-back .card-request-btn,
.directory-card-back .card-cta-button,
.directory-card-back .card-contact-expanded-close {
    cursor: pointer;
}

/* Back face Request Info button - matches front styling */
.directory-card-back .card-request-btn {
    padding: 10px 20px;
    font-size: 0.8125rem;
    background: rgba(8, 145, 178, 0.08);
    border: 2px solid #0891b2;
    color: #0891b2;
    width: 100%;
    max-width: 280px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}

.directory-card-back .card-request-btn:hover {
    background: #0891b2;
    color: white;
}

/* Back face See Camps button */
.directory-card-back .card-cta-button {
    width: 100%;
    max-width: 280px;
    border-radius: 6px;
    border-color: #94a3b8;
    color: #64748b;
}

.directory-card-back .card-cta-button:hover {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

.card-contact-expanded-header {
    margin-bottom: 16px;
}

.card-contact-expanded-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.card-contact-expanded-header p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
    line-height: 1.3;
}

.card-contact-expanded-list {
    width: 100%;
    max-width: 280px;
    margin-bottom: 20px;
}

.card-contact-expanded-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.card-contact-expanded-item:last-child {
    border-bottom: none;
}

.card-contact-expanded-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: #0891b2;
}

.card-contact-expanded-item a,
.card-contact-expanded-item span {
    font-size: 0.875rem;
    color: #334155;
    text-decoration: none;
    word-break: break-word;
    line-height: 1.3; /* Tighter line spacing for wrapped text */
}

/* Flexible email font size for long addresses */
.card-contact-expanded-item a[href^="mailto:"] {
    font-size: 0.875rem;
}

.card-contact-expanded-item.long-email a[href^="mailto:"] {
    font-size: 0.75rem;
}

.card-contact-expanded-item.very-long-email a[href^="mailto:"] {
    font-size: 0.65rem;
}

.card-contact-expanded-item a:hover {
    color: #0891b2;
}

.card-contact-expanded-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: #e2e8f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #64748b;
    transition: background 0.2s ease, color 0.2s ease;
}

.card-contact-expanded-close:hover {
    background: #cbd5e1;
    color: #1e293b;
}

.card-contact-expanded .card-request-btn {
    padding: 10px 20px;
    font-size: 0.8125rem;
    background: rgba(8, 145, 178, 0.08);
    border: 2px solid #0891b2;
    color: #0891b2;
    width: 100%;
    max-width: 280px;
    border-radius: 6px;
}

.card-contact-expanded .card-request-btn:hover {
    background: #0891b2;
    color: white;
}

.card-contact-expanded .card-cta-button {
    width: 100%;
    max-width: 280px;
    border-radius: 6px;
    border-color: #94a3b8;
    color: #64748b;
}

.card-contact-expanded .card-cta-button:hover {
    background: #64748b;
    border-color: #64748b;
    color: white;
}

/* ==========================================================================
   Loading Skeleton Animation
   ========================================================================== */

.directory-card.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.directory-card-skeleton {
    background: #f1f5f9;
    border-radius: var(--card-radius);
    overflow: hidden;
    height: 450px;
}

.directory-card-skeleton::before {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%
    );
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .directory-card {
        --card-padding: 16px;
        --card-max-height: 720px; /* Fits mobile screens */
        --card-min-promo: 100px; /* ~5 lines on mobile */
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-logo {
        width: 60px;
        height: 60px;
    }
    
    .card-media {
        min-height: 120px;
    }
    
    /* Larger touch targets on mobile */
    .card-social-icon,
    .contact-icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .card-social-icon svg,
    .contact-icon-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Tooltip adjustments for mobile */
    .card-partner-badge-inline::after {
        width: 180px;
        font-size: 0.6875rem;
    }
}

/* Touch devices - always show slider nav */
@media (hover: none) {
    .slider-nav {
        opacity: 0.7;
    }
}

/* ==========================================================================
   Animation for card entry
   ========================================================================== */

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

.directory-card.animate-in {
    animation: cardFadeIn 0.3s ease forwards;
}

/* ==========================================================================
   Archive Page Styles
   ========================================================================== */

/* Archive body - no margins/padding from theme */
body.coaches-archive {
    margin: 0;
    padding: 0;
}

body.coaches-archive #page-container,
body.coaches-archive #main-content,
body.coaches-archive #et-main-area {
    padding-top: 0 !important;
}

/* Archive Main Container - reduced top padding */
.coaches-archive-main {
    padding: 20px 20px 60px;
    background: #f1f5f9;
    min-height: 60vh;
}

.coaches-grid-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Grid Layout - responsive columns */
.coaches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Default: 3 columns */
    gap: 24px; /* Both horizontal and vertical gap */
}

/* No results message */
.no-coaches-found {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-coaches-found p {
    font-size: 18px;
}

/* Archive Search Form */
.archive-search-row {
    justify-content: center;
}

.archive-search-row .directory-search-wrapper {
    max-width: 800px;
    width: 100%;
}

.directory-search-form {
    display: flex;
    width: 100%;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.directory-search-input {
    flex: 1;
    border: none;
    padding: 14px 20px;
    font-size: 15px;
    outline: none;
}

.directory-search-input::placeholder {
    color: #94a3b8;
}

.directory-search-submit {
    background: #0077b6;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.directory-search-submit:hover {
    background: #005a8c;
}

.directory-search-submit svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Responsive Grid */
@media (max-width: 900px) {
    .coaches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .coaches-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .coaches-archive-main {
        padding: 15px 15px 40px;
    }
    
    .directory-search-input {
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* Wide desktop - 4 columns */
@media (min-width: 1400px) {
    .coaches-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
