/**
 * Custom Events Styling for Satellogic
 * Matches brand colors and typography
 */

/* Override The Events Calendar (TEC) Global Variables */
:root {
    --tec-color-accent: #1eb5d9 !important;
    --tec-color-accent-primary: #1eb5d9 !important;
    --tec-color-background-events-bar-submit-button: #1eb5d9 !important;
    --tec-color-text-events-bar-submit-button: #ffffff !important;
    --tec-color-text-primary: #02253f !important;
    --tec-color-link: #1eb5d9 !important;
}

/* Typography & Base Headings */
.eo-event-title,
.tribe-events-single-event-title,
.featured__post h2,
.posts--single h1,
.posts--single h2,
.posts--single h3,
.posts--single h4 {
    font-family: 'Montserrat', sans-serif !important;
    color: #02253f !important; /* Midnight Blue */
    text-transform: uppercase;
    font-weight: 700;
}

body, p, .eo-event-content {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
}

/* Primary Accents & Links */
.has-blue-color,
.eo-event-date,
.tribe-events-list-event-title a:hover,
.tribe-events-calendar-list__event-title-link:hover,
.posts__details a {
    color: #1eb5d9 !important; /* Satellogic Blue */
    transition: color 0.3s ease;
}

.featured__text {
    color: #ffffff !important;
}

/* Aggressively Remove TEC Anchor Bottom Border/Shadow */
.tribe-common a.tribe-common-anchor-thin,
.tribe-common a.tribe-common-anchor-thin:active, 
.tribe-common a.tribe-common-anchor-thin:focus, 
.tribe-common a.tribe-common-anchor-thin:hover,
.tribe-events-content a,
.tribe-events-content a:active,
.tribe-events-content a:focus,
.tribe-events-content a:hover {
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.tribe-common a.tribe-common-anchor-thin::after,
.tribe-common a.tribe-common-anchor-thin::before {
    content: none !important;
    display: none !important;
}

/* Buttons & Interactive Elements */
.btn-primary,
.tribe-events-button,
.tribe-common-c-btn,
.tribe-events-c-search__button,
.tribe-events button.tribe-events-c-search__button,
.tribe-events-calendar-list__event-more-info-link,
#tribe-events .tribe-events-button,
.eo-fullcalendar .fc-button,
.button.eo-booking-button {
    background-color: #1eb5d9 !important;
    border: none !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 30px !important;
    border-radius: 0 !important; /* Square branding */
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none !important;
}

.btn-primary:hover,
.tribe-events-button:hover,
.tribe-common-c-btn:hover,
.tribe-events-c-search__button:hover,
.tribe-events button.tribe-events-c-search__button:hover,
#tribe-events .tribe-events-button:hover,
.eo-fullcalendar .fc-button:hover,
.button.eo-booking-button:hover {
    background-color: #02253f !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 37, 63, 0.2);
}

/* Subscribe Dropdown Button Styling */
.tribe-events-c-subscribe-dropdown__button {
    border: 1px solid #1eb5d9 !important;
    background-color: transparent !important;
    padding: 8px 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
    cursor: pointer;
    outline: none !important;
}

/* Remove default focus styles */
.tribe-events-c-subscribe-dropdown__button:focus,
.tribe-events-c-subscribe-dropdown__button:focus-visible,
.tribe-events-c-subscribe-dropdown__button .tribe-events-c-subscribe-dropdown__button-text:focus,
.tribe-events-c-subscribe-dropdown__button .tribe-events-c-subscribe-dropdown__button-text:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.tribe-events-c-subscribe-dropdown__button-text {
    color: #1eb5d9 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    margin-right: 10px !important;
    outline: none !important;
}

/* All SVGs in the Subscribe Button (Fill & Stroke) */
.tribe-events-c-subscribe-dropdown__button svg path,
.tribe-events-c-subscribe-dropdown__button svg circle,
.tribe-events-c-subscribe-dropdown__button svg rect,
.tribe-events-c-subscribe-dropdown__button .tribe-common-c-svgicon__svg-fill {
    fill: #1eb5d9 !important;
    stroke: #1eb5d9;
}

.tribe-events-c-subscribe-dropdown__button svg {
    stroke: #1eb5d9;
}

/* Hover AND open dropdown state (aria-expanded) */
.tribe-events-c-subscribe-dropdown__button:hover,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]),
.tribe-events-c-subscribe-dropdown__button:focus-within {
    background-color: #1eb5d9 !important;
    border-color: #1eb5d9 !important;
}

.tribe-events-c-subscribe-dropdown__button:hover .tribe-events-c-subscribe-dropdown__button-text,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) .tribe-events-c-subscribe-dropdown__button-text,
.tribe-events-c-subscribe-dropdown__button:focus-within .tribe-events-c-subscribe-dropdown__button-text {
    color: #ffffff !important;
}

.tribe-events-c-subscribe-dropdown__button:hover svg path,
.tribe-events-c-subscribe-dropdown__button:hover svg circle,
.tribe-events-c-subscribe-dropdown__button:hover svg rect,
.tribe-events-c-subscribe-dropdown__button:hover .tribe-common-c-svgicon__svg-fill,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) svg path,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) svg circle,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) svg rect,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) .tribe-common-c-svgicon__svg-fill,
.tribe-events-c-subscribe-dropdown__button:focus-within svg path,
.tribe-events-c-subscribe-dropdown__button:focus-within svg circle,
.tribe-events-c-subscribe-dropdown__button:focus-within svg rect,
.tribe-events-c-subscribe-dropdown__button:focus-within .tribe-common-c-svgicon__svg-fill {
    fill: #ffffff !important;
    stroke: #ffffff;
}

.tribe-events-c-subscribe-dropdown__button:hover svg,
.tribe-events-c-subscribe-dropdown__button:has([aria-expanded="true"]) svg,
.tribe-events-c-subscribe-dropdown__button:focus-within svg {
    stroke: #ffffff;
}

/* Featured Event Styling */
.tribe-events-calendar-list__event-row--featured .tribe-events-calendar-list__event-date-tag-datetime:after {
    background-color: #1eb5d9 !important;
}

.tribe-common-c-svgicon--featured path {
    fill: #1eb5d9 !important;
}

.tribe-events-calendar-list__event-datetime-featured-icon-svg path {
    fill: #1eb5d9 !important;
}

/* Event Organiser Venue & Maps */
.eo-event-venue-map, 
.eo-venue-map {
    border: 1px solid #c1b8b4 !important;
    padding: 5px;
    background: #fff;
    margin-bottom: 20px;
}

/* Secondary Breadcrumbs */
.secondary-breadcrumbs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.secondary-breadcrumbs a {
    color: #7a7474 !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
}

.secondary-breadcrumbs a:hover {
    color: #1eb5d9 !important;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero-secondary {
        padding: 60px 0;
    }
    
    .posts__details .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 767px) {
    .featured__post h2 {
        font-size: 1.4rem !important;
    }
    
    .btn-primary, .button.eo-booking-button {
        width: 100%;
        text-align: center;
        padding: 15px !important;
    }
    
    .eo-event-venue-map {
        height: 250px !important;
    }
}

/* Carousel/Slider Styling */
.post-slider--no-slide {
    margin-top: 20px;
}

.post-slider__item {
    border-bottom: 3px solid #1eb5d9;
    background: #fff;
    transition: transform 0.3s ease;
}

.post-slider__item:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   The Events Calendar — Single Event Page Revamp
   ========================================================================== */

/* Back Link */
.tribe-events-back a {
    color: #1eb5d9 !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tribe-events-back a:hover {
    color: #02253f !important;
}

/* Title */
.tribe-events-single-event-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 2.8rem !important;
    color: #02253f !important;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem !important;
    position: relative;
    padding-bottom: 1.5rem;
    text-transform: none !important;
}

.tribe-events-single-event-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #1eb5d9, #5ec9e5);
    border-radius: 2px;
}

/* Schedule / Date & Cost Bar */
.tribe-events-schedule {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 !important;
    margin-bottom: 2rem !important;
    background: none;
    border: none;
    border-radius: 0;
}

.tribe-events-schedule > div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #7a7474;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tribe-events-schedule > div::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 0.35rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231eb5d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

.tribe-event-date-start,
.tribe-event-date-end {
    color: #02253f;
}

.tribe-events-schedule .tribe-events-cost {
    font-family: 'Montserrat', sans-serif;
    color: #02253f !important;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(30, 181, 217, 0.1);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
}

/* Header Navigation */
.tribe-events-single #tribe-events-header {
    margin-bottom: 2rem;
}

.tribe-events-sub-nav li a {
    color: #1eb5d9 !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.tribe-events-sub-nav li a:hover {
    color: #02253f !important;
}

/* Featured Image */
.tribe-events-single .tribe-events-event-image {
    margin-bottom: 2.5rem !important;
    border-radius: 12px;
    overflow: hidden;
}

.tribe-events-single .tribe-events-event-image img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* Event Content */
.tribe-events-single-event-description {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #4a4a4a;
    margin-bottom: 2.5rem;
}

.tribe-events-single-event-description a {
    color: #1eb5d9 !important;
    text-decoration: none;
    border-bottom: none !important;
    transition: color 0.2s ease;
}

.tribe-events-single-event-description a:hover {
    color: #157d96 !important;
    text-decoration: underline;
}

/* Meta Section Titles */
.tribe-events-single-section-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px;
    color: #02253f !important;
    font-weight: 700;
}

/* Meta Labels & Values */
.tribe-events-meta-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7a7474;
    font-weight: 600;
}

.tribe-events-meta-value {
    font-family: 'Open Sans', sans-serif;
    color: #02253f;
    font-size: 0.95rem;
}

/* Standalone Map — same width as content */
.tribe-events-map-standalone {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tribe-events-map-standalone iframe {
    width: 100% !important;
    height: 400px !important;
    min-height: 400px !important;
    display: block;
    border: none !important;
}

/* Footer — Event Nav Cards */
#tribe-events-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.tec-event-nav-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.tec-event-nav-card {
    display: flex;
    align-items: stretch;
    text-decoration: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tec-event-nav-card:hover {
    border-color: #1eb5d9;
}

.tec-event-nav-card--next {
    flex-direction: row-reverse;
    text-align: right;
}

.tec-event-nav-card__image {
    width: 70px;
    min-width: 70px;
    height: 70px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f5f5f5;
    margin: auto 0;
    margin-left: 1rem;
    border-radius: 6px;
}

.tec-event-nav-card--next .tec-event-nav-card__image {
    margin-left: 0;
    margin-right: 1rem;
}

.tec-event-nav-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tec-event-nav-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.25rem;
    gap: 0.25rem;
    min-width: 0;
}

.tec-event-nav-card__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1eb5d9;
    font-weight: 700;
}

.tec-event-nav-card__date {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: #7a7474;
}

.tec-event-nav-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #02253f;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .tribe-events-single-event-title {
        font-size: 1.8rem !important;
    }

    .tribe-events-map-standalone iframe {
        height: 280px !important;
        min-height: 280px !important;
    }

    .tribe-events-schedule {
        padding: 0.75rem 1rem !important;
    }

    .tec-event-nav-cards {
        grid-template-columns: 1fr;
    }

    .tec-event-nav-card--next {
        flex-direction: row;
        text-align: left;
    }

    .tec-event-nav-card--next .tec-event-nav-card__image {
        margin-right: 0;
        margin-left: 1rem;
    }

    .tec-event-nav-card__image {
        width: 60px;
        min-width: 60px;
        height: 60px;
    }

    .tec-event-nav-card__content {
        padding: 0.75rem 1rem;
    }

    .tec-event-nav-card__title {
        font-size: 0.85rem;
    }
}
