/* Typography - Using site defaults with Jost for headings */
.events-carousel h3,
.event-list-item h3,
.single-event-title,
.event-sidebar h2 {
    font-family: 'Jost', sans-serif;
}

/* Events Carousel */
.events-carousel {
    position: relative;
    width: 100%;
    overflow: visible; /* Allow arrows to show outside */
    padding: 20px 72px; /* Adjusted padding to accommodate arrows with margin */
    border-radius: 15px;
    background: transparent; /* Remove background to prevent shadow conflicts */
}

.carousel-container {
    position: relative; /* Add relative positioning for arrow positioning */
    overflow: hidden;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Move shadow to container */
    background: #fff;
    min-height: 400px; /* Ensure minimum height for proper carousel display */
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
    height: 100%; /* Ensure track takes full height */
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 100%; /* Ensure slide takes full height of track */
}

.event-card {
    border: none; /* Remove border to prevent double borders */
    border-radius: 15px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: none; /* Remove individual card shadows */
    transition: transform 0.3s ease;
    height: 100%;
    margin: 0; /* Remove any margins that might affect width */
}

.event-card:hover {
    transform: translateY(-2px); /* Subtle hover effect */
}

.event-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    width: 100% !important;
    margin: 0 !important; /* Remove any margins */
    padding: 0 !important; /* Remove any padding */
    border-radius: 15px 15px 0 0; /* Only round top corners */
    background: #f5f5f5; /* Fallback background */
}

.event-card-image img {
    width: 100% !important; /* Force full width */
    height: 100% !important; /* Force full height */
    object-fit: cover !important;
    transition: transform 0.3s ease;
    display: block !important;
    margin: 0 !important; /* Remove any margins */
    padding: 0 !important; /* Remove any padding */
    border: none !important; /* Remove any borders */
    border-radius: 0 !important; /* Remove any border radius */
    max-width: none !important; /* Override any max-width constraints */
    min-width: 100% !important; /* Ensure minimum width */
}

.event-card:hover .event-card-image img {
    transform: scale(1.03); /* Subtle zoom on hover */
}

.event-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

.event-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.4;
}

.event-card h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-card h3 a:hover {
    color: #325ce8;
}

.event-price {
    color: #325ce8;
    font-weight: 600;
    font-size: 1.1em;
    margin: 0 0 10px 0;
}

.event-date {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 15px 0;
}

.event-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.event-button {
    display: inline-block;
    background: #325ce8;
    color: white;
    padding: 0.44rem 0.67em;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    align-self: flex-start;
}

.event-button:hover {
    background: #2647c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(50, 92, 232, 0.3);
    color: white;
    text-decoration: none;
}

/* Carousel Navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin: 0 10px; /* Add margin to arrows */
}

.carousel-arrow:hover {
    background: #325ce8;
    color: white;
    border-color: #325ce8;
    box-shadow: 0 8px 30px rgba(50, 92, 232, 0.25), 0 2px 8px rgba(50, 92, 232, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.98);
}

.carousel-prev {
    left: -10px; /* Position relative to carousel-container with margin */
}

.carousel-next {
    right: -10px; /* Position relative to carousel-container with margin */
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active,
.carousel-dot:hover {
    background: #325ce8;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.event-list-item {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-list-item-image {
    position: relative;
    width: 250px;
    min-height: 200px;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.event-list-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-list-item:hover .event-list-item-image img {
    transform: scale(1.05);
}

.date-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: 500;
    font-size: 0.9em;
}

.event-list-item-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.event-list-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.4;
}

.event-list-item h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-list-item h3 a:hover {
    color: #325ce8;
}

.event-list-item .event-price {
    color: #325ce8;
    font-weight: 600;
    font-size: 1.1em;
    margin: 0 0 15px 0;
}

.event-list-item .event-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Single Event Block */
.single-event-block {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    border: none;
    min-height: 100vh;
    padding-bottom: 100px; /* Ensure space for footer */
}

.single-event-content {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-event-main {
    flex: 2;
    padding: 40px 0;
}

.single-event-title {
    margin: 0 0 20px 0;
    font-size: 2.5em;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    font-family: 'Jost', sans-serif;
}

.single-event-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.single-event-meta .event-date {
    font-size: 1.2em;
    color: #666;
    margin: 0;
}

.single-event-meta .event-price {
    font-size: 1.2em;
    font-weight: 600;
    color: #325ce8;
    margin: 0;
}

.single-event-description {
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555;
}

.single-event-tickets {
    margin-top: 30px;
    padding: 30px;
    border: 2px solid #325ce8;
    border-radius: 15px;
    background: #f8f9ff;
}

.single-event-tickets h3 {
    color: #325ce8;
    font-family: 'Jost', sans-serif;
    font-size: 1.4em;
    margin: 0 0 25px 0;
    font-weight: 600;
}

.ticket-item {
    background: white;
    padding: 28px; /* a bit more breathing room */
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ticket-item.ticket-unavailable {
    background: #f5f5f5;
    opacity: 0.6;
    border-color: #ccc;
}

.ticket-item:last-child {
    margin-bottom: 0;
}

.ticket-item h4 {
    color: #333;
    font-family: 'Jost', sans-serif;
    font-size: 1.3em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.ticket-price {
    color: #325ce8;
    font-size: 1.2em;
    font-weight: 600;
    margin: 10px 0;
}

.price-amount {
    font-weight: 700;
}

.ticket-description {
    color: #555;
    margin: 10px 0;
    line-height: 1.5;
    font-style: italic;
}

.ticket-availability {
    color: #28a745;
    font-weight: 500;
    margin: 10px 0;
    font-size: 0.95em;
}

.ticket-unavailable-text {
    color: #dc3545;
    font-weight: 600;
    margin: 10px 0;
    text-transform: uppercase;
    font-size: 0.9em;
}

.ticket-quantity-control {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-quantity-control label {
    color: #333;
    font-weight: 500;
    min-width: 60px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent; /* remove pill container */
}

.quantity-decrease,
.quantity-increase {
    background: #fff;
    color: #325ce8;
    border: 2px solid #325ce8;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    line-height: 1;
}

.quantity-decrease:hover,
.quantity-increase:hover {
    background: #325ce8;
    color: #fff;
}

.quantity-decrease:disabled,
.quantity-increase:disabled {
    opacity: .35;
    cursor: not-allowed;
    border-color: #cdd6f9;
    color: #9aa5c6;
}

.ticket-quantity {
    border: 1px solid #d7ddea;
    width: 56px;
    height: 34px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: white;
    outline: none;
    border-radius: 6px;
}

.ticket-quantity:focus {
    background: #f8f9ff;
    border-color: #325ce8;
    box-shadow: 0 0 0 2px rgba(50,92,232,.12);
}

.ticket-summary {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border: 2px solid #325ce8;
    text-align: center;
}

.total-price {
    font-size: 1.4em;
    font-weight: 700;
    color: #325ce8;
    margin-bottom: 20px;
    font-family: 'Jost', sans-serif;
}

.ticket-submit-btn {
    background: #ccc;
    color: #666;
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    cursor: not-allowed;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    min-width: 200px;
}

.ticket-submit-btn.has-items,
.ticket-submit-btn:not(:disabled) {
    background: #325ce8;
    color: white;
    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(50, 92, 232, 0.3);
}

.ticket-submit-btn.has-items:hover,
.ticket-submit-btn:not(:disabled):hover {
    background: #2647c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 92, 232, 0.4);
}

/* Style for Event Tickets Plus and other ticket plugins */
.single-event-tickets .tribe-tickets {
    background: transparent;
    border: none;
    padding: 0;
}

.single-event-tickets .tribe-ticket {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.single-event-tickets .tribe-ticket h3 {
    color: #333;
    font-size: 1.3em;
    margin: 0 0 15px 0;
}

.single-event-tickets .tribe-ticket-price {
    color: #325ce8;
    font-weight: 600;
    font-size: 1.2em;
}

.single-event-tickets .tribe-ticket-quantity {
    margin: 20px 0;
}

.single-event-tickets .tribe-ticket-submit {
    background: #325ce8;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.single-event-tickets .tribe-ticket-submit:hover {
    background: #2647c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(50, 92, 232, 0.3);
}

/* Custom form styling - updated for comprehensive ticket system */
.custom-tickets-form {
    width: 100%;
    margin: 30px 0;
    padding: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(50, 92, 232, 0.08);
    border: 1px solid #e8edf7;
}

.custom-tickets-form input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.custom-tickets-form input[type="number"]::-webkit-outer-spin-button,
.custom-tickets-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single-event-sidebar {
    flex: 1;
    background: #f9f9f9;
    padding: 40px 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Single Event Page (for original theme integration) */
.single-tribe_events .tribe-events-single {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.single-tribe_events .tribe-events-pg-template {
    flex: 2;
}

.event-sidebar,
.single-event-sidebar {
    flex: 1;
    background: #f9f9f9;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-title {
    color: #555;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-weight: 600;
    font-family: inherit;
}

.sidebar-content {
    line-height: 1.6;
    color: #555;
    font-weight: 400;
    font-family: inherit;
}

.sidebar-content p {
    margin-bottom: 10px;
    color: #555;
    font-weight: 400;
}

.sidebar-content strong {
    color: #555;
    font-weight: 400;
}

.cost-info {
    color: #555;
    font-weight: 400;
}

.event-date-sidebar,
.event-price-sidebar {
    margin-bottom: 8px !important;
    color: #555;
    font-weight: 400;
}

.sidebar-section h2 {
    color: #555;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-weight: 600;
    font-family: inherit;
}

.sidebar-section .cost {
    color: #555;
    font-size: 1em;
    font-weight: 400;
    margin: 0;
}

.dozent-image {
    width: 100%;
    max-width: 200px;
    border-radius: 10px;
    box-shadow: none;
    margin-bottom: 15px;
}

.dozent-kurzinfo {
    line-height: 1.6;
    color: #555;
    font-weight: 400;
    margin-bottom: 15px;
    font-family: inherit;
}

.dozent-info {
    line-height: 1.6;
    color: #555;
    font-weight: 400;
    font-family: inherit;
}

.virtual-event-badge {
    display: inline-block;
    background: linear-gradient(135deg, #325ce8, #2647c7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 0.9em;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(50, 92, 232, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .events-carousel {
        padding: 20px 10px; /* Reduce side padding on mobile */
    }
    
    .carousel-arrow {
        display: none; /* Hide arrows on mobile, rely on touch */
    }
    
    .event-list-item {
        flex-direction: column;
    }
    
    .event-list-item-image {
        width: 100%;
        height: 200px;
        aspect-ratio: 3/2;
    }
    
    .single-event-content,
    .single-tribe_events .tribe-events-single {
        flex-direction: column;
        gap: 20px;
        padding: 0 10px;
    }
    
    .single-event-sidebar,
    .event-sidebar {
        position: static;
        background: #f9f9f9;
        border: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        border-radius: 15px;
    }
    
    .single-event-main {
        padding: 20px 0;
    }
    
    .single-event-title {
        font-size: 2em;
    }
    
    .single-event-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .single-event-block {
        padding-bottom: 80px; /* Less padding on mobile */
    }
}

@media (max-width: 480px) {
    .events-carousel {
        padding: 15px 5px; /* Even less padding on very small screens */
    }
    
    .event-card-content,
    .event-list-item-content {
        padding: 15px;
    }
    
    .event-sidebar,
    .single-event-sidebar {
        padding: 20px;
    }
    
    .single-event-title {
        font-size: 1.8em;
    }
}

/* Comprehensive Ticket System Styling - Compact Design */
.custom-tickets-form {
    margin: 30px 0;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(50, 92, 232, 0.08);
    border: 1px solid #e8edf7;
}

.custom-tickets-form h3 {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    color: #325ce8;
    font-weight: 600;
    border-bottom: 2px solid #325ce8;
    padding-bottom: 10px;
}

.tickets-list {
    margin-bottom: 20px;
}

.ticket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #f0f4f8;
    gap: 15px;
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-item.ticket-unavailable {
    opacity: 0.6;
    pointer-events: none;
}

.ticket-info {
    flex: 1;
    min-width: 0;
}

.ticket-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.ticket-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #325ce8;
    margin: 0;
}

.ticket-status {
    font-size: 0.85rem;
    color: #666;
    margin: 3px 0 0 0;
    font-style: italic;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border: 2px solid #325ce8;
    background: #ffffff;
    color: #325ce8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.quantity-controls button:hover:not(:disabled) {
    background: #325ce8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(50, 92, 232, 0.2);
}

.quantity-controls button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(50, 92, 232, 0.2);
}

.quantity-controls button:disabled,
.quantity-controls button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.quantity-controls button:disabled:hover,
.quantity-controls button.disabled:hover {
    background: #f8f9fa;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

.ticket-quantity {
    width: 50px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    background: #ffffff;
}

.ticket-quantity:focus {
    outline: none;
    border-color: #325ce8;
    box-shadow: 0 0 0 2px rgba(50, 92, 232, 0.1);
}

.cart-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafe;
    border-radius: 8px;
    border: 1px solid #e8edf7;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

#total-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #325ce8;
}

.ticket-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Jost', sans-serif;
}

.ticket-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ticket-submit-btn.has-items {
    background: #325ce8;
}

.ticket-submit-btn.has-items:hover {
    background: #2847c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(50, 92, 232, 0.2);
}

.ticket-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(50, 92, 232, 0.2);
}

/* Responsive Design for Tickets */
@media (max-width: 768px) {
    .custom-tickets-form {
        padding: 20px;
        margin: 20px 0;
    }
    
    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 0;
    }
    
    .quantity-controls {
        align-self: flex-end;
    }
    
    .cart-total {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}