/* ============================================================
   ICMEI People — Celebrity & Diplomate Directories
   Includes: directory grid, person cards, registration form
   Brand palette:
     Green       #2d7a4f
     Light Green #3a8a5a
     Deep Green  #1f5d3a
     Gray        #6b7a7a
     Pale Green  #e8efe8
   ============================================================ */

/* ============================================================
   WRAPPER & HEADER
   ============================================================ */
.icmei-people-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: 'Poppins', sans-serif;
}

.icmei-people-header {
    text-align: center;
    margin-bottom: 50px;
}

.icmei-people-eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 600;
    color: #2d7a4f;
    text-transform: uppercase;
}

.icmei-people-heading {
    font-family: 'Playfair Display', serif;
    font-size: 3.2em;
    font-weight: 900;
    color: #1a2e2a;
    margin: 12px 0 0;
    line-height: 1.15;
}

/* ============================================================
   PEOPLE GRID
   ============================================================ */
.icmei-people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
}

/* ============================================================
   PERSON CARD
   ============================================================ */
.icmei-person-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e0e8e0;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
    display: flex;
    flex-direction: column;
    animation: icmeiPersonFade 0.5s ease forwards;
}

@keyframes icmeiPersonFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.icmei-person-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(45, 122, 79, 0.14);
    border-color: #2d7a4f;
}

/* ============================================================
   PHOTO
   ============================================================ */
.icmei-person-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #e8efe8, #d4e0d4);
}

.icmei-person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.icmei-person-card:hover .icmei-person-photo img {
    transform: scale(1.06);
}

/* Avatar fallback when no featured image */
.icmei-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #a8b8a8;
    background: linear-gradient(135deg, #e8efe8, #d4e0d4);
}

/* ============================================================
   INDUSTRY / COUNTRY BADGE
   ============================================================ */
.icmei-person-industry {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(45, 122, 79, 0.95);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 5px 12px;
    border-radius: 3px;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ============================================================
   CARD BODY
   ============================================================ */
.icmei-person-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.icmei-person-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25em;
    font-weight: 700;
    color: #1a2e2a;
    margin: 0 0 6px;
    line-height: 1.3;
}

.icmei-person-role {
    font-size: 0.82em;
    font-weight: 600;
    color: #2d7a4f;
    margin: 0 0 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.icmei-person-country {
    font-size: 0.8em;
    color: #6b7a7a;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icmei-person-country i {
    color: #2d7a4f;
    font-size: 0.9em;
}

.icmei-person-bio {
    font-size: 0.85em;
    color: #4a6a5a;
    line-height: 1.65;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #eef3ee;
    font-weight: 300;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.icmei-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #8a9898;
    font-style: italic;
    font-size: 1.05em;
    background: #f9fbf9;
    border-radius: 12px;
    border: 1px dashed #d0d7d0;
}

/* ============================================================
   DIPLOMATE THEME VARIANT
   ============================================================ */
.icmei-diplomate-theme .icmei-person-industry {
    background: rgba(31, 93, 58, 0.95);
}

.icmei-diplomate-theme .icmei-person-role {
    color: #1f5d3a;
}

.icmei-diplomate-theme .icmei-person-country i {
    color: #1f5d3a;
}

.icmei-diplomate-theme .icmei-avatar-placeholder {
    color: #8a9a8a;
}

/* ============================================================
   REGISTRATION FORM
   ============================================================ */
.icmei-reg-form-wrap {
    max-width: 740px;
    margin: 40px auto;
    padding: 45px 40px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0e8e0;
    box-shadow: 0 15px 40px rgba(45, 122, 79, 0.07);
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.icmei-reg-form-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d7a4f, #7dbd8a, #2d7a4f);
}

.icmei-reg-form-wrap h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.1em;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a2e2a;
    text-align: center;
}

.icmei-reg-form-wrap .sub {
    text-align: center;
    color: #6b7a7a;
    margin-bottom: 35px;
    font-size: 0.95em;
    line-height: 1.6;
    font-weight: 300;
}

/* ============================================================
   FORM GRID
   ============================================================ */
.icmei-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
}

.icmei-form-grid .full {
    grid-column: 1 / -1;
}

.icmei-form-field {
    display: flex;
    flex-direction: column;
}

.icmei-form-field label {
    display: block;
    font-size: 0.83em;
    font-weight: 600;
    color: #2d3e3f;
    margin-bottom: 7px;
    letter-spacing: 0.3px;
}

.icmei-form-field input,
.icmei-form-field select,
.icmei-form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d7d0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92em;
    background: #fafcfa;
    color: #2d3e3f;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
    box-sizing: border-box;
}

.icmei-form-field input:focus,
.icmei-form-field select:focus,
.icmei-form-field textarea:focus {
    outline: none;
    border-color: #2d7a4f;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

.icmei-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.icmei-form-field select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232d7a4f' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ============================================================
   PHOTO DROP ZONE
   ============================================================ */
.icmei-photo-drop {
    border: 2px dashed #c8d6c8;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: #f5f9f5;
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
    position: relative;
    overflow: hidden;
}

.icmei-photo-drop:hover {
    border-color: #2d7a4f;
    background: #eef5ee;
}

.icmei-photo-drop.dragover {
    border-color: #2d7a4f;
    background: #e8f5ec;
    transform: scale(1.01);
}

.icmei-photo-drop input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.icmei-photo-drop i {
    font-size: 30px;
    color: #2d7a4f;
    display: block;
    margin-bottom: 8px;
}

.icmei-photo-drop p {
    margin: 8px 0 0;
    color: #4a6a5a;
    font-size: 0.88em;
}

.icmei-photo-preview {
    max-width: 110px;
    max-height: 110px;
    border-radius: 50%;
    margin: 12px auto 0;
    display: none;
    object-fit: cover;
    border: 3px solid #2d7a4f;
    box-shadow: 0 4px 15px rgba(45, 122, 79, 0.2);
    position: relative;
    z-index: 2;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.icmei-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2d7a4f, #3a8a5a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.icmei-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(45, 122, 79, 0.35);
    filter: brightness(1.05);
}

.icmei-submit-btn:focus-visible {
    outline: 2px solid #2d7a4f;
    outline-offset: 3px;
}

.icmei-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================================
   FORM MESSAGE
   ============================================================ */
.icmei-form-msg {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9em;
    display: none;
    line-height: 1.5;
    border-left: 4px solid transparent;
}

.icmei-form-msg.success {
    background: #e8f5ec;
    color: #1f5d3a;
    border-left-color: #2d7a4f;
    display: block;
}

.icmei-form-msg.error {
    background: #fce8e8;
    color: #8a2d2d;
    border-left-color: #c94a4a;
    display: block;
}

/* ============================================================
   ACCESSIBILITY: REDUCED MOTION
   ------------------------------------------------------------
   Respects users who prefer reduced motion.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .icmei-person-card {
        animation: none;
    }

    .icmei-person-card,
    .icmei-person-photo img,
    .icmei-photo-drop,
    .icmei-submit-btn {
        transition: none;
    }

    .icmei-person-card:hover {
        transform: none;
    }

    .icmei-person-card:hover .icmei-person-photo img {
        transform: none;
    }

    .icmei-photo-drop.dragover {
        transform: none;
    }

    .icmei-submit-btn:hover:not(:disabled) {
        transform: none;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .icmei-people-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 22px;
    }
    .icmei-people-heading {
        font-size: 2.7em;
    }
}

@media (max-width: 768px) {
    .icmei-people-heading {
        font-size: 2.2em;
    }
    .icmei-people-wrap {
        padding: 40px 16px;
    }
    .icmei-people-header {
        margin-bottom: 35px;
    }
}

@media (max-width: 640px) {
    .icmei-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .icmei-reg-form-wrap {
        padding: 30px 22px;
        margin: 25px auto;
    }
    .icmei-reg-form-wrap h2 {
        font-size: 1.6em;
    }
    .icmei-people-grid {
        grid-template-columns: 1fr;
    }
    .icmei-people-heading {
        font-size: 1.9em;
    }
}

@media (max-width: 480px) {
    .icmei-people-wrap {
        padding: 30px 14px;
    }
    .icmei-people-heading {
        font-size: 1.7em;
    }
    .icmei-person-body {
        padding: 18px 18px 20px;
    }
    .icmei-person-name {
        font-size: 1.15em;
    }
}