/* Reset & Basic Styles to prevent conflicts if embedded */
.nte-widget-container {
    font-family: 'Lato', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    background-color: #f9f9f9;
}

.nte-widget-container * {
    box-sizing: border-box;
}

/* Header Styling */
.nte-header {
    text-align: center;
    margin-bottom: 30px;
}

.nte-header h1 {
    font-family: 'Playfair Display', serif;
    color: #003366; /* Nantucket Navy Blue */
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.nte-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Menu Button */
.nte-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #003366;
    line-height: 1;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    z-index: 1010;
}

.nte-menu-btn:hover {
    background-color: rgba(0, 51, 102, 0.1);
}

/* Sidebar Styling */
.nte-sidebar {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen (using % for safety) */
    width: 85%;   /* Responsive width */
    max-width: 300px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.nte-sidebar.open {
    right: 0;
}

.nte-sidebar-header {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #eee;
}

.nte-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.nte-close-btn:hover {
    color: #333;
}

.nte-sidebar-content {
    padding: 20px;
    overflow-y: auto;
}

.nte-sidebar-section {
    margin-bottom: 30px;
}

.nte-sidebar-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #003366;
    margin-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
    padding-bottom: 5px;
}

.nte-sidebar-section p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

/* Sources List in Sidebar */
.nte-sources-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.nte-sources-list li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.nte-sources-list li::before {
    content: "\2022";
    color: #003366;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.nte-sources-list a {
    color: #003366;
    text-decoration: none;
    font-weight: 500;
}

.nte-sources-list a:hover {
    text-decoration: underline;
}

/* Overlay */
.nte-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.nte-overlay.show {
    display: block;
    opacity: 1;
}

/* Filters */
.nte-filters-container {
    color: #666;
    font-size: 1.1rem;
}

/* Language Switch */
.nte-lang-switch {
    display: flex;
    justify-content: center;
    gap: 15px; /* Increased gap */
    margin-bottom: 15px; /* Increased margin */
}

.nte-lang-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.nte-lang-btn.active, .nte-lang-btn:hover {
    opacity: 1;
    border-color: #003366;
    background-color: #f0f4f8;
}

/* Sources Modal & Link */

.nte-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
}

.nte-filter-btn.active, .nte-filter-btn:hover {
    background-color: #003366;
    border-color: #003366;
    color: white;
}

.nte-filter-btn.popular {
    background-color: #fff8e1; /* Light yellow background */
    border-color: #ffc107;
    color: #bfa00d;
    font-weight: bold;
}

.nte-filter-btn.popular.active {
    background-color: #ffc107;
    color: #333;
}

/* Grid Layout - Mobile First (1 column default) */
.nte-events-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

/* Tablet (2 columns) */
@media (min-width: 600px) {
    .nte-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (3 columns) */
@media (min-width: 900px) {
    .nte-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Event Card Styling */
.nte-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.nte-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}

.nte-card-image {
    height: 200px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.nte-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nte-date {
    background-color: #cc0000; /* Nantucket Red-ish */
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.nte-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: #222;
}

.nte-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.nte-location {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.nte-location::before {
    content: '\1F4CD';
    margin-right: 5px;
}

.nte-btn {
    display: block;
    text-align: center;
    background-color: #003366;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.nte-btn:hover {
    background-color: #004080;
}

.nte-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}

.nte-footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
