/* Page Header Section */
.pg-header {
    background-image: url('https://www.dxn2u.com/success/images/Slider-Success.jpg');
}

/* Globe Navigation Styles */
.globe-nav {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 5rem 0;
}

.globe-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.globe-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px;
    text-align: center;
}

.globe-item:hover {
    transform: scale(1.1);
}

.globe-item.active {
    border-radius: 10px;
    transform: scale(1.1);
}

.globe-item img {
    width: 120px;
    height: 120px;
}

.region-name {
    color: #ff4400;
    font-weight: bold;
    text-align: center;
}

.globe-item.active .region-name {
    color: #000;
}

/* Crown Ambassador Section */
.crown-ambassador {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5rem 5rem;
}

.crown-container {
    padding: 2.5rem;
    margin-top: 2.5rem;
    background: #f4f4f4;
    border-radius: 8px;
}

.crown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.crown-icon {
    width: 50px;
    height: 50px;
}

.crown-header h2 {
    font-size: 2rem;
    color: #333;
}

.ambassador-grid {
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.ambassador-grid.second-row {
    margin-top: 1.5rem;  /* Add spacing between rows */
}

.ambassador-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
    cursor: pointer;
}

.ambassador-card:hover {
    transform: translateY(-5px);
}

.ambassador-card img {
    width: 100%;
    object-fit: cover;
}

.ambassador-info {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ambassador-info .flag-icon {
    width: 25px;
    height: 25px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0;
}

.ambassador-info span {
    font-size: 0.9rem;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .globe-nav {
        padding: 4rem 3rem 0;
    }

    .globe-container {
        gap: 1.75rem;
    }

    .crown-ambassador {
        padding: 0 4rem 3rem;
    }

    .ambassador-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }

    .globe-item img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 992px) {
    .globe-nav {
        padding: 3rem 2rem 0;
    }

    .globe-container {
        justify-content: center;
        gap: 1rem;
    }

    .globe-item {
        flex-basis: calc(25% - 0.75rem);
    }

    .crown-ambassador {
        padding: 0 3rem 2rem;
    }

    .ambassador-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .crown-container {
        padding: 2rem;
    }

    .crown-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .globe-nav {
        padding: 2rem 1.5rem 0;
    }

    .crown-ambassador {
        padding: 0 2rem 1.5rem;
    }

    .globe-container {
        gap: 1.5rem;
    }

    .globe-item {
        flex-basis: calc(33.3333% - 1rem);
    }
    
    .ambassador-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .globe-item img {
        width: 90px;
        height: 90px;
    }

    .crown-header {
        margin-bottom: 2rem;
    }

    .crown-icon {
        width: 40px;
        height: 40px;
    }

    .crown-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .globe-nav {
        padding: 1.5rem 1rem 0;
    }

    .crown-ambassador {
        padding: 0 1.5rem 1rem;
    }

    .globe-container {
        gap: 1rem;
    }

    .globe-item {
        padding: 5px;
    }

    .globe-item img {
        width: 80px;
        height: 80px;
    }

    .region-name {
        font-size: 0.9rem;
    }

    .ambassador-grid {
        gap: 0.75rem;
    }

    .crown-container {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .ambassador-info {
        padding: 0.5rem;
    }

    .ambassador-info .flag-icon {
        width: 20px;
        height: 20px;
    }

    .ambassador-info span {
        font-size: 0.7rem;
    }
}

/* Modal styles */
#ambassador-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
}

#ambassador-modal.show {
    display: block;
    opacity: 1;
    animation: overlayFadeIn 0.3s ease forwards;
}

#ambassador-modal .modal-content {
    background-color: #fefefe;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
    max-width: 900px;
    border-radius: 5px;
    position: relative;
    overflow-y: scroll;
    max-height: 90vh;
    top: 50%;
    transform: translateY(-50%);
}

#ambassador-modal.show .modal-content {
    animation: all 0.3s ease 0.1s forwards;
}

#ambassador-modal .close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

#ambassador-modal .close-modal:hover {
    color: #000;
}

#ambassador-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 1rem;
}

#ambassador-modal .modal-rank-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

#ambassador-modal .modal-profile {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

#ambassador-modal .modal-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

#ambassador-modal .modal-info {
    flex: 1;
}

#ambassador-modal .modal-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#ambassador-modal .modal-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

#ambassador-modal .modal-country {
    color: #666;
    font-size: 0.9em;
}

#ambassador-modal .modal-story {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

#ambassador-modal .modal-story h4 {
    margin-bottom: 15px;
    color: #333;
}

#ambassador-modal .modal-description {
    line-height: 1.6;
    color: #444;
}

#ambassador-modal .modal-description em {
	display: block;
	margin-bottom: 0.75rem;
}

#ambassador-modal .modal-description p {
	margin-bottom: 0.75rem;
}

#ambassador-modal .modal-description img {
    float: left;
    margin: 0 1rem 0.25rem 0;
    width: 100%;
    max-width: 250px;
    clear: both;
}

@media (max-width: 992px) {
    #ambassador-modal .modal-content {
        max-width: calc(100% - 4rem);
        margin: 0 2rem;
    }

    #ambassador-modal .modal-profile {
        flex-direction: column;
    }

    #ambassador-modal .modal-image {
        width: 100%;
        height: auto;
    }
}

/* Add these animation keyframes */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.member-name-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.member-flag {
    width: 24px;
    height: auto;
}