/* ========================================================= GLOBAL STYLES ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: #f2f7fa;
    font-family: 'Segoe UI', sans-serif;
    color: #1e293b;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* ========================================================= NAVBAR ========================================================= */

.navbar {
    background-color: #000 !important;
    padding: 20px 0;
}

.navbar-brand {
    position: relative;
    padding-bottom: 2px;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    transition: 0.3s ease;
}

.navbar-brand::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: orange;
    transition: 0.3s ease;
}

.navbar-brand:hover {
    color: orange;
}

.navbar-brand:hover::after {
    width: 100%;
}

.nav-link-custom {
    position: relative;
    margin-right: 20px;
    padding-bottom: 2px;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    transition: 0.3s ease;
}

.nav-link-custom::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background-color: orange;
    transition: 0.3s ease;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: orange;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    width: 100%;
}

.navbar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.dropdown-toggle::after {
    display: none !important;
}

/* ========================================================= BREADCRUMB ========================================================= */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 1200px;
    margin: 25px auto 0;
    padding: 0 20px;
    color: #777;
    font-size: 14px;
}

.breadcrumb a {
    color: #c98200;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ========================================================= PROFILE CARD ========================================================= */

.profile-card {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.profile-small-card {
    border-radius: 10px;
    transition: 0.3s ease;
}

.profile-small-card:hover {
    transform: translateY(-5px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.profile-header h2 {
    font-weight: 700;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 27px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.contact-item {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    overflow-wrap: anywhere;
}

/* ========================================================= PROFILE BOX / EDIT PROFILE ========================================================= */

.profile-box {
    position: relative;
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 40px auto;
    padding: 35px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.profile-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: #eb7125;
}

.profile-title {
    margin: 5px 0 25px;
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
}

/* ========================================================= PROFILE PHOTO ========================================================= */

.profile-photo {
    display: block;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    object-fit: cover;
    border: 3px solid #f0a500;
    border-radius: 50%;
}

.profile-info .profile-photo {
    width: 130px;
    height: 130px;
}

.profile-box td img.profile-photo {
    display: inline-block;
    width: 65px;
    height: 65px;
    margin: 3px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    vertical-align: middle;
    object-fit: cover;
}

.profile-box td a img.profile-photo {
    transition: transform 0.2s ease;
}

.profile-box td a:hover img.profile-photo {
    transform: scale(1.05);
}

/* ========================================================= SECTION TITLES ========================================================= */

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 14px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #d1d5db;
}

.section-title i {
    color: #eb7125;
}

/* ========================================================= TABS ========================================================= */

.tabs {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 6px 6px 0 0;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #fff;
    color: #d94d02;
}

.tab-btn.active {
    background: #eb7125;
    color: #fff;
}

/* ========================================================= TAB CONTENT ========================================================= */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================================= FORM GRID ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0 0 18px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin: 0;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

/* ========================================================= INPUTS, TEXTAREAS AND SELECTS ========================================================= */

.profile-box input[type="text"],
.profile-box input[type="email"],
.profile-box input[type="url"],
.profile-box input[type="file"],
.profile-box input[type="number"],
.profile-box input[type="tel"],
.profile-box textarea,
.profile-box select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-box input:focus,
.profile-box textarea:focus,
.profile-box select:focus {
    border-color: #eb7125;
    box-shadow: 0 0 0 3px rgba(235, 113, 37, 0.12);
}

.profile-box input:disabled,
.profile-box textarea:disabled,
.profile-box select:disabled {
    background-color: #e9ecef !important;
    cursor: not-allowed;
}

.profile-box textarea {
    min-height: 110px;
    resize: vertical;
}

.profile-box input[type="file"] {
    padding: 9px;
}

.profile-box input[type="checkbox"],
.profile-box input[type="radio"] {
    width: auto;
    max-width: none;
    accent-color: #eb7125;
    box-shadow: none;
}

/* ========================================================= TABLES ========================================================= */

.profile-box table,
.profile-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.profile-box table th,
.profile-table th {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    vertical-align: middle;
}

.profile-box table td,
.profile-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    vertical-align: middle;
}

.profile-box table tbody tr:hover,
.profile-table tbody tr:hover {
    background: #fafbfc;
}

.profile-box table tr:last-child td,
.profile-table tr:last-child td {
    border-bottom: none;
}

.profile-table input,
.profile-table textarea,
.profile-table select {
    margin: 0;
}

.profile-table input[type="file"] {
    min-width: 150px;
}

/* ========================================================= NEWS & MEDIA / ASSOCIATED PARTNERS IMAGE FIX Applies only when the corresponding classes exist ========================================================= */

/* Prevent image overflow without changing every image's height */
.profile-box table td img {
    display: inline-block !important;
    width: 100px !important;
    height: 80px !important;
    max-width: 100px !important;
    min-width: 0 !important;
    max-height: 80px !important;
    object-fit: contain !important;
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 768px) {
    .profile-box table td img {
        width: 70px !important;
        height: 60px !important;
        max-width: 70px !important;
        max-height: 60px !important;
    }
}



/* ========================================================= PORTFOLIO TABLE ACTION COLUMN Supports both existing ID spellings ========================================================= */

#portfoliotable th:last-child,
#portfoliotable td:last-child,
#portfoliotable th:last-child,
#portfoliotable td:last-child {
    width: 80px;
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* ========================================================= ACTION ICONS ========================================================= */

.delete-btn,
.add-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 3px;
    padding: 0 !important;
    box-sizing: border-box;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.add-btn {
    color: #198754;
}

.add-btn:hover {
    background: #dcfce7;
    color: #166534;
}

/* ========================================================= EXISTING FILE LINKS ========================================================= */

.existing-file {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 6px;
    color: #2563eb;
    font-size: 13px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.existing-file:hover {
    color: #d94d02;
    text-decoration: underline;
}

/* ========================================================= DEPARTMENT DROPDOWN ========================================================= */

.dropdown {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin-bottom: 25px;
}

.dropbtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fa5e21;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.dropbtn:hover {
    border-color: #d94d02;
    background: #d94d02 !important;
    color: #fff;
}

.dropbtn i {
    color: inherit;
}

.dropdown-content {
    display: none;
    position: relative;
    width: 100%;
    max-height: 180px;
    padding: 8px 0;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #fff;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

.dropdown-content label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: #555;
    font-size: 13px;
    cursor: pointer;
}

.dropdown-content label:hover {
    background: #fff8e6;
}

.dropdown-content input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: #f59e0b;
}

/* ========================================================= SAVE AND CANCEL BUTTONS ========================================================= */

.buttons {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end !important;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.buttons .save-btn,
.buttons .cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    min-width: 110px;
    min-height: 36px;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.buttons .save-btn {
    border-color: #fa5e21;
    background: #fa5e21;
    color: #fff;
}

.buttons .save-btn:hover {
    border-color: #d94d02;
    background: #d94d02;
}

.buttons .cancel-btn {
    border-color: #ddd;
    background: #fa5e21;
    color: #fff;
}

.buttons .cancel-btn:hover {
    border-color: #d94d02;
    background: #d94d02;
    color: #fff;
}

/* ========================================================= GENERAL ACTION BUTTONS ========================================================= */

.update-btn {
    padding: 10px;
    border: none;
    background: #007bff;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.update-btn:hover {
    background: #0056b3;
}

.read-more-btn {
    transition: 0.3s ease;
}

.read-more-btn:hover {
    background: #333;
}

.action-link,
.Common-Btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #fa5e21;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.action-link:hover,
.Common-Btn:hover {
    background: #d94d02;
    color: #fff;
}

.bottom-buttons,
.popup-button-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

/* ========================================================= SIGNATURE DISPLAY ========================================================= */

.signature-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.signature-box {
    width: 180px;
    max-width: 180px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafafa;
}

.signature-box h4 {
    margin: 0 0 8px;
    color: #334155;
    font-size: 14px;
}

.signature-box img,
.existing-signature img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 80px;
    margin: 8px 0;
    object-fit: contain;
}

.not-added {
    color: #777;
    font-size: 12px;
}

/* ========================================================= SIGNATURE POPUP ========================================================= */

.Popup-Container01 {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.6);
}

.Popup-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    padding: 30px;
    overflow-y: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

.Popup-content h2 {
    margin: 0 35px 25px 0;
    color: #1e293b;
    font-size: 23px;
}

.Popup-close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #333;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.Popup-close-btn:hover {
    background: #e2e8f0;
}

.Sign-div {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.existing-signature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.existing-label {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.Browse-btn-grad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 6px;
    background: #fa5e21;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.Browse-btn-grad:hover {
    background: #d94d02;
}

#fileUpload1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.signature-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.signature-separator::before,
.signature-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.signature-pad-container {
    width: 100%;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
}

.signature-pad-container .pad {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    touch-action: none;
    cursor: crosshair;
}

.clearButton {
    margin-top: 10px;
}

.cancel-btn.Common-Btn {
    background: #64748b;
}

.cancel-btn.Common-Btn:hover {
    background: #475569;
}

/* ========================================================= SEARCH FORM ========================================================= */

.search-form {
    width: 100%;
    max-width: 400px;
}
/* =========================================================
   NEWS & MEDIA — IMAGE SIZE AND SIDE-BY-SIDE LAYOUT
========================================================= */

.profile-box .news-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    width: 100%;
    align-items: start;
}

.profile-box .news-media-grid .media-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fafafa;
}

.profile-box .news-media-grid .media-thumbnail {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100px !important;
    max-height: 100px !important;
    object-fit: contain !important;
    margin: 0 auto;
}

.profile-box .news-media-grid .media-card a {
    display: block;
    width: 100%;
}

.profile-box .news-media-grid .file-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-box .news-media-grid .file-icon {
    font-size: 30px;
}

.profile-box .news-media-grid .file-name {
    color: #475569;
    font-size: 12px;
    text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
    .profile-box .news-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .profile-box .news-media-grid .media-thumbnail {
        height: 80px !important;
        max-height: 80px !important;
    }
}
/* ========================================================= RESPONSIVE: TABLETS ========================================================= */

@media (max-width: 992px) {
    .profile-card {
        padding: 20px;
    }

    .profile-box {
        max-width: 95%;
    }
}

/* ========================================================= RESPONSIVE: MOBILE ========================================================= */

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .navbar img {
        width: 40px;
        height: 40px;
    }

    .nav-link-custom {
        margin-right: 10px;
        font-size: 14px;
    }

    .profile-card {
        margin: 20px 10px;
        padding: 20px;
    }

    .profile-box {
        width: calc(100% - 20px);
        max-width: none;
        margin: 20px 10px;
        padding: 22px 18px;
    }

    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .profile-photo,
    .profile-info .profile-photo {
        width: 100px;
        height: 100px;
    }

    .profile-name {
        font-size: 23px;
    }

    .profile-header h2 {
        font-size: 22px;
    }

    .profile-title {
        font-size: 24px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .form-group.full {
        grid-column: auto;
    }

    .tabs {
        flex-direction: row;
        gap: 5px;
    }

    .tab-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 6px;
        font-size: 12px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .profile-box table,
    .profile-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-box table th,
    .profile-box table td,
    .profile-table th,
    .profile-table td {
        padding: 10px;
    }

    .profile-table input {
        min-width: 120px;
    }

    .profile-table input[type="file"] {
        min-width: 150px;
    }

    /* News & Media / Associated Partners images on mobile */
    .profile-box .news-media img,
    .profile-box .partners img,
    .profile-box .news-media td img,
    .profile-box .partners td img {
        width: 70px !important;
        min-width: 0;
        max-width: 70px !important;
        height: 60px !important;
        max-height: 60px;
        object-fit: contain;
    }

    .buttons {
        justify-content: flex-end !important;
    }

    .search-form {
        width: 100%;
        margin-top: 10px;
    }

    .profile-small-card {
        padding: 15px;
    }

    .Popup-content {
        padding: 24px 18px;
    }
}

/* ========================================================= RESPONSIVE: EXTRA SMALL DEVICES ========================================================= */

@media (max-width: 480px) {
    .navbar img {
        width: 35px;
        height: 35px;
    }

    .profile-card {
        padding: 15px;
    }

    .profile-box {
        width: calc(100% - 16px);
        margin: 12px 8px;
        padding: 18px 12px;
    }

    .profile-header h2 {
        font-size: 20px;
    }

    .profile-title {
        font-size: 22px;
    }

    .profile-name {
        font-size: 21px;
    }

    .contact-item {
        font-size: 13px;
    }

    .section-title {
        gap: 8px;
        margin: 24px 0 12px;
        font-size: 16px;
    }

    .breadcrumb {
        gap: 7px;
        margin-top: 18px;
        padding: 0 10px;
        font-size: 12px;
    }

    .tab-btn {
        padding: 9px 4px;
        font-size: 11px;
    }

    .buttons .save-btn,
    .buttons .cancel-btn {
        min-width: 90px;
        padding: 0 12px;
    }

    .bottom-buttons,
    .popup-button-container {
        gap: 8px;
    }

    .action-link,
    .Common-Btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .Popup-Container01 {
        padding: 10px;
    }

    .Popup-content {
        max-height: calc(100vh - 20px);
        padding: 22px 14px;
    }

    .Popup-content h2 {
        font-size: 20px;
    }

    .signature-box {
        padding: 14px;
    }
}

/* ========================================================= ACCESSIBILITY ========================================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #eb7125;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    ::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}