/* ===================================================================
   SPECIALTIES PAGE STYLES - ORGANIZED VERSION v1.1
   Updated: August 2025 - Fixed CTA button sizing consistency
   
   Table of Contents:
   1. CSS Variables & Keyframes ............................ Line 19
   2. Base & Layout ........................................ Line 72
   3. Hero Section ......................................... Line 79
   4. Specialty Cards ...................................... Line 97
   5. Card Content & Features .............................. Line 242
   6. Buttons & Actions .................................... Line 374
   7. Search Functionality ................................. Line 453
   8. Call to Action Section ............................... Line 569
   9. Mobile Responsive Styles (768px and below) .......... Line 677
   10. Extra Small Devices (480px and below) .............. Line 826
   =================================================================== */

/* ===== 1. CSS VARIABLES & KEYFRAMES ===== */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --primary-gradient-hover: linear-gradient(135deg, #5a0db8 0%, #1e60d4 100%);
    --secondary-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --security-gradient: linear-gradient(135deg, rgba(40, 167, 69, 0.02) 0%, rgba(32, 201, 151, 0.02) 100%);

    /* Shadows */
    --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 40px 80px rgba(0, 0, 0, 0.12);
    --search-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --border-radius-card: 20px;
    --border-radius-button: 12px;
    --border-radius-search: 25px;

    /* Transitions */
    --transition-standard: all 0.3s ease;
    --transition-card: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Typography */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #64748b;
    --text-dark: #374151;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse-border {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* ===== 2. BASE & LAYOUT ===== */
html {
    scroll-behavior: smooth;
}

.specialties {
    padding: 2rem 0 4rem 0;
}

/* ===== 3. HERO SECTION ===== */
.hero {
    padding: 4rem 0 2rem 0;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== 4. SPECIALTY CARDS ===== */
.specialty-card {
    position: relative;
    background: white;
    border-radius: var(--border-radius-card);
    padding: 0;
    box-shadow: var(--card-shadow);
    height: 100%;
    overflow: hidden;
    transition: var(--transition-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(106, 17, 203, 0.02) 0%,
            rgba(37, 117, 252, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--card-shadow-hover);
}

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

.specialty-card.security-card::before {
    background: var(--security-gradient);
}

/* Card Images */
.specialty-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.specialty-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.1) 100%);
}

/* Specialty-specific gradients */
.specialty-image.nursing-image {
    background: linear-gradient(135deg, #4a90e2 0%, #d4a574 50%, #f8f8f8 100%);
}

.specialty-image.security-image {
    background: linear-gradient(135deg, #4a4a4a 0%, #8b7355 50%, #6b6b6b 100%);
}

/* Future specialty gradients */
.specialty-image.sp003-image {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}

.specialty-image.sp004-image {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.specialty-image.sp005-image {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Image placeholder */
.specialty-image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.specialty-image-placeholder i {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

.specialty-image img {
    position: relative;
    z-index: 2;
}

.specialty-image.with-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.3;
    z-index: 1;
}

/* ===== 5. CARD CONTENT & FEATURES ===== */
.specialty-content {
    padding: 2rem;
}

.specialty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.specialty-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.specialty-content-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Features Lists */
.features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.features-list .icon-check {
    color: #10b981;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.features-list strong {
    color: var(--text-dark);
}

/* Desktop and Mobile Feature Containers */
.desktop-features {
    display: block;
}

.mobile-features {
    display: none;
}

.features-visible {
    margin-bottom: 0;
    padding-bottom: 0;
}

.features-visible li:last-child {
    border-bottom: none;
    padding-bottom: 0 !important;
    margin-bottom: 0;
}

.features-collapsible {
    margin-bottom: 1rem;
    margin-top: 0;
    padding-top: 0;
}

.features-collapsible li:first-child {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
    margin-top: 0;
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    margin: 0rem 0 0 auto;
    color: #6a11cb;
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    width: auto;
    height: auto;
    gap: 0.4rem;
}

.mobile-toggle-btn:hover {
    background: #f8f9fa;
    color: #5a0db8;
    transform: translateY(-1px);
}

.mobile-toggle-btn i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.mobile-collapsible-content {
    transition: var(--transition-standard);
    overflow: hidden;
}

/* ===== 6. BUTTONS & ACTIONS ===== */
.specialty-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
}

.specialty-btn {
    flex: 1;
    min-width: 140px;
    padding: 1rem 1.5rem;
    text-align: center;
    transition: var(--transition-standard);
    border-radius: var(--border-radius-button);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.specialty-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

/* Outline Button Variant */
.specialty-btn.specialty-btn--outline {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--text-muted);
    border-radius: 20px;
}

.specialty-btn.specialty-btn--outline:hover {
    border-color: #000000;
    color: #000000;
    background: white;
    box-shadow: none;
}

/* Gradient Button Variant */
.specialty-btn.specialty-btn--gradient {
    background: var(--primary-gradient);
    border: 2px solid transparent;
    color: white;
    border-radius: 20px;
}

.specialty-btn.specialty-btn--gradient:hover {
    background: var(--primary-gradient-hover);
    color: white;
}

/* ===== 7. SEARCH FUNCTIONALITY ===== */
.specialty-search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    z-index: 100;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.specialty-search-input {
    width: 100%;
    padding: 14px 25px 14px 25px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius-search);
    font-size: 1rem;
    background: white;
    transition: var(--transition-standard);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.specialty-search-input:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 4px 20px rgba(106, 17, 203, 0.15);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 18px;
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition-standard);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.clear-search-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    box-shadow: var(--search-shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.search-dropdown.show {
    display: block;
}

.dropdown-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #f8f9fa;
}

.dropdown-option.highlighted {
    background: var(--primary-gradient);
    color: white;
}

.dropdown-option-title {
    font-weight: 500;
    font-size: 0.85rem;
}

.dropdown-option-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.dropdown-option.highlighted .dropdown-option-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Highlighted Card Styles */
.specialty-card-compact.highlighted {
    border: 3px solid #6a11cb;
    box-shadow: 0 8px 30px rgba(106, 17, 203, 0.25);
    transform: translateY(-8px);
    position: relative;
    z-index: 10;
    scroll-margin-top: 120px;
}

.specialty-card-compact.highlighted::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 19px;
    background: var(--primary-gradient);
    z-index: -1;
    animation: pulse-border 2s infinite;
}

/* ===== 8. CALL TO ACTION SECTION ===== */
.cta-section {
    background: var(--secondary-gradient);
    border-radius: var(--border-radius-card);
    padding: 3rem 2rem;
    margin-top: 3rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cta-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem !important;
}

.cta-description,
.cta-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-standard);
    border: 2px solid transparent;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
    box-sizing: border-box;
}

.cta-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.cta-btn-outline {
    background: transparent;
    color: #6a11cb;
    border-color: #6a11cb;
}

.cta-btn-outline:hover {
    background: #6a11cb;
    color: white;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.cta-btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.cta-btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

/* ===== 9. MOBILE RESPONSIVE STYLES (768px and below) ===== */
@media (max-width: 768px) {

    /* Hero Section */
    .hero {
        padding: 1rem 0 0 0;
    }

    /* Specialties Section */
    .specialties {
        padding: 0 0 2rem 0;
    }

    /* Cards */
    .specialty-card {
        margin-bottom: 0;
    }

    .specialty-image {
        height: 160px;
    }

    .specialty-image-placeholder {
        width: 60px;
        height: 60px;
    }

    .specialty-image-placeholder i {
        font-size: 1.5rem;
    }

    .specialty-content {
        padding: 1.5rem 1.5rem 0rem 1.5rem;
    }

    .specialty-title {
        font-size: 1.1rem;
    }

    /* Features */
    .desktop-features {
        display: none !important;
    }

    .mobile-features {
        display: block !important;
    }

    .mobile-toggle-btn {
        display: flex !important;
    }

    .mobile-collapsible-content {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        padding-top: 0;
        overflow: hidden;
        transition: all 0.4s ease;
    }

    .mobile-collapsible-content.expanded {
        max-height: 800px;
        opacity: 1;
        margin-top: 0.75rem;
        padding-top: 0;
    }

    /* Buttons */
    .specialty-actions {
        flex-direction: column;
        margin-top: 1rem;
    }

    .specialty-btn {
        flex: none;
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        min-width: auto;
    }

    /* CTA Section */
    .cta-section {
        padding: 30px 20px;
    }

    .cta-title {
        font-size: 1.4rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 250px;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    /* Search */
    .specialty-search-container {
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .specialty-search-input {
        padding: 12px 20px 12px 20px;
        font-size: 0.95rem;
    }

    .search-icon {
        left: 14px;
        font-size: 16px;
    }

    .clear-search-btn {
        right: 14px;
        width: 22px;
        height: 22px;
    }

    .search-dropdown {
        margin-top: 6px;
    }

    .dropdown-option {
        padding: 10px 16px;
    }

    .dropdown-option-title {
        font-size: 0.8rem;
    }

    .dropdown-option-subtitle {
        font-size: 0.7rem;
    }

    .specialty-card-compact.highlighted {
        scroll-margin-top: 100px;
        border-width: 2px;
        transform: translateY(-6px);
    }

    .specialty-card-compact.highlighted::before {
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: 18px;
    }

    @keyframes pulse-border {

        0%,
        100% {
            opacity: 0.8;
            transform: scale(1);
        }

        50% {
            opacity: 1;
            transform: scale(1.015);
        }
    }
}

/* ===== 10. EXTRA SMALL DEVICES (480px and below) ===== */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem);
    }

    .specialty-image {
        height: 140px;
    }

    .specialty-content {
        padding: 1.25rem;
    }

    .specialty-title {
        font-size: 1rem;
    }

    .specialty-description {
        font-size: 0.9rem;
    }

    .features-list li {
        font-size: 0.85rem;
        padding: 0.6rem 0;
    }

    .cta-title {
        font-size: 1.2rem;
    }

    .specialty-search-input {
        font-size: 0.9rem;
        padding: 10px 38px 10px 38px;
    }
}