/* GLOBAL RESET FOR PLUGIN: Prevents theme conflicts */
        .techobserver-container,
        .techobserver-container * {
            box-sizing: border-box;
        }

        .techobserver-container {
            width: 100%;            /* Ensure it fills the theme block */
            max-width: 100%;        /* Never exceed the theme block */
            padding: 20px;
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            transition: height 0.3s ease;
            margin: 0 auto;
            position: relative;     /* Keeps children contained */
        }

        .techobserver-title {
            font-size: 25px;
            color: #333333;
            margin-bottom: 10px;
            font-weight: bold;
            font-family: 'Red Hat Text', sans-serif;
            text-align: center;
            word-wrap: break-word; /* Prevents long titles from breaking layout */
        }

        .techobserver-events-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            width: 100%; /* Explicit width */
        }

        .techobserver-event-card {
            background: #ffffff;
            border: 1px solid #eaeaea;
            border-radius: 12px;
            display: flex;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            width: 100%; /* Ensure card fits grid cell */
        }

        .techobserver-event-label {
            font-size: 12px;
            color: #888;
            font-weight: normal;
            margin-bottom: 2px;
            font-family: 'Red Hat Text', sans-serif;
            text-transform: uppercase;
        }

        .techobserver-event-card-content {
            flex: 1;
            padding: 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-width: 0; /* Crucial: Allows flex child to shrink below content size */
        }

        .techobserver-event-title {
            font-size: 16px;
            font-weight: bold;
            color: #333333;
            margin-top: 2px;
            margin-bottom: 2px;
            font-family: 'Red Hat Text', sans-serif;
            line-height: 1.3;
        }

        .techobserver-event-description {
            font-size: 13px;
            color: #555555;
            margin-bottom: 2px;
            font-family: 'Red Hat Text', sans-serif;
            line-height: 1.7;
        }

        .techobserver-card-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 5px;
        }

        .techobserver-date-location {
            font-size: 11px;
            color: #888;
            display: flex;
            gap: 10px;
            font-family: 'Red Hat Text', sans-serif;
            align-items: center;
            flex-wrap: wrap;
        }

        .techobserver-register-btn,
        .techobserver-register-btn-disabled,
        .techobserver-register-btn-live {
            background: #ff1414;
            color: #ffffff;
            font-size: 12px;
            font-weight: normal;
            padding: 4px 8px; /* Slightly larger touch target */
            border-radius: 5px;
            text-decoration: none;
            transition: background-color 0.3s, color 0.3s;
            font-family: 'Red Hat Text', sans-serif;
            white-space: nowrap; /* Keep button on one line */
            display: inline-block;
        }

        .techobserver-register-btn:hover {
            background: #005dfa;
            color: #ffffff;
        }

        .techobserver-register-btn-disabled {
            background: #888;
            color: #fff;
            pointer-events: none;
            cursor: not-allowed;
        }

        .techobserver-register-btn-live {
            background: green;
            color: white;
        }

        .techobserver-event-image {
            width: 135px;
            min-width: 135px; /* Prevent shrinking */
            height: auto;     /* Allow height to adjust */
            min-height: 198px;
            display: flex;
            justify-content: center;
            align-items: center;
            background: #ffffff;
            padding: 8px 2px 8px 0px;
            overflow: hidden;
        }

        .techobserver-container .techobserver-event-image img {
            max-width: 100%;
            height: auto;
            border-radius: 5px;
            object-fit: cover;
        }

        .techobserver-events-wrapper {
            position: relative;
            overflow: hidden;
            width: 100%;
        }

        .techobserver-overlay{
            position:absolute;
            left:0; right:0; bottom:0;
            height: 110px;
            z-index:10;
            pointer-events:none;
            background: linear-gradient(
                to bottom,
                rgba(255,255,255,0) 0%,
                rgba(255,255,255,0.80) 50%,
                rgba(255,255,255,1) 100%
            );
        }

        .techobserver-load-more{
            position:absolute;
            left:50%;
            transform:translateX(-50%);
            bottom: 6px;
            z-index: 11;
            pointer-events:auto;
            background:none;
            border:none;
            cursor:pointer;
            color:#ff1414;
            font-weight:800;
            font-size:13px;
            letter-spacing:0.6px;
            text-transform:uppercase;
            display:inline-flex;
            align-items:center;
            gap:6px;
            font-family:'Red Hat Text', sans-serif;
            white-space: nowrap;
            text-decoration: none;
        }
        .techobserver-load-more:hover {
            color: #cc0000;
            text-decoration: underline;
        }

        /* Calendar Dropdown */
        .techobserver-cal-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .techobserver-cal-btn {
            background: none;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            color: #555;
            font-size: 11px;
            font-family: 'Red Hat Text', sans-serif;
            padding: 3px 6px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            white-space: nowrap;
            line-height: 1;
        }
        .techobserver-cal-btn:hover {
            border-color: #ff1414;
            color: #ff1414;
        }
        .techobserver-cal-dropdown {
            display: none;
            position: absolute;
            bottom: calc(100% + 4px);
            left: 0;
            background: #fff;
            border: 1px solid #eee;
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            z-index: 100;
            min-width: 160px;
            overflow: hidden;
        }
        .techobserver-cal-dropdown a {
            display: block;
            padding: 8px 12px;
            font-size: 12px;
            color: #333;
            text-decoration: none;
            font-family: 'Red Hat Text', sans-serif;
            white-space: nowrap;
        }
        .techobserver-cal-dropdown a:hover {
            background: #fff5f5;
            color: #ff1414;
        }
        .techobserver-cal-wrap.open .techobserver-cal-dropdown {
            display: block;
        }

        .techobserver-chevron{
            font-size:14px;
            line-height:1;
            transform: translateY(-1px);
        }

        /* Mobile Styles */
        @media (max-width: 768px) {
            .techobserver-container {
                padding: 15px 10px; /* Reduced padding on mobile to respect theme width */
                border-radius: 8px;
            }
            .techobserver-events-grid {
                grid-template-columns: 1fr; /* 1 column */
                gap: 15px;
            }
            .techobserver-event-card {
                flex-direction: column;
                padding: 12px;
                height: auto !important; /* Let content dictate height */
            }
            .techobserver-title { font-size: 20px; }
            .techobserver-event-title { font-size: 15px; }
            .techobserver-event-description { font-size: 12px; }
            
            /* Hide image on mobile as per original, but ensure layout holds */
            .techobserver-event-image { display: none !important; }
            
            .techobserver-overlay { height: 120px; }
        }

/* 1. Reset Container: Let Theme Handle Padding */
        .to-post-events {
            position: relative;
            width: 100%;
            margin: 0;    /* Removed margin so theme block controls it */
            padding: 0;   /* Removed padding so theme block controls it */
            border-top: 1px solid #e5e5e5;
            border-bottom: 1px solid #e5e5e5;
            font-family: 'Red Hat Text', sans-serif;
            box-sizing: border-box;
        }

        .to-post-events * {
            box-sizing: border-box;
        }

        .to-post-viewport {
            overflow: hidden;
            width: 100%;
        }

        .to-post-track {
            display: flex;
            transition: transform 0.35s ease;
            width: 100%;
        }

        .to-post-item {
            flex: 0 0 33.3333%; /* Desktop: 3 items */
            padding: 20px 15px; /* Internal spacing for the item content */
            min-height: 300px;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        /* Inner container to center content nicely */
        .to-post-inner-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            height: 100%;
            width: 100%;
        }

        /* EVENT label */
        .to-post-label {
            font-size: 11px;
            color: #d0021b;
            font-weight: 500;
            margin-bottom: 8px;
        }

        /* Image */
        .to-post-image-wrap {
            margin-bottom: 8px;
        }

        .to-post-image-wrap img {
            max-width: 90px;
            height: auto;
            border-radius: 8px;
            display: block;
        }

        /* Title */
        .to-post-title {
            font-size: 15px;
            font-weight: 600;
            color: #363636;
            margin-bottom: 6px;
            line-height: 1.3;
        }

        /* Description */
        .to-post-desc {
            font-size: 13px;
            color: #727272;
            line-height: 1.4;
            margin-bottom: 6px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Meta */
        .to-post-meta {
            font-size: 12px;
            color: #727272;
            line-height: 1.4;
            margin-bottom: 8px;
        }

        /* CTA */
        .to-post-cta {
            font-size: 13px;
            font-weight: 600;
            color: #d0021b;
            text-decoration: none;
            margin-top: auto;
        }

        /* Vertical separator */
        .to-post-separator {
            position: absolute;
            right: 0;
            top: 20%;
            bottom: 20%;
            width: 1px;
            background: linear-gradient(to bottom, #e5e5e5 0%, #727272 50%, #e5e5e5 100%);
        }

        /* Arrows (Desktop) */
        .to-post-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255,255,255,0.9);
            border: 1px solid #eee;
            border-radius: 50%;
            cursor: pointer;
            z-index: 5;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .to-post-nav.prev { left: 0px; }
        .to-post-nav.next { right: 0px; }

        .to-arrow {
            font-size: 20px;
            color: #363636;
            line-height: 0;
            padding-bottom: 3px;
        }

        .to-post-nav:hover { background: #fff; border-color: #d0021b; }
        .to-post-nav:hover .to-arrow { color: #d0021b; }

        /* ---------------------------------------------------------
         * MOBILE STYLES (The Fix)
         * --------------------------------------------------------- */
        @media(max-width:768px){
            /* Enable Native Swipe */
            .to-post-viewport {
                overflow-x: auto; /* Allow horizontal scroll */
                scroll-snap-type: x mandatory; /* Snap to elements */
                -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
                scrollbar-width: none; /* Hide scrollbar Firefox */
            }
            .to-post-viewport::-webkit-scrollbar { 
                display: none; /* Hide scrollbar Chrome/Safari */
            }

            /* Disable JS Transform Logic on Mobile */
            .to-post-track {
                transform: none !important; 
                width: auto;
                display: flex;
            }

            .to-post-item {
                flex: 0 0 100%; /* Show 1 item full width */
                width: 100%;
                scroll-snap-align: center; /* Snap content to center */
                padding: 15px 5px; /* Minimal padding, let theme handle edges */
                border: none;
            }

            .to-post-separator,
            .to-post-nav {
                display: none !important; /* Hide arrows and lines on mobile */
            }
        }
