/* hero-styles.css v4.0 - Social Board Hero Section
   NOTE: Font is loaded via PHP <link> in wp_head when shortcode is present.
   (Removed duplicate @import to avoid render-blocking + duplication.)
*/

/* CSS Custom Properties for easy theming and maintenance */
:root {
    /* Colors */
    --primary-blue: #2563eb;
    --primary-blue-light: #3b82f6;
    --primary-purple: #6366f1;
    --primary-purple-dark: #4f46e5;
    --primary-blue-dark: #1d4ed8;
    --accent-blue: #4361ee;
    --accent-yellow: #f59e0b;
    --text-dark: #1e293b;
    --text-medium: #64748b;
    --text-light: #94a3b8;
    --border-light: #e8f0fe;
    --border-medium: #e2e8f0;
    --background-light: #f1f5f9;
    --background-white: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.85rem;
    --font-size-base: 0.95rem;
    --font-size-md: 1.1rem;
    --font-size-lg: 1.2rem;
    --font-size-xl: 1.4rem;
    --font-size-2xl: 1.8rem;
    --font-size-3xl: 2.5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-card: 0 2px 12px var(--shadow-light);
    --shadow-card-hover: 0 4px 20px var(--shadow-medium);
    --shadow-button: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-button-hover: 0 4px 8px rgba(0, 0, 0, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue-dark));
}

/* Base Styles & Reset */

.sb-hero-dashboard {
    max-width: 1200px;
    margin: 2rem auto !important;
    padding: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    font-family: 'Inter', sans-serif;
}

.sb-hero-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sb-hero-wrapper {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-medium);
    background: var(--background-white);
}

/* Screen Reader Only */
.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;
}

/* Hero Content Section */
.sb-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.sb-hero-title {
    font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-3xl));
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
    text-align: center;
    line-height: 1.2;
}

.sb-hero-title span {
    color: var(--primary-blue-light);
    background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sb-hero-description {
    font-size: clamp(var(--font-size-base), 2vw, var(--font-size-lg));
    color: var(--text-medium);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--spacing-2xl);
    line-height: 1.6;
}

/* Section subtitle (new, used by visible H2 sections) */
.sb-section-subtitle{
    text-align: center;
    margin: -0.75rem auto 1.5rem;
    max-width: 760px;
    color: var(--text-medium);
    font-size: var(--font-size-base);
}

/* Stats Section */
.sb-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    margin: var(--spacing-2xl) 0;
    flex-wrap: wrap;
}

.sb-stat {
    text-align: center;
    min-width: 120px;
}

.sb-stat strong {
    display: block;
    font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-3xl));
    font-weight: 700;
    color: var(--primary-blue-light);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sb-stat span {
    font-size: var(--font-size-base);
    color: var(--text-medium);
    font-weight: 500;
}

/* Latest Jobs Section */
.sb-latest-jobs {
    border: 2px solid var(--primary-blue);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    background: var(--background-white);
}

.sb-latest-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding-bottom: var(--spacing-md);
}

.sb-latest-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Grid Layouts */
.sb-grid,
.smb-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    align-items: start;
    margin-bottom: var(--spacing-xl);
}

/* Job Cards */
.job-card-wrap {
    display: flex;
    height: 100%;
}

.job-card {
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 280px;
    transition: all var(--transition-base);
    border-left: 4px solid var(--primary-blue-light);
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-blue-light);
}

.job-card:hover::before {
    opacity: 1;
}

.job-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.job-card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 var(--spacing-md);
    line-height: 1.3;
    transition: color var(--transition-base);
}

.job-card:hover .job-card-title {
    color: var(--primary-blue);
}

.job-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-medium);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
}

.job-card-meta i {
    color: var(--primary-blue-light);
    min-width: 16px;
    font-size: var(--font-size-sm);
}

.job-card-excerpt {
    color: var(--text-medium);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.job-card-footer {
    margin-top: var(--spacing-lg);
    text-align: right;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

/* Portfolio Cards */
.profile-card {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.profile-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: var(--accent-blue);
    transition: height var(--transition-base);
}

.profile-card:hover::before {
    height: 6px;
}

.profile-grid {
    padding: var(--spacing-lg);
    display: grid;
    gap: var(--spacing-md);
    grid-template-rows: auto auto auto auto 1fr;
    height: 100%;
}

.profile-photo {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border: 3px solid var(--background-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    background: var(--background-light);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

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

.profile-title {
    font-size: var(--font-size-md);
    margin: var(--spacing-sm) 0 var(--spacing-xs);
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

.profile-meta {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    text-align: center;
    line-height: 1.4;
}

.ppd-tag {
    background: var(--accent-blue);
    color: var(--background-white);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: 12px;
    padding: 4px 10px;
    display: inline-block;
    margin: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Blog Cards */
.smb-post-card {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    position: relative;
}

.smb-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-blue-light);
}

.smb-post-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.smb-post-card-image {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: var(--background-light);
}

.smb-post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.smb-post-card:hover .smb-post-card-image img {
    transform: scale(1.05);
}

.smb-post-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background-light), #e2e8f0);
}

.smb-post-card-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.smb-post-card-title {
    font-size: var(--font-size-md);
    margin: 0 0 var(--spacing-md);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    transition: color var(--transition-base);
}

.smb-post-card:hover .smb-post-card-title {
    color: var(--primary-blue);
}

.smb-post-card-excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: auto;
    flex: 1;
}

.smb-post-card-meta {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Featured Cards */
.featured-card {
    border: 2px solid var(--accent-yellow);
    position: relative;
    animation: pulse-featured 2s infinite;
}

@keyframes pulse-featured {
    0%, 100% {
        box-shadow: 0 2px 12px var(--shadow-light), 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px var(--shadow-light), 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

.featured-star {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.4rem;
    color: var(--accent-yellow);
    background: var(--background-white);
    border-radius: var(--radius-full);
    padding: 4px;
    box-shadow: var(--shadow-card);
    z-index: 2;
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Apply Buttons */
.apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.apply-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.apply-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(20, 20); opacity: 0; }
}

.apply-btn i {
    font-size: 0.9rem;
    transition: transform var(--transition-fast);
}

.apply-btn:hover i {
    transform: translateX(2px);
}

.apply-now {
    background: var(--gradient-primary);
    color: var(--background-white);
}

.apply-now:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.quick-apply {
    background: var(--gradient-secondary);
    color: var(--background-white);
}

.quick-apply:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

/* Browse Links */
.sb-browse-link,
.sb-more-jobs .sb-browse-link,
.sb-more-posts .sb-browse-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: var(--spacing-lg) 0 0;
    padding: 12px 24px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    background: var(--background-white);
    border: 1px solid var(--border-light);
}

.sb-browse-link:hover {
    text-decoration: none;
    background: var(--primary-blue);
    color: var(--background-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
    border-color: var(--primary-blue);
}

.sb-browse-link::after {
    content: '→';
    transition: transform var(--transition-base);
}

.sb-browse-link:hover::after {
    transform: translateX(4px);
}

/* Sections */
.sb-more-jobs,
.sb-more-posts {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.sb-latest-posts {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 2px solid var(--border-light);
}

/* Loading Animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.job-card,
.profile-card,
.smb-post-card {
    animation: fadeInUp 0.6s ease forwards;
}

.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.2s; }
.job-card:nth-child(3) { animation-delay: 0.3s; }
.job-card:nth-child(4) { animation-delay: 0.4s; }
.job-card:nth-child(5) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 1024px) {
    .sb-hero-content {
        padding: var(--spacing-lg);
    }

    .sb-hero-stats {
        gap: var(--spacing-2xl);
    }

    .sb-grid,
    .smb-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .sb-hero-content {
        padding: var(--spacing-md);
    }

    .sb-section-subtitle{
        margin: -0.5rem auto 1rem;
    }

    .sb-hero-stats {
        gap: var(--spacing-xl);
    }

    .sb-stat {
        min-width: 100px;
    }

    .sb-stat strong {
        font-size: var(--font-size-2xl);
    }

    .sb-latest-jobs {
        padding: var(--spacing-lg);
        margin-left: calc(var(--spacing-md) * -1);
        margin-right: calc(var(--spacing-md) * -1);
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .sb-grid,
    .smb-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .job-card {
        min-height: auto;
        padding: 14px;
    }

    .job-card-meta {
        margin-bottom: 6px;
    }

    /* Make excerpts much more scannable on mobile */
    .job-card-excerpt {
        padding-top: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .job-card-footer {
        padding-top: 10px;
        margin-top: 12px;
    }

    .smb-post-card-image {
        height: 140px;
    }

    .apply-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sb-hero-title {
        font-size: var(--font-size-2xl);
    }

    .sb-hero-description {
        font-size: var(--font-size-base);
    }

    .sb-hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .sb-stat {
        width: 100%;
    }

    .sb-latest-jobs {
        padding: var(--spacing-md);
    }

    .sb-browse-link {
        width: 100%;
        justify-content: center;
    }

    /* Keep cards clean on very small screens (do NOT add padding to profile-card itself) */
    .profile-grid,
    .smb-post-card-content {
        padding: var(--spacing-md);
    }

    /* Optional: hide the least useful meta line (typically the date) on very small screens */
    .job-card-meta time {
        display: none;
    }
}

/* Print Styles */
@media print {
    .sb-hero-wrapper {
        color: #000;
        background: #fff;
    }

    .sb-hero-title span {
        color: #000;
        -webkit-text-fill-color: #000;
    }

    .sb-hero-stats strong {
        color: #000;
        -webkit-text-fill-color: #000;
    }

    .job-card,
    .profile-card,
    .smb-post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .apply-btn,
    .sb-browse-link {
        display: none;
    }
}

/* Accessibility */
.apply-btn:focus,
.sb-browse-link:focus,
.job-card:focus-within {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .job-card,
    .profile-card,
    .smb-post-card,
    .apply-btn,
    .sb-browse-link,
    .featured-star,
    .featured-card,
    .profile-photo img,
    .smb-post-card-image img {
        transition: none;
        animation: none;
    }

    .job-card:hover,
    .profile-card:hover,
    .smb-post-card:hover {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f1f5f9;
        --text-medium: #cbd5e1;
        --text-light: #94a3b8;
        --border-light: #334155;
        --background-white: #1e293b;
        --background-light: #0f172a;
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.4);
    }

    .job-card,
    .profile-card,
    .smb-post-card {
        background: var(--background-white);
        border-color: var(--border-light);
    }

    .sb-latest-jobs {
        border-color: var(--primary-blue-light);
        background: var(--background-light);
    }

    .featured-star {
        background: var(--background-light);
    }

    .profile-photo {
        border-color: var(--background-light);
    }
}

/* Search Form Styles */
.sb-hero-search-form {
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
    background: var(--background-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.sb-search-container {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--spacing-md);
    align-items: end;
    margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
    .sb-search-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

.sb-search-field-group {
    position: relative;
}

.sb-search-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-dark);
}

.sb-search-label i {
    color: var(--primary-blue-light);
    font-size: var(--font-size-base);
}

.sb-label-text {
    display: block;
}

.sb-search-input-wrapper {
    position: relative;
}

.sb-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    color: var(--text-dark);
    background: var(--background-white);
    transition: all var(--transition-base);
}

/* Mobile usability: prevent iOS zoom + improve typing feel (mobile only; no desktop change) */
@media (max-width: 768px) {
    .sb-search-input {
        font-size: 16px;
    }
    .sb-hero-search-form {
        padding: var(--spacing-lg);
    }
}

.sb-search-input:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sb-search-input::placeholder {
    color: var(--text-light);
}

.sb-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background-white);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-card);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

/* Support both classnames to avoid “unstyled dropdown” (no desktop layout changes elsewhere) */
.sb-search-suggestion-item,
.sb-suggestion {
    padding: 10px 16px;
    font-size: var(--font-size-base);
    color: var(--text-dark);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.sb-search-suggestion-item:last-child,
.sb-suggestion:last-child {
    border-bottom: none;
}

.sb-search-suggestion-item:hover,
.sb-search-suggestion-item:focus,
.sb-suggestion:hover,
.sb-suggestion:focus {
    background-color: var(--background-light);
    outline: none;
}

.sb-search-suggestion-item.active {
    background-color: var(--primary-blue-light);
    color: var(--background-white);
}

/* More reliable open behaviour: if wrapper is focused, allow dropdown */
.sb-search-input-wrapper:focus-within .sb-search-suggestions {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.sb-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: var(--background-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px; /* Better touch target */
}

.sb-search-submit:hover {
    background: linear-gradient(135deg, var(--primary-purple-dark) 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.sb-search-submit:active {
    transform: translateY(0);
}

.sb-search-submit i {
    font-size: var(--font-size-base);
}

.sb-search-button-text {
    display: block;
}

/* Keep the label visible on typical phones; hide only on very small widths */
@media (max-width: 420px) {
    .sb-search-button-text {
        display: none;
    }
    .sb-search-submit {
        width: 100%;
        padding: 14px;
    }
}

/* Popular Searches */
.sb-search-popular {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    align-items: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-light);
}

.sb-popular-label {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    font-weight: 500;
    margin-right: var(--spacing-xs);
}

.sb-popular-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--background-light);
    color: var(--text-dark);
    font-size: var(--font-size-sm);
    border-radius: 20px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.sb-popular-tag:hover {
    background: var(--primary-blue-light);
    color: var(--background-white);
    transform: translateY(-1px);
    border-color: var(--primary-blue-light);
}

.sb-popular-location {
    color: var(--text-medium);
    font-size: var(--font-size-xs);
}

.sb-popular-tag:hover .sb-popular-location {
    color: rgba(255, 255, 255, 0.9);
}

/* Search Loading State */
.sb-search-loading {
    position: relative;
}

.sb-search-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary-blue-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Search Results Count */
.sb-search-results-count {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--background-light);
    border-radius: var(--radius-md);
}

/* Enhanced Accessibility for Search */
.sb-search-input[aria-expanded="true"] + .sb-search-suggestions {
    display: block;
}

.sb-search-input:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Dark Mode Support for Search */
@media (prefers-color-scheme: dark) {
    .sb-hero-search-form {
        background: var(--background-white);
        border-color: var(--border-light);
    }

    .sb-search-input {
        background: var(--background-light);
        border-color: var(--border-light);
        color: var(--text-dark);
    }

    .sb-search-suggestions {
        background: var(--background-white);
        border-color: var(--border-light);
    }

    .sb-popular-tag {
        background: var(--background-light);
    }

    .sb-popular-tag:hover {
        background: var(--primary-blue-light);
    }
}

/* Print Styles for Search */
@media print {
    .sb-hero-search-form {
        display: none;
    }
}
