/* ===== ESPECIALIDADES - DESKTOP ===== */
@media (min-width: 769px) {
    .especialidades {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: transparent;
        padding: 160px 80px;
        overflow: hidden;
        position: relative;
    }

    .especialidades::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 50% 0%, rgba(218, 190, 153, 0.05) 0%, transparent 50%);
        pointer-events: none;
    }

    .especialidades::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(67, 55, 39, 0.1), transparent);
    }

    .titulo-especialidades {
        text-align: center;
        font-size: 3.5rem;
        color: #433727;
        font-weight: 500;
        margin-bottom: 80px;
        letter-spacing: -0.04em;
        position: relative;
        z-index: 1;
        font-family: "Instrument Serif", serif;
    }

    .slider-container {
        max-width: 1400px;
        width: 100%;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .cards-especialidades {
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 32px;
        transition: none;
    }

    .card {
        flex: 1 1 0;
        min-width: 280px;
        max-width: 320px;
        width: 100%;
        background-color: #FFFFFF;
        border-radius: 0;
        box-shadow: 0 8px 40px rgba(67, 55, 39, 0.08),
                    0 2px 12px rgba(67, 55, 39, 0.04);
        text-align: left;
        padding: 45px;
        box-sizing: border-box;
        transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        border: 1px solid rgba(67, 55, 39, 0.12);
        position: relative;
        overflow: hidden;
    }

    .card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(67, 55, 39, 0.05), transparent);
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .card:hover::after {
        opacity: 1;
    }

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: #433727;
        transform: scaleX(0);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .card:hover::before {
        transform: scaleX(1);
    }

    .card:hover {
        transform: translateY(-12px);
        box-shadow: 0 24px 80px rgba(67, 55, 39, 0.18),
                    0 8px 24px rgba(67, 55, 39, 0.12);
        border-color: rgba(218, 190, 153, 0.3);
    }

    .card img {
        width: 100%;
        border-radius: 0;
        margin-bottom: 24px;
        transition: transform 0.4s ease;
        filter: grayscale(20%);
    }

    .card:hover img {
        transform: scale(1.05);
        filter: grayscale(0%);
    }

    .card h3 {
        font-size: 1.75rem;
        color: #433727;
        margin-bottom: 16px;
        font-weight: 500;
        letter-spacing: -0.01em;
        font-family: "Instrument Serif", serif;
    }

    .card p {
        font-size: 1rem;
        color: #5B5B5B;
        line-height: 1.7;
        margin-bottom: 28px;
        font-weight: 400;
        letter-spacing: 0.01em;
    }

    /* ===== BOTÃO RETANGULAR COM BORDA MARROM ===== */
    .btn-card {
        border: 2px solid #433727;
        background: transparent;
        color: #433727;
        padding: 16px 40px;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: "Instrument Serif", serif;
        letter-spacing: 0.025em;
        position: relative;
        overflow: hidden;
        width: 100%;
        text-align: center;
    }

    .btn-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #433727;
        transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: -1;
    }

    .btn-card:hover {
        color: #FFFFFF;
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(67, 55, 39, 0.3),
                    0 4px 12px rgba(67, 55, 39, 0.15);
    }

    .btn-card:hover::before {
        left: 0;
    }

    .dots {
        display: none;
    }
}

/* ===== ESPECIALIDADES - MOBILE ===== */
@media (max-width: 768px) {
    .especialidades {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: transparent;
        padding: 80px 20px 250px;
        overflow: hidden;
    }

    .titulo-especialidades {
        text-align: center;
        font-size: 2.5rem;
        color: #433727;
        font-weight: 500;
        padding: 0 20px 40px;
        font-family: "Instrument Serif", serif;
    }

    .slider-container {
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    .cards-especialidades {
        display: flex;
        transition: transform 0.3s ease-in-out;
        will-change: transform;
        touch-action: pan-y pinch-zoom;
    }

    .card {
        flex: 0 0 90%;
        margin: 0 5%;
        background-color: #FFFFFF;
        border-radius: 0;
        box-shadow: 0 4px 20px rgba(67, 55, 39, 0.1);
        text-align: left;
        padding: 24px;
        box-sizing: border-box;
        border: 1px solid rgba(67, 55, 39, 0.1);
    }

    .card img {
        width: 100%;
        border-radius: 0;
        margin-bottom: 16px;
    }

    .card h3 {
        font-size: 1.5rem;
        color: #433727;
        margin-bottom: 12px;
        font-weight: 500;
        font-family: "Instrument Serif", serif;
    }

    .card p {
        font-size: 0.95rem;
        color: #5B5B5B;
        line-height: 1.6;
        margin-bottom: 20px;
        font-weight: 400;
    }

    .btn-card {
        border: 2px solid #433727;
        background: transparent;
        color: #433727;
        padding: 12px 28px;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        font-family: "Instrument Serif", serif;
        font-weight: 500;
        position: relative;
        overflow: hidden;
        width: 100%;
    }

    .btn-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #433727;
        transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: -1;
    }

    .btn-card:hover {
        color: #FFFFFF;
    }

    .btn-card:hover::before {
        left: 0;
    }

    .dots {
        display: flex;
        justify-content: center;
        margin-top: 30px;
        gap: 12px;
        padding-bottom: 20px;
    }

    .dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(67, 55, 39, 0.3);
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .dot:hover {
        background: rgba(67, 55, 39, 0.5);
    }

    .dot.active {
        background: #433727;
        transform: scale(1.3);
    }
}

/* ===== ESPECIALIDADES - TABLET ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .especialidades {
        padding: 140px 50px;
    }

    .titulo-especialidades {
        font-size: 3rem;
        margin-bottom: 60px;
    }

    .cards-especialidades {
        gap: 24px;
    }

    .card {
        min-width: 240px;
        max-width: 280px;
        padding: 35px;
    }
}

/* ===== ESPECIALIDADES - MOBILE PEQUENO ===== */
@media (max-width: 480px) {
    .especialidades {
        padding: 80px 15px 200px;
    }

    .titulo-especialidades {
        font-size: 2rem;
        padding: 0 15px 30px;
    }

    .card {
        flex: 0 0 95%;
        margin: 0 2.5%;
        padding: 20px;
    }

    .card h3 {
        font-size: 1.3rem;
    }

    .card p {
        font-size: 0.9rem;
    }
}
