/* Additional styles for Notary Portal Theme */

/* ヘッダー固定時のbody調整 */
body {
    padding-top: 70px;
}

body.admin-bar {
    padding-top: 102px;
}

@media screen and (max-width: 782px) {
    body.admin-bar {
        padding-top: 116px;
    }
}

/* Search Section */
.office-search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.office-search-section h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.search-filters {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
}

/* Office Cards Enhanced */
.office-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.office-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.office-card:hover::before {
    transform: translateX(0);
}

.office-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.office-rating {
    display: flex;
    color: #ffd700;
    font-size: 0.9rem;
}

/* Loading States */
.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pagination Enhanced */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.office-table {
    width: 100%;
    border-collapse: collapse;
}

.office-table th,
.office-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.office-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.office-table tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #d4f4dd;
    color: #1b5e3f;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Column Table of Contents */
.article-toc {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.article-toc .toc-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.article-toc .toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-toc .toc-list li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.article-toc .toc-item-h2 {
    padding-left: 0;
}

.article-toc .toc-item-h3 {
    padding-left: 1.5rem;
}

.article-toc .toc-list a {
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 1rem;
}

.article-toc .toc-list a::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #667eea;
    transition: transform 0.3s ease;
}

.article-toc .toc-list a:hover {
    color: #667eea;
    transform: translateX(5px);
}

.article-toc .toc-list a:hover::before {
    transform: translateX(3px);
}

/* Heading anchor offset for smooth scroll */
.article-content h2[id],
.article-content h3[id] {
    scroll-margin-top: 120px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .office-search-section h2 {
        font-size: 1.75rem;
    }

    .search-filters {
        padding: 1rem;
    }

    .office-table {
        font-size: 0.9rem;
    }

    .office-table th,
    .office-table td {
        padding: 0.5rem;
    }

    /* Column TOC mobile styles */
    .article-toc {
        padding: 1rem 1.5rem;
    }

    .article-toc .toc-title {
        font-size: 1.1rem;
    }

    .article-toc .toc-item-h3 {
        padding-left: 1rem;
    }

    .article-toc .toc-list a {
        font-size: 0.95rem;
    }

    .article-content h2[id],
    .article-content h3[id] {
        scroll-margin-top: 100px;
    }
}