/* =============================================
   TRUST MODAL EXACT MATCH — RUMANI TRAVELS
============================================= */

@font-face {
    font-family: 'FormalistScript';
    src: url('../../fonts/FormalistScript-Regular Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ── BACKDROP & ANIMATIONS ── */
.tm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(10, 22, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tm-backdrop.tm-open {
    opacity: 1;
    visibility: visible;
}

.tm-modal {
    position: relative;
    width: 100%;
    max-width: 75%;
    max-height: 95vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    opacity: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.tm-backdrop.tm-open .tm-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.tm-modal::-webkit-scrollbar {
    width: 6px;
}

.tm-modal::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: 10px;
}

.tm-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.tm-close:hover {
    background: #f1f5f9;
}

.tm-body {
    position: relative;
    padding: 3rem 4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cpath fill='%230f4c81' opacity='0.03' d='M400,200 C300,100 200,200 100,100 C200,300 300,150 400,200 C500,250 600,100 700,200 C600,300 500,150 400,200 Z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ── HEADER SECTION ── */
.tm-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tm-stars {
    color: #cca43b;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.tm-stars i:nth-child(2) {
    transform: translateY(-2px);
    font-size: 0.9rem;
}

.tm-recognized-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #cca43b;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.tm-line {
    height: 1px;
    width: 40px;
    background: #cca43b;
    position: relative;
}

.tm-line::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #cca43b;
    transform: rotate(45deg);
    top: -1.5px;
}

.tm-line:first-child::after {
    right: 0;
}

.tm-line:last-child::after {
    left: 0;
}

.tm-main-title {
    font-family: 'FormalistScript', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: normal;
    color: #0a1f3a;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.tm-subtitle {
    font-size: 1.05rem;
    color: #475569;
}

.tm-accent {
    color: #0f4c81;
    font-weight: 700;
}

/* ── LOGO SECTION ── */
.tm-logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.tm-big-logo {
    height: 200px;
    width: auto;
    margin: 0 auto;
    display: block;
}

.tm-since-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 15px;
    /* Pull it slightly up to overlap/touch the logo if needed */
    margin-bottom: 1.5rem;
}

.tm-since-line {
    height: 1px;
    width: 60px;
    background: #cca43b;
}

.tm-since-badge {
    background: #f7b217;
    /* Golden yellow */
    color: #3b1803;
    /* Dark brown almost black */
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 1.2rem;
    border-radius: 999px;
    letter-spacing: 0.1em;
}

.tm-tagline {
    font-size: 1rem;
    color: #0f4c81;
    font-weight: 500;
}

.tm-tagline-year {
    color: #0d8376;
    /* Teal/Green color from the image */
    font-weight: 700;
}

/* ── LICENSE CARDS ── */
.tm-license-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tm-license-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
}

.tm-card-icon {
    width: 48px;
    height: 48px;
    background: #0f4c81;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.tm-card-content {
    flex: 1;
}

.tm-card-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #0f4c81;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.tm-card-number {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.tm-card-issuer {
    font-size: 0.75rem;
    color: #64748b;
}

.tm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #dcfce7;
    color: #16a34a;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

/* ── TRUST BADGES ── */
.tm-trust-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tm-badge-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

.tm-badge-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    z-index: 10;
}

/* Tooltip container */
.tm-badge-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    display: flex;
    justify-content: center;
}

/* Add an arrow to the tooltip */
.tm-badge-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

/* Tooltip Image Override */
.tm-badge-card .tm-badge-tooltip img {
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0;
    border-radius: 8px;
    max-height: 550px;
    max-width: 100%;
}

.tm-badge-card .tm-tooltip-2 img {
    width: 450px;
    height: auto;
    max-width: none;
}

.tm-badge-card .tm-tooltip-3 img {
    width: 350px;
    height: auto;
    max-width: none;
}

/* Show tooltip on hover */
.tm-badge-card:hover .tm-badge-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tm-badge-card img {
    height: 100px;
    width: auto;
    object-fit: contain;
    margin-bottom: 0;
}

.tm-badge-card img.tm-saudi-consulate-img {
    height: 130px;
    margin-top: 0;
    /* Text is gone, so offset isn't needed as much, maybe just a little if we want it centered */
}

.tm-badge-icon {
    font-size: 10rem;
    margin-bottom: 0.75rem;
}

.tm-badge-card span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

/* ── ACTIONS ── */
.tm-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tm-btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0f4c81;
    color: #fff;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tm-btn-explore:hover {
    background: #0a3861;
}

.tm-btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 0.875rem 1.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tm-btn-continue:hover {
    border-color: #0f4c81;
    color: #0f4c81;
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    .tm-modal {
        max-width: 85%;
    }
}

@media (max-width: 1024px) {
    .tm-modal {
        max-width: 90%;
    }

    .tm-body {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .tm-modal {
        max-width: 95%;
    }

    .tm-subtitle {
        font-size: 0.95rem;
    }

    .tm-tagline {
        font-size: 0.95rem;
    }

    .tm-license-cards {
        grid-template-columns: 1fr;
    }

    .tm-status-badge {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        align-self: flex-start;
    }

    .tm-license-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tm-card-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .tm-trust-badges {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 540px) {
    .tm-modal {
        max-width: 100%;
    }

    .tm-body {
        padding: 2rem 1.25rem;
    }

    .tm-main-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
    }

    .tm-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .tm-tagline {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .tm-card-title {
        font-size: 0.7rem;
    }

    .tm-card-number {
        font-size: 0.95rem;
    }

    .tm-badge-card span {
        font-size: 0.7rem;
    }

    .tm-trust-badges {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .tm-badge-card {
        padding: 0.75rem 0.5rem;
    }

    .tm-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .tm-btn-explore,
    .tm-btn-continue {
        width: 100%;
        justify-content: center;
    }
}