/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent-maroon);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: var(--text-dark);
}

.btn-outline:hover {
    background: #f3f4f6;
}

.btn-text {
    background: none;
    color: var(--accent-maroon);
    padding: 0;
    cursor: pointer;
    border: none;
    font-weight: 600;
}

.btn-text:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* --- CARDS --- */
.card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

.card-img-wrapper {
    height: 250px;
    /* Fixed height for consistency */
    overflow: hidden;
    position: relative;
    width: 100%;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crop to fill */
    object-position: top center;
    /* Focus on the top part (Title/Header) */
    transition: transform 0.5s ease;
}

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

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--white);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-gray {
    background: #f1f5f9;
    color: #64748b;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.meta-blue {
    color: var(--identity-blue);
    text-transform: uppercase;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card:hover .card-title {
    color: var(--accent-maroon);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    flex: 1;
}

.tag {
    font-size: 0.75rem;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-gray);
}

/* --- DOCUMENT CARD --- */
.doc-card {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
    gap: 1.5rem;
}

.doc-card:hover {
    border-color: var(--accent-maroon);
    box-shadow: var(--shadow-md);
}

.doc-icon {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    color: var(--accent-maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* --- PARTNER LOGO --- */
.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    opacity: 0.5;
    transition: var(--transition);
    filter: grayscale(100%);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.partner-img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}

/* --- FILTER BUTTONS --- */
.filter-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--identity-blue);
    color: white;
    border-color: var(--identity-blue);
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--identity-blue) !important;
}

@media (max-width: 640px) {
    .mobile-hide {
        display: none !important;
    }

    .card[style*="flex-direction:row"] {
        flex-direction: column !important;
    }

    .card[style*="flex-direction:row"]>div:first-child {
        width: 100% !important;
        height: 150px;
    }
}

/* --- SERVICE ICONS --- */
.service-icon {
    width: 72px;
    height: 72px;
    background: white;
    color: var(--accent-maroon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1.5px solid var(--identity-blue);
}

.service-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 1.5;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}