/* =====================================================
   SPECIALTY CARDS - Centre Médical Europe
   Version 2.0 - Optimisé desktop + mobile
   ===================================================== */

/* Grid Container */
.specialty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

/* Individual Card */
.specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 260px;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1),
                0 4px 8px -4px rgba(0, 0, 0, 0.06);
}

.specialty-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 32px -8px rgba(0, 0, 0, 0.18),
                0 12px 16px -8px rgba(0, 0, 0, 0.1);
}

/* Icon Container */
.specialty-icon {
    width: 130px;
    height: 130px;
    margin-bottom: 1.25rem;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.25);
    padding: 8px;
}

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

.specialty-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

/* Text Styles */
.specialty-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.9;
    margin-bottom: 0.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.specialty-name {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   COLOR THEMES - Couleurs vives et saturées
   ===================================================== */

/* Medical - Bleu profond */
.specialty-card.medical {
    background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 50%, #3b82f6 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.medical:hover {
    background: linear-gradient(145deg, #1e40af 0%, #2563eb 50%, #60a5fa 100%);
}

.specialty-card.medical .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Dental - Turquoise/Teal */
.specialty-card.dental {
    background: linear-gradient(145deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.dental:hover {
    background: linear-gradient(145deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
}

.specialty-card.dental .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Orthodontics - Violet/Purple */
.specialty-card.orthodontics {
    background: linear-gradient(145deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.orthodontics:hover {
    background: linear-gradient(145deg, #5b21b6 0%, #6d28d9 50%, #7c3aed 100%);
}

.specialty-card.orthodontics .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Pediatric - Rose/Pink */
.specialty-card.pediatric {
    background: linear-gradient(145deg, #be185d 0%, #db2777 50%, #ec4899 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.pediatric:hover {
    background: linear-gradient(145deg, #9d174d 0%, #be185d 50%, #db2777 100%);
}

.specialty-card.pediatric .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Periodontics - Orange/Amber */
.specialty-card.periodontics {
    background: linear-gradient(145deg, #c2410c 0%, #ea580c 50%, #f97316 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.periodontics:hover {
    background: linear-gradient(145deg, #9a3412 0%, #c2410c 50%, #ea580c 100%);
}

.specialty-card.periodontics .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* Implant - Slate/Gris foncé */
.specialty-card.implant {
    background: linear-gradient(145deg, #334155 0%, #475569 50%, #64748b 100%);
    color: #ffffff;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.specialty-card.implant:hover {
    background: linear-gradient(145deg, #1e293b 0%, #334155 50%, #475569 100%);
}

.specialty-card.implant .specialty-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

/* Large desktop */
@media (min-width: 1200px) {
    .specialty-grid {
        max-width: 1000px;
        gap: 2rem;
    }

    .specialty-card {
        min-height: 280px;
    }

    .specialty-icon {
        width: 140px;
        height: 140px;
    }
}

/* Medium screens - keep 3 columns */
@media (max-width: 900px) {
    .specialty-grid {
        gap: 1.25rem;
        padding: 0 1rem;
    }

    .specialty-card {
        min-height: 220px;
        padding: 1.5rem 1rem 1.25rem;
        border-radius: 20px;
    }

    .specialty-icon {
        width: 110px;
        height: 110px;
    }

    .specialty-label {
        font-size: 0.8rem;
    }

    .specialty-name {
        font-size: 1.4rem;
    }
}

/* Tablets - 2 columns */
@media (max-width: 700px) {
    .specialty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .specialty-card {
        min-height: 200px;
        padding: 1.25rem 1rem 1rem;
        border-radius: 18px;
    }

    .specialty-icon {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .specialty-label {
        font-size: 0.75rem;
    }

    .specialty-name {
        font-size: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .specialty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
        padding: 0 0.75rem;
    }

    .specialty-card {
        min-height: 180px;
        padding: 1rem 0.75rem 0.875rem;
        border-radius: 16px;
    }

    .specialty-icon {
        width: 85px;
        height: 85px;
        margin-bottom: 0.75rem;
        border-radius: 14px;
        padding: 6px;
    }

    .specialty-label {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

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

/* Very small screens */
@media (max-width: 360px) {
    .specialty-grid {
        gap: 0.625rem;
        padding: 0 0.5rem;
    }

    .specialty-card {
        min-height: 160px;
        padding: 0.875rem 0.5rem 0.75rem;
        border-radius: 14px;
    }

    .specialty-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
        border-radius: 12px;
    }

    .specialty-label {
        font-size: 0.65rem;
    }

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

/* =====================================================
   ACCESSIBILITY & FOCUS STATES
   ===================================================== */

.specialty-card:focus {
    outline: 3px solid #fbbf24;
    outline-offset: 4px;
}

.specialty-card:focus:not(:focus-visible) {
    outline: none;
}

.specialty-card:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 4px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .specialty-card,
    .specialty-icon {
        transition: none;
    }

    .specialty-card:hover {
        transform: none;
    }

    .specialty-card:hover .specialty-icon {
        transform: none;
    }
}

/* =====================================================
   OPTIONAL: Alternative light theme (décommenter si besoin)
   ===================================================== */

/*
.specialty-grid.light-theme .specialty-card.medical {
    background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 3px solid #3b82f6;
}

.specialty-grid.light-theme .specialty-card.dental {
    background: linear-gradient(145deg, #ccfbf1 0%, #99f6e4 100%);
    color: #0f766e;
    border: 3px solid #14b8a6;
}
*/