/**
 * Front-End Portfolio Layout Stylesheet
 * 
 * File: assets/css/front-end.css
 * Plugin: Actor Portfolio Manager
 */

/* 0. Full-Page Template Body Reset
   Applied only when the plugin's own <body> is in control (the "Actor
   Portfolio – Full Homepage" page template), since there's no theme
   wrapper to clear out. Harmless no-op when the shortcode is embedded
   inside a themed page, because .apm-full-homepage-body is never present there. */
.apm-full-homepage-body {
    margin: 0;
    padding: 0;
}

/* 1. Global Reset & Wrapper Boundaries */
.apm-single-page-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-x: hidden;
}

.apm-single-page-wrapper *,
.apm-single-page-wrapper *::before,
.apm-single-page-wrapper *::after {
    box-sizing: inherit;
}

.apm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.apm-section {
    padding: 80px 0;
}

.apm-bg-alt {
    background-color: #f8f9fa;
}

.apm-section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    color: #1a252f;
}

.apm-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #0073aa;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 2. Sticky Navigation Header */
.apm-header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.apm-single-page-wrapper {
    /* Pushes content below the fixed header. The JS sets --apm-header-height
       to the header's real (possibly multi-row, on mobile) height; this
       value is just a same-page fallback before that JS runs. */
    padding-top: var(--apm-header-height, 70px);
}

.apm-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.apm-logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a252f;
    text-decoration: none;
}

.apm-nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.apm-nav-menu a {
    text-decoration: none;
    color: #555555;
    font-weight: 500;
    transition: color 0.2s ease;
}

.apm-nav-menu a:hover {
    color: #0073aa;
}

/* 2a. Site Language Switcher */
.apm-lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
}

.apm-lang-btn {
    display: inline-block;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #555555;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apm-lang-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.apm-lang-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* 2b. Mobile Hamburger Toggle (hidden on desktop) */
.apm-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.apm-nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1a252f;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.apm-nav-toggle[aria-expanded="true"] .apm-nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.apm-nav-toggle[aria-expanded="true"] .apm-nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.apm-nav-toggle[aria-expanded="true"] .apm-nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 3. Hero Section */
.apm-hero-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    text-align: center;
    padding: 120px 0 100px;
    position: relative;
}

.apm-hero-has-image {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    /* background-attachment: fixed is unreliable on mobile Safari/Chrome */
    .apm-hero-has-image {
        background-attachment: scroll;
    }
}

.apm-hero-scroll-cue {
    display: block;
    width: 24px;
    height: 24px;
    margin: 50px auto 0;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    transform: rotate(45deg);
    animation: apm-bounce 2s infinite;
}

@keyframes apm-bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(6px, 6px); }
}

.apm-actor-name {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 15px;
    letter-spacing: -0.5px;
}

.apm-actor-tagline {
    font-size: 1.35rem;
    color: #cbd5e1;
    max-width: 650px;
    margin: 0 auto 30px;
}

.apm-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.apm-social-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.apm-social-btn:hover {
    background-color: #0073aa;
    transform: translateY(-2px);
    color: #ffffff;
}

/* 4. Biography Section */
.apm-biography-content {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    color: #475569;
}

/* 5. Career Section */
.apm-career-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.apm-filter-btn {
    padding: 8px 20px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #475569;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.apm-filter-btn:hover,
.apm-filter-btn.active {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.apm-career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.apm-career-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apm-career-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.apm-career-poster img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.apm-career-details {
    padding: 20px;
    flex-grow: 1;
}

.apm-career-details h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.apm-year {
    color: #64748b;
    font-weight: 400;
}

.apm-role {
    font-size: 0.95rem;
    color: #0073aa;
    margin-bottom: 10px;
}

/* 6. Gallery Section (GLightbox Layout) */
.apm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.apm-gallery-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}

.apm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.apm-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.apm-gallery-item:hover img {
    transform: scale(1.05);
}

.apm-gallery-item:hover .apm-gallery-overlay {
    opacity: 1;
}

/* 7. News Clippings Section */
.apm-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.apm-news-card {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.apm-news-date {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-right: 10px;
}

.apm-news-outlet {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0073aa;
}

.apm-news-card h3 {
    font-size: 1.15rem;
    margin: 10px 0;
}

.apm-news-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
}

.apm-news-link:hover {
    text-decoration: underline;
}

/* 8. Contact Section */
.apm-contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.apm-contact-fields {
    margin-top: 20px;
}

.apm-contact-fields p {
    margin: 8px 0;
}

/* Contact Form */
.apm-contact-form {
    text-align: left;
    max-width: 480px;
    margin: 24px auto 0;
}

.apm-form-row {
    margin-bottom: 16px;
}

.apm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.apm-form-row input,
.apm-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.apm-form-row input:focus,
.apm-form-row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.apm-form-submit {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.apm-form-submit:hover {
    background: #1e293b;
}

.apm-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apm-form-status {
    margin-top: 12px;
    font-size: 0.95rem;
}

.apm-form-status.apm-form-success {
    color: #1a7f37;
}

.apm-form-status.apm-form-error {
    color: #b32d2e;
}

/* Honeypot: hidden from real visitors, left in the DOM for bots */
.apm-hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* 9. RTL Alignment Rules */
.apm-rtl {
    direction: rtl;
    text-align: right;
}

.apm-rtl .apm-section-title {
    text-align: center;
}

.apm-rtl .apm-news-card {
    border-left: none;
    border-right: 4px solid #0073aa;
}

.apm-rtl .apm-news-date {
    margin-right: 0;
    margin-left: 10px;
}

/* 10. Scroll Fade-In Animation */
.apm-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.apm-fade-in.apm-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .apm-fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* 11. Responsive Breakpoints */
@media (max-width: 768px) {
    .apm-nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        row-gap: 12px;
    }

    /* Nav menu is always visible now — no hamburger collapse */
    .apm-nav-toggle {
        display: none;
    }

    .apm-logo {
        order: 1;
    }

    .apm-lang-switcher {
        order: 2;
    }

    .apm-nav-menu {
        position: static;
        order: 3;
        width: 100%;
        background: none;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }

    .apm-nav-menu ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 20px;
        padding: 0;
    }

    .apm-nav-menu li {
        border-top: none;
    }

    .apm-nav-menu a {
        display: inline-block;
        padding: 4px 0;
    }

    .apm-actor-name {
        font-size: 2.5rem;
    }

    .apm-section {
        padding: 50px 0;
    }

    .apm-hero-section {
        padding: 90px 0 70px;
    }
}