/* Google-style CSS for Golf Range Finder */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #202124;
    background-color: #fff;
    line-height: 1.58;
}

/* Typography */
h1 {
    font-size: 22px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
}

h2 {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
}

h3 {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #dadce0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

.header-content {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-size: 22px;
    color: #202124;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #34a853;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 52px;
    border: 1px solid #dadce0;
    border-radius: 24px;
    font-size: 16px;
    transition: box-shadow 0.2s;
    background: #f8f9fa;
}

.search-input:hover {
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    background: #fff;
    border-color: rgba(223,225,229,0);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    background: #fff;
    border-color: rgba(223,225,229,0);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #5f6368;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 24px;
    border: none;
    background: #4285f4;
    color: white;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-button:hover {
    background: #1a73e8;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.filter-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dadce0;
    margin-bottom: 16px;
    overflow: hidden;
}

.filter-header {
    padding: 16px;
    border-bottom: 1px solid #dadce0;
    font-weight: 500;
    color: #202124;
}

.filter-content {
    padding: 16px;
}

.filter-item {
    margin-bottom: 16px;
}

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

.filter-label {
    display: block;
    margin-bottom: 8px;
    color: #5f6368;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    color: #202124;
    background: #fff;
    transition: border-color 0.2s;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #5f6368;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #4285f4;
}

/* Content Area */
.content {
    flex: 1;
    min-width: 0;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.results-count {
    color: #5f6368;
    font-size: 14px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select {
    height: 32px;
    padding: 0 32px 0 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    color: #202124;
    background: #fff url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3E%3Cpath fill="%235f6368" d="M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z"/%3E%3C/svg%3E') no-repeat right 8px center;
    appearance: none;
    cursor: pointer;
}

/* Card Styles */
.facility-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.facility-card:hover {
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
}

.facility-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.facility-title {
    font-size: 18px;
    color: #1a0dab;
    text-decoration: none;
    line-height: 1.3;
}

.facility-title:hover {
    text-decoration: underline;
}

.facility-location {
    color: #5f6368;
    font-size: 14px;
    margin-top: 4px;
}

.facility-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 12px;
    background: #e8f0fe;
    color: #1967d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.facility-info {
    display: flex;
    gap: 16px;
    color: #5f6368;
    font-size: 14px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Buttons */
.btn-primary {
    height: 36px;
    padding: 0 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    background: #1765cc;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

.btn-secondary {
    height: 36px;
    padding: 0 24px;
    background: #fff;
    color: #1a73e8;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #d2d2d2;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding: 16px 0;
}

.page-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #202124;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #f8f9fa;
}

.page-btn:disabled {
    color: #dadce0;
    cursor: default;
}

.page-btn.active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

.page-info {
    margin: 0 16px;
    color: #5f6368;
    font-size: 14px;
}

/* Detail Page Styles */
.detail-header {
    background: #fff;
    border-bottom: 1px solid #dadce0;
    padding: 24px 0;
    margin-bottom: 24px;
}

.detail-title {
    font-size: 28px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
}

.detail-subtitle {
    color: #5f6368;
    font-size: 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.detail-main {
    min-width: 0;
}

.detail-section {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    font-size: 20px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8eaed;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-block {
    border-left: 3px solid #4285f4;
    padding-left: 16px;
}

.info-label {
    color: #5f6368;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.info-value {
    color: #202124;
    font-size: 16px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.feature-card {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px 16px;
    text-align: center;
    color: #202124;
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* Pricing Table */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
}

.pricing-table th {
    background: #f8f9fa;
    color: #5f6368;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8eaed;
}

.pricing-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaed;
    color: #202124;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

/* Contact Card */
.contact-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 88px;
}

.contact-title {
    font-size: 16px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 16px;
}

.contact-info {
    margin-bottom: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #202124;
}

.contact-icon {
    color: #5f6368;
    width: 20px;
}

.btn-call {
    width: 100%;
    height: 40px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-call:hover {
    background: #2d9048;
}

/* Map Container */
.map-section {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.map-container {
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 16px;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #5f6368;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-container {
    background: #fce8e6;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.error-message {
    color: #d93025;
    font-size: 16px;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .detail-layout {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .search-bar {
        display: none;
    }
    
    .mobile-search-btn {
        display: block;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        cursor: pointer;
        margin-left: auto;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Mobile-specific styles */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 200;
    padding: 16px;
}

.mobile-search-overlay.active {
    display: block;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.mobile-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Card */
.stats-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}