* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0a5dab;
}

.search-bar form {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 250px;
    font-size: 0.9rem;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

nav a:hover {
    color: #0a5dab;
}

.hero {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 5s ease-in-out;
}

.slideshow .slide.active {
    opacity: 1;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.btn-container {
    text-align: center;
    padding: 20px 0;
}

.btn {
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 1rem;
    margin: 0 10px;
}

.explore {
    background-color: #0a5dab;
    color: #fff;
}

.create {
    background-color: #333;
    color: #fff;
}

.learn-more {
    background-color: transparent;
    color: #333;
    border: 1px solid #333;
}

.search-filters {
    background-color: #fff;
    padding: 20px;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-filters form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-filters input, .search-filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    flex: 1;
    min-width: 150px;
}

.search-btn {
    background-color: #0a5dab;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #d81b60;
}

.categories {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.categories h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.categories p {
    color: #666;
    margin-bottom: 20px;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category {
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.category:hover {
    background-color: #f0f0f0;
}

.category.active {
    background-color: #0a5dab;
    color: #fff;
}

.events-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.tab.active, .tab:hover {
    background-color: #0a5dab;
    color: #fff;
    border-color: #0a5dab;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter {
    padding: 5px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.filter.active, .filter:hover {
    background-color: #0a5dab;
    color: #fff;
    border-color: #0a5dab;
}

.event-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.event {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    width: 48%;
    transition: transform 0.2s;
}

.event:hover {
    transform: translateY(-5px);
}

.event img {
    width: 120%;
    height: 280px;
    object-fit: cover;
    display: block;
    margin: 80px auto 8px auto; /* centers the image horizontally and adds spacing */
    border-radius: 10px;
}

.event .info {
    padding: 60px;
    width: 60%;
}

.event .category {
    display: inline-block;
    background-color: #0a5dab;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-bottom: 2px; /* reduced */
}

.event h3 {
    font-size: 1.1rem; /* slightly reduced */
    margin-bottom: 2px; /* reduced */
}

.event h3 a {
    color: #333;
    text-decoration: none;
}

.event h3 a:hover {
    color: #0a5dab;
}

.event .date, .event .location, .event .school {
    display: block;
    color: #666;
    font-size: 0.85rem; /* slightly reduced */
    margin-bottom: 2px; /* reduced */
}

.event .price {
    font-weight: bold;
    color: #0a5dab;
    margin-top: 2px; /* reduced */
}

.load-more {
    text-align: center;
    padding: 20px 0;
}

.host-section {
    text-align: center;
    background-color: #0a5dab;
    color: #fff;
    padding: 60px 20px;
    border-radius: 10px;
}

.host-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.host-section p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.host-section .create {
    background-color: #fff;
    color: #0a5dab;
}

.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px;
    margin-top: 40px;
}

.footer .section {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.footer p {
    color: #ccc;
    font-size: 0.9rem;
}

.footer a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.footer a:hover {
    color: #0a5dab;
}

.social-icons a {
    display: inline-block;
    margin-right: 10px;
}

.footer input {
    padding: 8px;
    border: none;
    border-radius: 20px 0 0 20px;
    width: 70%;
}

.footer .subscribe-btn {
    padding: 8px 15px;
    background-color: #0a5dab;
    color: #fff;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

.footer .bottom {
    max-width: 1200px;
    margin: 20px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.footer .bottom a {
    display: inline-block;
    margin-left: 10px;
}

/* Form Styling for All Templates */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

form input, form textarea, form select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1rem;
}

form textarea {
    height: 100px;
    resize: vertical;
}

.sign-in {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #0a5dab;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
}

.sign-in:hover {
    background-color: #d81b60;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 10px 15px;
    }

    .header .logo {
        margin-bottom: 10px;
    }

    .search-bar {
        width: 100%;
        margin-bottom: 10px;
    }

    .search-bar input {
        width: 100%;
        font-size: 0.9rem;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav a {
        margin: 5px 10px;
        font-size: 0.8rem;
    }

    .hero {
        height: 50vh;
    }

    .overlay-text {
        font-size: 2rem;
    }

    .btn-container {
        padding: 15px 0;
    }

    .btn {
        display: block;
        width: 80%;
        margin: 10px auto;
        font-size: 0.9rem;
    }

    .search-filters form {
        flex-direction: column;
        gap: 10px;
    }

    .search-filters input, .search-filters select {
        width: 100%;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 100%;
        font-size: 0.9rem;
    }

    .categories {
        padding: 20px 10px;
    }

    .categories h2 {
        font-size: 1.5rem;
    }

    .categories p {
        font-size: 0.9rem;
    }

    .category-list {
        gap: 10px;
    }

    .category {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .events-section {
        padding: 20px 10px;
    }

    .tabs {
        gap: 5px;
        justify-content: center;
    }

    .tab {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .filters {
        gap: 5px;
        justify-content: center;
    }

    .filter {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .event-row {
        flex-direction: column;
        gap: 10px;
    }

    .event {
        width: 100%;
        flex-direction: column;
    }

    .event img {
        width: 100%;
        height: 200px;
    }

    .event .info {
        width: 100%;
        padding: 10px;
    }

    .event h3 {
        font-size: 1rem;
    }

    .event .date, .event .location, .event .school {
        font-size: 0.8rem;
    }

    .event .price {
        font-size: 0.9rem;
    }

    .event .info .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
        margin: 5px 5px 0 0;
    }

    .host-section {
        padding: 40px 10px;
    }

    .host-section h1 {
        font-size: 1.8rem;
    }

    .host-section p {
        font-size: 1rem;
    }

    .footer .section {
        flex-direction: column;
        text-align: center;
    }

    .footer .section > div {
        width: 100%;
        margin-bottom: 20px;
    }

    .footer .bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer input {
        width: 60%;
    }

    /* Form Adjustments for Mobile */
    .form-container {
        margin: 20px auto;
    }

    form input, form textarea, form select {
        font-size: 0.9rem;
        padding: 8px;
    }

    .sign-in {
        font-size: 0.9rem;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .overlay-text {
        font-size: 1.5rem;
    }

    .btn {
        width: 90%;
        font-size: 0.8rem;
    }

    .search-filters input, .search-filters select {
        font-size: 0.8rem;
    }

    .search-btn {
        font-size: 0.8rem;
    }

    .categories h2 {
        font-size: 1.2rem;
    }

    .categories p {
        font-size: 0.8rem;
    }

    .category {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .tab {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .filter {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .event img {
        height: 150px;
    }

    .event h3 {
        font-size: 0.9rem;
    }

    .event .date, .event .location, .event .school {
        font-size: 0.7rem;
    }

    .event .price {
        font-size: 0.8rem;
    }

    .host-section h1 {
        font-size: 1.5rem;
    }

    .host-section p {
        font-size: 0.9rem;
    }

    .footer h3 {
        font-size: 1rem;
    }

    .footer p, .footer a {
        font-size: 0.8rem;
    }

    .footer input {
        width: 50%;
    }

    /* Form Adjustments for Smaller Phones */
    form input, form textarea, form select {
        font-size: 0.8rem;
        padding: 6px;
    }

    .sign-in {
        font-size: 0.8rem;
        padding: 6px;
    }
}

/* --- Featured & Trending Events --- */
.featured-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.featured-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0a5dab;
}
.featured-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.featured-event {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    width: 350px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.featured-event img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.featured-event > div {
    padding: 15px;
    width: 100%;
}
.featured-event h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}
.featured-event span {
    display: block;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 3px;
}
.featured-event .btn {
    margin-top: 10px;
    width: 100%;
}

/* --- Recommendations --- */
.recommend-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.recommend-section h2 {
    color: #0a5dab;
    font-size: 1.7rem;
    margin-bottom: 20px;
}
.recommend-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.recommend-event {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    width: 320px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.recommend-event img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.recommend-event > div {
    padding: 12px;
    width: 100%;
}
.recommend-event h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

/* --- Countdown Timer --- */
.countdown {
    font-size: 1rem;
    color: #0a5dab;
    font-weight: bold;
    margin: 8px 0;
}

/* --- Social Sharing --- */
.social-share {
    margin: 8px 0;
}
.social-share a {
    display: inline-block;
    margin-right: 10px;
    color: #0a5dab;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}
.social-share a:hover {
    color: #0a5dab;
}

/* --- Save/Favorite Button --- */
.inline-form .btn {
    background: #fff;
    color: #0a5dab;
    border: 1px solid #0a5dab;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    margin-top: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.inline-form .btn:hover {
    background: #0a5dab;
    color: #fff;
}

/* --- Newsletter Signup --- */
.newsletter-signup {
    max-width: 500px;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 30px 20px;
    text-align: center;
}
.newsletter-signup h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #0a5dab;
}
.newsletter-signup form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 10px;
}
.newsletter-signup input[type="email"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px 0 0 20px;
    font-size: 1rem;
    width: 70%;
    outline: none;
}
.newsletter-signup button {
    padding: 10px 20px;
    border-radius: 0 20px 20px 0;
    border: none;
    background: #0a5dab;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.newsletter-signup button:hover {
    background: #d81b60;
}

/* --- Responsive for new sections --- */
@media (max-width: 900px) {
    .featured-list, .recommend-list {
        flex-direction: column;
        align-items: center;
    }
    .featured-event, .recommend-event {
        width: 95%;
    }
}
.button-group {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }
        .button-group .btn {
            flex: 1;
            text-align: center;
        }
        /* Dark mode styles */
        body.dark-mode {
            background: #181a1b;
            color: #f1f1f1;
        }
        body.dark-mode .header,
        body.dark-mode .footer,
        body.dark-mode .events-section,
        body.dark-mode .categories,
        body.dark-mode .host-section,
        body.dark-mode .search-filters,
        body.dark-mode .tab-content,
        body.dark-mode .featured-section,
        body.dark-mode .policy-popup-content {
            background: #23272a !important;
            color: #f1f1f1 !important;
        }
        body.dark-mode input,
        body.dark-mode select,
        body.dark-mode textarea {
            background: #222;
            color: #f1f1f1;
            border-color: #444;
        }
        body.dark-mode .btn,
        body.dark-mode button {
            background: #333;
            color: #f1f1f1;
            border: 1px solid #444;
        }
        body.dark-mode a {
            color: #4ea1ff;
        }
        body.dark-mode .category.active,
        body.dark-mode .filter.active,
        body.dark-mode .tab.active {
            background: #444;
            color: #fff;
        }
        body.dark-mode .event,
        body.dark-mode .featured-event,
        body.dark-mode .saved-event {
            background: #23272a;
            color: #f1f1f1;
        }
        body.dark-mode .flash-message {
            background: #333;
            color: #ffecb3;
        }
/* ...existing code... */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    border-radius: 50%;
    background: #f4f4f4;
    color: #0a5dab;
    font-size: 2.6rem; /* Make icon larger inside the circle */
    border: none;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    vertical-align: middle;
    overflow: hidden;
}
.icon-btn i {
    font-size: 2em; /* Use parent's font-size for best fit */
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.icon-btn:hover {
    background: #0a5dab;
    color: #fff;
}
body.dark-mode .icon-btn {
    background: #232526;
    color: #e0e0e0;
}
body.dark-mode .icon-btn:hover {
    background: #0a5dab;
    color: #fff;
}
/* ...existing code... */


/* ...existing code... */
.footer .bottom a {
    color: #fff;
    margin-right: 20px;
    text-decoration: none;
    transition: color 0.2s;
}
.footer .bottom a.active-policy,
.footer .bottom a:hover {
    color: #0a5dab;
    font-weight: bold;
}

/* Popup styles */
/* ...existing code... */
.policy-popup {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    background: #232323;
    color: #fff;
    padding: 24px 32px;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    z-index: 9999;
    max-width: 90vw;
    font-size: 1rem;
}
.policy-popup-content a {
    color: #0a5dab;
    text-decoration: underline;
}
.policy-popup .btn {
    margin: 10px 8px 0 0;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.policy-popup .btn.accept {
    background: #0a5dab;
    color: #fff;
}
.policy-popup .btn.decline {
    background: #444;
    color: #fff;
}

.places-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 12px;
}
.places-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.places-toolbar input[type="text"],
.places-toolbar select {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.95em;
}
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.place-card {
  background: var(--card-bg, #fff);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.place-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.place-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f3f4f6;
}
.place-body {
  padding: 12px 14px 14px 14px;
}
.place-type {
  font-size: 12px;
  font-weight: 600;
  color: #0a5dab;
  background: #e6f0fa;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
}
.place-name {
  font-size: 1.05rem;
  margin: 4px 0 6px 0;
  font-weight: 700;
}
.place-location {
  color: #6b7280;
  font-size: 0.9rem;
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.stars {
  color: #f59e0b;
  letter-spacing: 1px;
}
.stars .star {
  font-size: 18px;
  cursor: pointer;
}
.stars.readonly .star {
  cursor: default;
}
.rating-count {
  font-size: 0.85rem;
  color: #6b7280;
}

.place-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}
.place-hero {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.gallery img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.place-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.form-group label {
  font-weight: 600;
}
.form-group input[type="text"],
.form-group textarea,
.form-group select {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.95em;
}
/* ...existing code... */