/* Reset — isolate from WordPress theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.wpdec-profile-page {
    font-family: var(--wpdec-font);
    color: var(--wpdec-text);
    background: var(--wpdec-bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.4;
    min-height: 100vh;
}

/* Override WordPress theme global styles inside the profile */
.wpdec-profile :where(a) {
    text-decoration: none !important;
    color: inherit;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.wpdec-profile :where(h1, h2, h3) {
    font-weight: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.wpdec-profile :where(p) {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Profile container */
.wpdec-profile {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--wpdec-bg);
    padding: 16px 10px 18px;
    overflow-x: hidden;
}

.wpdec-profile-hero {
    padding: 16px 10px 18px;
}

.wpdec-profile-content {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Scoped reset to override WordPress theme styles — only target elements WITHOUT component classes */
.wpdec-profile a:not([class]),
.wpdec-profile p:not([class]),
.wpdec-profile h1:not([class]),
.wpdec-profile h2:not([class]) {
    all: unset;
    box-sizing: border-box;
}

.wpdec-profile a:not([class]) {
    display: inline;
}

/* Hero header */
.wpdec-hero-banner {
    width: 100%;
    aspect-ratio: 3 / 1;
    background: var(--wpdec-banner-bg);
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.wpdec-hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translate(var(--wpdec-banner-offset-x), var(--wpdec-banner-offset-y)) scale(var(--wpdec-banner-zoom));
    transform-origin: center;
}

.wpdec-hero-avatar-wrap {
    text-align: center;
    margin-top: -44px;
    position: relative;
    z-index: 2;
}

.wpdec-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--wpdec-accent);
    background: var(--wpdec-bg);
    margin: 0 auto;
}

.wpdec-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translate(var(--wpdec-avatar-offset-x), var(--wpdec-avatar-offset-y)) scale(var(--wpdec-avatar-zoom));
    transform-origin: center;
}

.wpdec-hero-info {
    text-align: center;
    margin-bottom: 20px;
}

.wpdec-hero-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--wpdec-name-color);
    margin: 8px 0 4px;
}

/* Classic header */
.wpdec-classic-header {
    text-align: center;
    padding-top: 10px;
    margin-bottom: 22px;
}

.wpdec-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 1.5px solid var(--wpdec-accent);
    background: var(--wpdec-bg);
    margin: 0 auto;
}

.wpdec-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translate(var(--wpdec-avatar-offset-x), var(--wpdec-avatar-offset-y)) scale(var(--wpdec-avatar-zoom));
    transform-origin: center;
}

.wpdec-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--wpdec-name-color);
    margin: 8px 0 4px;
}

.wpdec-position {
    font-size: 15px;
    color: var(--wpdec-position-color);
    margin: 0 0 2px;
}

.wpdec-department {
    font-size: 12px;
    color: var(--wpdec-department-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* Separators */
.wpdec-inline-separator {
    height: 1px;
    width: 100%;
    margin: 10px 0;
}

/* Link buttons */
.wpdec-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin: 0 auto;
}

.wpdec-profile .wpdec-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: var(--wpdec-btn-radius);
    background: var(--wpdec-bg-card);
    color: var(--wpdec-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    border: 1px solid var(--wpdec-border);
    transition: all 0.15s ease;
    width: 100%;
}

.wpdec-profile .wpdec-btn-align-left { justify-content: flex-start; }
.wpdec-profile .wpdec-btn-align-center { justify-content: center; }
.wpdec-profile .wpdec-btn-align-right { justify-content: flex-end; }

.wpdec-profile .wpdec-btn-solid {
    background: var(--wpdec-link-color);
    border-color: var(--wpdec-link-color);
    color: var(--wpdec-link-text);
}
.wpdec-profile .wpdec-btn-solid:hover { opacity: 0.85; }

.wpdec-profile .wpdec-btn-border {
    background: transparent;
    border-color: var(--wpdec-link-color);
    color: var(--wpdec-link-text);
}
.wpdec-profile .wpdec-btn-border:hover { opacity: 0.85; }

.wpdec-profile .wpdec-btn-solid .wpdec-btn-icon { color: var(--wpdec-link-icon); }
.wpdec-profile .wpdec-btn-border .wpdec-btn-icon { color: var(--wpdec-link-icon); }

.wpdec-profile .wpdec-btn-icon {
    width: 18px;
    height: 18px;
    color: var(--wpdec-icon-color);
    flex-shrink: 0;
}

.wpdec-profile .wpdec-btn.disabled {
    pointer-events: none;
    opacity: 0.75;
}

/* Footer */
.wpdec-footer {
    text-align: center;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wpdec-footer-text {
    font-size: 12px;
    color: var(--wpdec-footer-color);
}

/* Responsive */

/* Visibility toggles */
@media (max-width: 639px) {
    .wpdec-hide-mobile { display: none !important; }
}
@media (min-width: 640px) {
    .wpdec-hide-desktop { display: none !important; }
}

/* Large phones / small tablets */
@media (min-width: 480px) {
    .wpdec-profile {
        padding: 24px 16px 24px;
    }

    .wpdec-profile-content {
        max-width: 460px;
    }

    .wpdec-hero-avatar,
    .wpdec-avatar {
        width: 92px;
        height: 92px;
    }

    .wpdec-hero-name,
    .wpdec-name {
        font-size: 23px;
    }

    .wpdec-links {
        gap: 11px;
    }
}

/* Tablets and small desktops */
@media (min-width: 640px) {
    .wpdec-profile {
        padding: 36px 24px 32px;
    }

    .wpdec-profile-content {
        max-width: 520px;
    }

    .wpdec-hero-avatar,
    .wpdec-avatar {
        width: 96px;
        height: 96px;
        border-width: 2px;
    }

    .wpdec-hero-name,
    .wpdec-name {
        font-size: 24px;
    }

    .wpdec-position {
        font-size: 15px;
    }

    .wpdec-department {
        font-size: 12px;
    }

    .wpdec-hero-banner {
        border-radius: 20px;
    }

    .wpdec-hero-avatar-wrap {
        margin-top: -48px;
    }

    .wpdec-classic-header {
        padding-top: 16px;
        margin-bottom: 24px;
    }

    .wpdec-links {
        gap: 11px;
        width: 100%;
    }

    .wpdec-profile .wpdec-btn {
        min-height: 54px;
        padding: 15px 18px;
        font-size: 15px;
    }

    .wpdec-profile .wpdec-btn-icon {
        width: 18px;
        height: 18px;
    }

    .wpdec-footer-text {
        font-size: 12px;
    }
}

/* Large desktops */
@media (min-width: 1024px) {
    .wpdec-profile-content {
        max-width: 560px;
    }

    .wpdec-hero-avatar,
    .wpdec-avatar {
        width: 96px;
        height: 96px;
        border-width: 2px;
    }

    .wpdec-hero-name,
    .wpdec-name {
        font-size: 24px;
    }

    .wpdec-hero-banner {
        border-radius: 24px;
    }

    .wpdec-hero-avatar-wrap {
        margin-top: -48px;
    }
}
