/**
 * Corr Brothers - Additional Component Styles
 */

/* ============================================
   TIMELINE (About Page)
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -33px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
}

.timeline-content {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-year {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.timeline-content p { color: var(--gray-600); margin: 0; }

/* ============================================
   FEATURE CARDS
   ============================================ */
.features-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--primary);
}

.feature-card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--gray-600); margin: 0; }

/* ============================================
   TEAM GRID
   ============================================ */
.team-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .team-grid { grid-template-columns: repeat(4, 1fr); }
}

.team-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
}

.team-photo {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-200);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
}

.team-info { padding: 1rem; }
.team-name { font-size: 1.125rem; margin-bottom: 0.25rem; }

.team-role {
    display: block;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-phone { display: block; color: var(--gray-600); font-size: 0.875rem; }
.team-phone:hover { color: var(--accent); }

/* ============================================
   CERTIFICATIONS
   ============================================ */
.certifications-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .certifications-grid { grid-template-columns: repeat(4, 1fr); }
}

.certification-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.certification-icon { margin-bottom: 1rem; }
.certification-item h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.certification-item p { color: var(--gray-600); font-size: 0.875rem; margin: 0; }

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 992px) {
    .about-grid { grid-template-columns: 1fr 1fr; }
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-highlights {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

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

.highlight-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.highlight-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-content { max-width: 700px; margin: 0 auto; }
.cta-content h2 { color: var(--white); }
.cta-content p { color: rgba(255,255,255,0.85); }

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================
   LOCATION PAGES
   ============================================ */
.location-services { display: grid; gap: 1rem; }

@media (min-width: 768px) {
    .location-services { grid-template-columns: repeat(2, 1fr); }
}

.location-service-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.location-service-icon {
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-service-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.location-service-info h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.location-service-info p { font-size: 0.875rem; color: var(--gray-600); margin: 0; }

/* ============================================
   SERVICE ARCHIVE
   ============================================ */
.services-archive-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 576px) {
    .services-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .services-archive-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-archive-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.service-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-archive-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.service-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-archive-content { padding: 1.25rem; }
.service-archive-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.service-archive-title a { color: var(--primary); }
.service-archive-title a:hover { color: var(--accent); }
.service-archive-excerpt { color: var(--gray-600); margin-bottom: 1rem; }

.service-archive-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-price { font-weight: 600; color: var(--primary); }

/* ============================================
   POST SINGLE
   ============================================ */
.post-layout { display: grid; gap: 2.5rem; }

@media (min-width: 992px) {
    .post-layout { grid-template-columns: 1fr 300px; }
}

.post-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.post-featured-image {
    margin: -2rem -2rem 1.5rem;
}

.post-featured-image img {
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.post-tags a { color: var(--gray-600); }
.post-tags a:hover { color: var(--accent); }

.post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-share a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-600);
    transition: all 0.2s;
}

.post-share a:hover {
    background: var(--primary);
    color: var(--white);
}

.post-share svg { width: 18px; height: 18px; fill: currentColor; }

/* Post Navigation */
.post-navigation { background: var(--gray-100); padding: 1.5rem 0; }

.post-nav-links { display: grid; gap: 1rem; }

@media (min-width: 768px) {
    .post-nav-links { grid-template-columns: repeat(2, 1fr); }
}

.post-nav-link {
    display: block;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-nav-link:hover { box-shadow: var(--shadow-lg); }

.nav-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.nav-title { font-weight: 600; color: var(--primary); }
.post-nav-next { text-align: right; }

/* ============================================
   LOADING STATES
   ============================================ */
.cb-btn.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cb-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   POSTS GRID (Blog/Archive)
   ============================================ */
.posts-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 576px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.25rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.post-category {
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    font-weight: 500;
}

.post-card-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--gray-900);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CB Button Styles (for index.php) */
.cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.cb-btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.cb-btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.cb-btn--outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* CB Container and Section */
.cb-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.cb-section {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .cb-section {
        padding: 5rem 0;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}

.no-results h2 {
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Pagination */
.pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ============================================
   RESPONSIVE HELPERS
   ============================================ */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
}
