/**
 * TravelSphere Social Media Hub - Frontend Stylesheet
 * Deep Navy Aesthetic: #011C3F
 * Accent Emerald: #00D68F
 */

:root {
    --tssm-bg-color: #011C3F;
    --tssm-accent-color: #00D68F;
    --tssm-text-main: #FFFFFF;
    --tssm-text-muted: #94A3B8;
    --tssm-card-border: rgba(255, 255, 255, 0.12);
    --tssm-glass-bg: rgba(255, 255, 255, 0.05);
    --tssm-glass-border: rgba(255, 255, 255, 0.15);
    --tssm-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --tssm-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Hub Section */
.tssm-hub-section {
    position: relative;
    background-color: var(--tssm-bg-color, #011C3F);
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 214, 143, 0.08) 0%, transparent 60%);
    padding: 85px 0 95px 0;
    color: var(--tssm-text-main, #FFFFFF);
    font-family: var(--tssm-font-body);
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
}

.tssm-hub-section *,
.tssm-hub-section *::before,
.tssm-hub-section *::after {
    box-sizing: border-box;
}

.tssm-container {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* Header Area */
.tssm-header-block {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 36px auto;
}

/* Green Pill Badge */
.tssm-pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    background: rgba(0, 214, 143, 0.12);
    border: 1px solid rgba(0, 214, 143, 0.45);
    border-radius: 50px;
    color: var(--tssm-accent-color, #00D68F);
    font-family: var(--tssm-font-heading);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    box-shadow: 0 0 16px rgba(0, 214, 143, 0.15);
}

/* Main Heading */
.tssm-main-heading {
    font-family: var(--tssm-font-heading);
    font-size: 46px;
    font-weight: 800;
    line-height: 1.18;
    color: #FFFFFF;
    margin: 0 0 16px 0;
    letter-spacing: -0.8px;
    text-wrap: balance;
}

/* Subtitle */
.tssm-sub-heading {
    font-size: 16px;
    line-height: 1.65;
    color: var(--tssm-text-muted, #94A3B8);
    margin: 0 auto 28px auto;
    max-width: 680px;
    font-weight: 400;
    text-align: center;
    text-wrap: balance;
    word-spacing: normal;
    letter-spacing: normal;
}

/* Social Media CTA Buttons Row */
.tssm-social-cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 14px;
    margin-top: 10px;
    width: 100%;
    max-width: 100%;
}

.tssm-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.tssm-social-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.tssm-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Platform specific accents */
.tssm-btn-instagram .tssm-btn-icon {
    color: #E1306C;
}
.tssm-btn-whatsapp .tssm-btn-icon {
    color: #25D366;
}
.tssm-btn-whatsapp:hover {
    border-color: rgba(37, 211, 102, 0.45);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3), 0 0 16px rgba(37, 211, 102, 0.25);
}
.tssm-btn-tiktok .tssm-btn-icon {
    color: #25F4EE;
    text-shadow: 1px 1px 0 #FE2C55;
}
.tssm-btn-youtube .tssm-btn-icon {
    color: #FF0000;
}
.tssm-btn-facebook .tssm-btn-icon {
    color: #1877F2;
}

/* Sub-header Controls Row */
.tssm-controls-row {
    display: none !important;
}

.tssm-hint-indicator {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: var(--tssm-text-muted, #94A3B8);
    font-weight: 500;
}

.tssm-hint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--tssm-accent-color, #00D68F);
    box-shadow: 0 0 10px var(--tssm-accent-color, #00D68F);
    display: inline-block;
    animation: tssm-pulse 2s infinite ease-in-out;
}

@keyframes tssm-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.tssm-nav-col {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tssm-nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    padding: 0;
}

.tssm-nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.06);
    color: #FFFFFF;
}

.tssm-nav-btn:active {
    transform: scale(0.96);
}

/* 9:16 Vertical Carousel Track */
.tssm-carousel-wrap {
    position: relative;
    width: 100%;
}

.tssm-carousel-track {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 4px 26px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.tssm-carousel-track::-webkit-scrollbar {
    display: none;
}

/* 9:16 Vertical Card Item */
.tssm-card-item {
    flex: 0 0 calc((100% - (4 * 22px)) / 5); /* 5 cards visible on large desktop */
    min-width: 240px;
    max-width: 275px;
    height: 485px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--tssm-card-border);
    background-color: #03142B;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    user-select: none;
}

.tssm-card-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 214, 143, 0.4);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.55), 0 0 25px rgba(0, 214, 143, 0.2);
}

/* Card Media Background */
.tssm-card-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tssm-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tssm-card-item:hover .tssm-card-img {
    transform: scale(1.06);
}

.tssm-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #021a3a 0%, #032b5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: rgba(255, 255, 255, 0.2);
}

/* Dark Gradient Overlay for optimal readability */
.tssm-card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(1, 28, 63, 0.4) 0%,
        rgba(1, 28, 63, 0.05) 30%,
        rgba(1, 28, 63, 0.35) 55%,
        rgba(1, 28, 63, 0.88) 80%,
        rgba(1, 28, 63, 0.98) 100%
    );
    z-index: 2;
}

/* Top Badges Row */
.tssm-card-top-row {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tssm-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.tssm-tag-pill i {
    font-size: 11px;
}

/* Animated Equalizer Sound Bars */
.tssm-equalizer-bars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    height: 26px;
}

.eq-bar {
    width: 2.5px;
    border-radius: 2px;
    background-color: var(--tssm-accent-color, #00D68F);
    display: inline-block;
    animation: tssm-eq 1.2s infinite ease-in-out;
}

.eq-bar-1 { height: 8px; animation-delay: 0.1s; }
.eq-bar-2 { height: 14px; animation-delay: 0.3s; }
.eq-bar-3 { height: 10px; animation-delay: 0.2s; }

@keyframes tssm-eq {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1.3); }
}

/* Card Tap Trigger Overlay */
.tssm-card-tap-trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Bottom Content Details */
.tssm-card-bottom-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 16px 14px 16px;
    z-index: 3;
    pointer-events: none;
}

/* Creator Row */
.tssm-creator-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tssm-creator-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #FFFFFF;
    background-color: #03142B;
}

.tssm-creator-handle {
    font-size: 12.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Card Title */
.tssm-card-title {
    font-family: var(--tssm-font-heading);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #FFFFFF;
    margin: 0 0 7px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Location Tag */
.tssm-location-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--tssm-accent-color, #00D68F);
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.tssm-location-tag i {
    font-size: 10.5px;
}

/* Card Footer Bar */
.tssm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 11px;
    color: var(--tssm-text-muted, #94A3B8);
    font-weight: 500;
}

.tssm-footer-badge-left,
.tssm-footer-badge-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Bottom Progress Bar */
.tssm-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-top: 24px;
    overflow: hidden;
    position: relative;
}

.tssm-progress-bar {
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, #00D68F 0%, #25F4EE 100%);
    border-radius: 4px;
    transition: width 0.2s ease-out;
}

/* ==========================================================================
   Interactive Video Modal Player
   ========================================================================== */
.tssm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tssm-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.tssm-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 28, 63, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.tssm-modal-dialog {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 480px; /* Vertical 9:16 optimized */
    background: #02142B;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tssm-modal.is-active .tssm-modal-dialog {
    transform: scale(1);
}

.tssm-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tssm-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.tssm-modal-player-wrap {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 70vh;
    background: #000000;
    position: relative;
    overflow: hidden;
}

#tssm-modal-player-container {
    width: 100%;
    height: 100%;
}

#tssm-modal-player-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#tssm-modal-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.tssm-modal-meta {
    padding: 18px 20px 20px 20px;
    background: #02142B;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tssm-modal-header-meta h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    font-family: var(--tssm-font-heading);
}

.tssm-modal-sub-meta {
    font-size: 12.5px;
    color: var(--tssm-text-muted, #94A3B8);
    display: flex;
    gap: 10px;
}

.tssm-modal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--tssm-accent-color, #00D68F);
    color: #011C3F;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tssm-modal-cta-btn:hover {
    background: #25F4EE;
    color: #011C3F;
    transform: translateY(-2px);
}

/* Standalone Social Icons (for [social_media] shortcode) */
.tssm-standalone-social-links {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.tssm-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.tssm-icon-link:hover {
    background: var(--tssm-accent-color, #00D68F);
    color: #011C3F;
    transform: translateY(-2px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
    .tssm-card-item {
        flex: 0 0 calc((100% - (3 * 22px)) / 4); /* 4 cards visible */
        max-width: 280px;
    }
    .tssm-main-heading {
        font-size: 38px;
    }
}

@media (max-width: 991px) {
    .tssm-hub-section {
        padding: 60px 0 70px 0;
    }
    .tssm-card-item {
        flex: 0 0 calc((100% - (2 * 18px)) / 3); /* 3 cards visible */
        height: 440px;
    }
    .tssm-main-heading {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .tssm-card-item {
        flex: 0 0 calc((100% - 16px) / 2); /* 2 cards visible */
        min-width: 190px;
        height: 390px;
        border-radius: 20px;
    }
    .tssm-social-cta-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 4px !important;
        box-sizing: border-box !important;
    }
    .tssm-social-btn {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        max-width: 33.333% !important;
        padding: 9px 6px !important;
        font-size: 11.5px !important;
        gap: 6px !important;
        justify-content: center !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }
    .tssm-social-btn .tssm-btn-icon {
        font-size: 13px !important;
        flex-shrink: 0 !important;
    }
    .tssm-social-btn .tssm-btn-label {
        font-size: 11.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .tssm-main-heading {
        font-size: 28px;
    }
    .tssm-sub-heading {
        font-size: 14.5px;
    }
    .tssm-modal-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    .tssm-modal-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .tssm-card-item {
        flex: 0 0 82%; /* Almost full card width with glimpse of next */
        height: 420px;
    }
}

@media (max-width: 360px) {
    .tssm-social-cta-row {
        gap: 5px !important;
    }
    .tssm-social-btn {
        padding: 7px 4px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }
    .tssm-social-btn .tssm-btn-icon {
        font-size: 11.5px !important;
    }
    .tssm-social-btn .tssm-btn-label {
        font-size: 10px !important;
    }
}
