:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    /* Remove default padding, handled by container */
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 20px;
    /* Top padding for fixed navbar */
}

header {
    text-align: center;
    margin-bottom: 20px;
    /* Hide the original header H1 since it's moved to navbar, or restyle it */
    display: none;
}

/* New Navbar Title Styles */
.navbar-title {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-dark);
    line-height: 1.2;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.navbar-title .title-sub {
    display: none;
    /* Hide subtitle in navbar if space is tight */
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
    line-height: 1.3;
}

.title-sub {
    display: block;
    /* Force new line */
    font-size: 1rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-top: 4px;
}

.highlight-char {
    color: #4d9a6f;
    /* Desaturated ~20% more */
    font-weight: 800;
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        padding-top: 70px;
        /* Slightly less padding on mobile */
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar-title {
        font-size: 0.95rem;
        /* Smaller title on mobile */
    }

    h1 {
        font-size: 1.4rem;
        letter-spacing: -1px;
        margin-left: -5px;
        margin-right: -5px;
    }

    .title-sub {
        font-size: 0.65rem;
    }
}

.controls {
    text-align: center;
    margin-bottom: 15px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: var(--shadow);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.primary-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.location-select {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 1px solid #dfe6e9;
    border-radius: 30px;
    /* margin-right: 15px; Removed to rely on flex gap */
    background-color: white;
    cursor: pointer;
    box-shadow: var(--shadow);
    color: var(--text-color);
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    /* Space for arrow */
}

.location-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.status-message {
    text-align: center;
    margin-bottom: 5px;
    font-weight: 600;
    min-height: 15px;
    font-size: 0.8rem;
}

.results-grid {
    display: grid;
    gap: 20px;
}

.date-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.date-header {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.court-list {
    display: grid;
    gap: 15px;
}

.court-item {
    background: #f1f2f6;
    padding: 15px;
    border-radius: 8px;
}

.court-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
}

.slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot {
    background: #fff;
    border: 1px solid #dfe6e9;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #2d3436;
}

.slot.available {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.slot.full {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    text-decoration: line-through;
    opacity: 0.6;
}

.loading {
    color: #7f8c8d;
    font-style: italic;
}

.red-text {
    color: #e74c3c !important;
}

.day-select {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.day-option {
    display: flex;
    align-items: center;
}

.day-checkbox {
    display: none;
}

.day-label {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #dfe6e9;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: #636e72;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.day-checkbox:checked+.day-label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(46, 204, 113, 0.2);
    font-weight: 600;
}

.action-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    /* Ensure it spans full width for flex children to size correctly */
}

@media (max-width: 480px) {
    .day-select {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 0 10px;
        /* Ensure safe zone */
    }

    .day-label {
        padding: 8px 0;
        /* Removing side padding, using width instead */
        font-size: 0.8rem;
        width: 36px;
        /* Fixed width for uniform small buttons */
        min-width: 0;
        text-align: center;
        justify-content: center;
    }

    .action-row {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .location-select {
        flex: 1;
        /* Take up remaining space */
        min-width: 0;
        /* Allow shrinking if needed */
        font-size: 0.95rem;
        padding-left: 15px;
        padding-right: 30px;
        /* Adjust for arrow */
    }

    .primary-btn {
        flex: 0 0 auto;
        /* Do not shrink */
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}


.location-address {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 20px;
    font-weight: 500;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.notice-block {
    background-color: #fff9db;
    border-left: 5px solid #f1c40f;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: var(--shadow);
    color: #856404;
    font-size: 0.95rem;
    text-align: left;
}

.notice-title {
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #705200;
    font-size: 1.05rem;
}


.court-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.map-link {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 12px;
    background-color: white;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
    vertical-align: middle;
}

.map-link:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
}

.court-image-container {
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.court-image {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid #eee;
    object-fit: cover;
}

.court-additional-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-color);
    background-color: #f1f2f6;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    white-space: pre-wrap;
    /* Preserve line breaks if any */
}

/* Blog Reviews Styles */
.reviews-section {
    margin-top: 30px;
}

.reviews-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.review-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    border: 1px solid #f1f2f6;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.review-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background-color: #eee;
}

.review-content {
    padding: 12px;
}

.review-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-reviews {
    color: #95a5a6;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.empty-state {
    text-align: center;
    color: #95a5a6;
    padding: 20px 20px;
    font-size: 1.1rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px dashed #ced6e0;
}

/* Site Introduction Footer */
.site-intro {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 40px;
    box-shadow: var(--shadow);
    color: var(--text-color);
}

.site-intro h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.site-intro h3:first-child {
    margin-top: 0;
}

.site-intro p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.site-intro .arrow {
    color: var(--primary-color);
    font-weight: bold;
    margin: 0 5px;
}

.facility-info-text {
    margin-top: 30px;
    padding: 20px;
    font-size: 0.85rem;
    color: #95a5a6;
    line-height: 1.5;
    background-color: #f1f2f6;
    border-radius: var(--border-radius);
}

.facility-info-text h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #7f8c8d;
}

.main-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #bdc3c7;
}

.main-footer a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.2s;
}

.main-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Tournament Schedule Styles */
.tournament-schedule {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.tournament-schedule h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.schedule-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.schedule-link {
    display: inline-block;
    padding: 12px 18px;
    background-color: #f1f2f6;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #dfe6e9;
}

.schedule-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(46, 204, 113, 0.2);
}

/* Tennis Tip Card */
.tennis-tip-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.tennis-tip-card:hover {
    transform: translateY(-2px);
}

.tip-header {
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.35;
}

.tip-content {
    font-size: 1rem;
    color: #555;
    line-height: 1.75;
    margin: 0;
    word-break: keep-all;
}

/* Hamburger Menu & Sidebar */
.navbar-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: 1001;
    margin-right: 15px;
    padding: 5px;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-dark);
    border-radius: 3px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    /* Hide by default */
    width: 280px;
    height: 100dvh;
    /* Use dynamic viewport height for mobile */
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 60px;
    padding-bottom: 150px;
    /* Add extra padding for scrolling */
}

.sidebar.active {
    left: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    z-index: 1003;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    border-bottom: 1px solid #f1f2f6;
}

.nav-links a,
.dropdown-header {
    display: block;
    padding: 15px 25px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

.nav-links a:hover,
.dropdown-header:hover {
    background-color: #f8f9fa;
    color: var(--primary-dark);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-content {
    display: none;
    background-color: #fcfcfc;
    list-style: none;
    padding: 0;
}

.dropdown.active .dropdown-content {
    display: block;
    max-height: 50vh;
    /* Limit height to 50% of viewport */
    overflow-y: auto;
    /* internal scroll */
    border-top: 1px solid #f1f2f6;
    border-bottom: 1px solid #f1f2f6;
}

/* Blog List Styles in Card */
.blog-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    border-top: 1px solid #f1f2f6;
    padding-top: 15px;
}

.blog-list li {
    margin-bottom: 10px;
}

.blog-list li:last-child {
    margin-bottom: 0;
}

.blog-list-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    font-size: 0.95rem;
    transition: color 0.2s;
    overflow: hidden;
}

.blog-list-item::before {
    content: "•";
    color: #9b59b6;
    margin-right: 8px;
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.blog-list-item:hover {
    color: #9b59b6;
    text-decoration: underline;
}

.blog-list-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}

.dropdown-content li a {
    padding: 12px 25px 12px 35px;
    /* Indent */
    font-size: 0.95rem;
    color: #555;
    border-bottom: 1px solid #f9f9f9;
    font-weight: 400;
}

.dropdown-content li a:hover {
    background-color: #e8f5e9;
    color: var(--primary-dark);
}

.arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.dropdown.active .arrow {
    transform: rotate(180deg);
}

/* Tip Page Specific */
.tip-page-container {
    padding-top: 60px;
    /* Space for fixed hamburger */
}

/* Tennis History Card */
.tennis-history-card {
    background: linear-gradient(135deg, #fdfbf7 0%, #fff 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #f39c12;
    /* Orange accent for history */
    transition: transform 0.3s ease;
}

.tennis-history-card:hover {
    transform: translateY(-2px);
}

.history-header {
    font-size: 0.85rem;
    color: #e67e22;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.35;
}

.history-content {
    font-size: 1rem;
    color: #555;
    line-height: 1.75;
    margin: 0;
    word-break: keep-all;
}

.more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 6px 16px;
    background-color: transparent;
    color: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid currentColor;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.more-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

/* KDK Generator Card */
.kdk-generator-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #2196f3;
    transition: transform 0.3s ease;
    text-align: left;
}

.kdk-generator-card:hover {
    transform: translateY(-2px);
}

.kdk-header {
    font-size: 0.85rem;
    color: #1976d2;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kdk-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.35;
}

.kdk-content {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.kdk-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: #2196f3;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.2);
}

.kdk-btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.3);
}