/*
Theme Name: Canada Lawyers Directory
Theme URI: https://example.com/canada-lawyers-directory
Author: Your Name
Author URI: https://example.com
Description: A specialized WordPress theme for Canadian lawyers directory with location and practice area search functionality
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: canada-lawyers-directory
Tags: directory, lawyers, canada, two-columns, custom-menu, featured-images
*/

/* ====================================
   CANADIAN COLOR SCHEME VARIABLES
   ==================================== */
:root {
    --canada-red: #DC143C;
    --canada-gold: #FFD700;
    --canada-blue: #0055A4;
    --text-dark: #333333;
    --text-light: #666666;
    --background-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

/* ====================================
   GLOBAL RESET & BASE STYLES
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================================
   HEADER STYLES
   ==================================== */
.site-header {
    background: linear-gradient(135deg, var(--canada-red), var(--canada-blue));
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 2em;
    font-weight: bold;
    margin: 0;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: var(--canada-gold);
}

/* ====================================
   SEARCH SECTION
   ==================================== */
.search-section {
    background: linear-gradient(135deg, var(--canada-red), var(--canada-blue));
    color: white;
    padding: 60px 0;
    text-align: center;
}

.search-section h3 {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.search-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    max-width: 900px;
    margin: 0 auto;
}

.search-filters select,
.search-filters .search-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
}

.search-filters select {
    background: white;
    color: var(--text-dark);
    cursor: pointer;
}

.search-filters select:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

.search-btn {
    background: var(--canada-gold);
    color: var(--text-dark);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    padding: 12px 30px;
}

.search-btn:hover {
    background: #FFE55C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ====================================
   LAWYER CARD STYLES
   ==================================== */
.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 40px 0;
}

@media (max-width: 1024px) {
    .lawyers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .lawyers-grid {
        grid-template-columns: 1fr;
    }
}

.lawyer-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lawyer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.lawyer-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.lawyer-card h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--canada-blue);
}

.lawyer-card h3 a {
    color: var(--canada-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.lawyer-card h3 a:hover {
    color: var(--canada-red);
}

.practice-areas {
    margin: 10px 0;
}

.practice-tag {
    display: inline-block;
    background: var(--canada-red);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    margin: 3px 3px 3px 0;
    font-weight: 500;
}

.address-container {
    margin: 10px 0;
}

.category-info,
.location-info,
.address,
.rating,
.languages,
.phone-number,
.website-link {
    margin: 8px 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-info i,
.location-info i,
.address i,
.rating i,
.languages i,
.phone-number i,
.website-link i {
    color: var(--canada-red);
    min-width: 20px;
}

.directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #34a853;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
    align-self: flex-start;
}

.directions-btn:hover {
    background: #2d8e47;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.directions-btn i {
    font-size: 1em;
}

.directions-btn-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--canada-red);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
}

.directions-btn-meta:hover {
    background: #B00020;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.directions-btn-meta i {
    font-size: 1em;
}

.rating-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
}

.rating {
    color: var(--canada-gold);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating .votes {
    color: var(--text-light);
    font-weight: normal;
    font-size: 0.9em;
}

.google-reviews-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
    align-self: flex-start;
}

.google-reviews-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.google-reviews-btn i {
    font-size: 1em;
}

/* Card Action Buttons Row */
.card-action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    justify-content: center;
    min-width: fit-content;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-btn i {
    font-size: 1em;
}

.action-btn-green {
    background: #34a853;
}

.action-btn-green:hover {
    background: #2d8e47;
}

.action-btn-blue {
    background: #4285f4;
}

.action-btn-blue:hover {
    background: #3367d6;
}

.action-btn-red {
    background: var(--canada-red);
}

.action-btn-red:hover {
    background: #B00020;
}

/* ====================================
   BROWSE BY PROVINCE SECTION
   ==================================== */
.browse-section {
    background: var(--background-light);
    padding: 60px 0;
}

.browse-section h2,
.browse-by-province h3 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 40px;
    color: var(--canada-blue);
}

.provinces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.province-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
}

.province-card:hover {
    border-color: var(--canada-red);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.province-card h4 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.province-card h4 a {
    color: var(--canada-blue);
    text-decoration: none;
    transition: color 0.3s;
}

.province-card h4 a:hover {
    color: var(--canada-red);
}

.province-card .count {
    color: var(--text-light);
    font-size: 1.1em;
}

/* ====================================
   SINGLE LAWYER PAGE
   ==================================== */
.lawyer-single {
    padding: 40px 0;
}

.lawyer-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.lawyer-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-light);
}

.lawyer-info h1 {
    color: var(--canada-blue);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.lawyer-meta {
    display: grid;
    gap: 15px;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.meta-item i {
    color: var(--canada-red);
    margin-top: 3px;
    min-width: 20px;
}

.meta-item strong {
    min-width: 120px;
}

/* ====================================
   PRACTICE AREA ARCHIVE
   ==================================== */
.practice-area-header {
    background: linear-gradient(135deg, var(--canada-blue), var(--canada-red));
    color: white;
    padding: 60px 0;
    text-align: center;
}

.practice-area-header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
}

.practice-area-header p {
    font-size: 1.2em;
}

/* ====================================
   FOOTER
   ==================================== */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--canada-gold);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #999;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
    }

    .site-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .main-navigation ul {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }


    .lawyer-header {
        grid-template-columns: 1fr;
    }

    .search-section h3 {
        font-size: 1.8em;
    }

    .provinces-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5em;
    }

    .practice-area-header h1 {
        font-size: 2em;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--canada-red);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 1em;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-red {
    background: var(--canada-red);
}

.btn-red:hover {
    background: #B00020;
}

.btn-green {
    background: #34a853;
}

.btn-green:hover {
    background: #2d8e47;
}

.btn-blue {
    background: #4285f4;
}

.btn-blue:hover {
    background: #3367d6;
}

/* ====================================
   LAWYER BUSINESS CARD COMPONENT
   ==================================== */
.lawyer-business-card {
    background: white;
    border: 2px solid var(--canada-red);
    border-radius: 12px;
    padding: 25px;
    max-width: 400px;
    box-shadow: 0 4px 8px var(--shadow-light);
    font-size: 0.9em;
}

@media print {
    .lawyer-business-card {
        page-break-inside: avoid;
        box-shadow: none;
    }
}

.business-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--canada-gold);
}

.card-logo {
    flex-shrink: 0;
}

.card-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.card-logo i {
    font-size: 40px;
    color: var(--canada-red);
}

.card-title h3 {
    font-size: 1.3em;
    margin: 0 0 5px 0;
    color: var(--canada-blue);
}

.card-title .credentials {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-light);
    font-style: italic;
}

.business-card-body {
    margin-bottom: 15px;
}

.card-section {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.card-section i {
    color: var(--canada-red);
    font-size: 1.1em;
    margin-top: 3px;
    min-width: 20px;
}

.card-content {
    flex: 1;
}

.card-content strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.card-content p {
    margin: 0 0 5px 0;
    color: var(--text-light);
    line-height: 1.5;
}

.business-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.card-tagline {
    text-align: center;
    font-size: 0.85em;
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

/* ====================================
   LAWYER PROFILE BADGE COMPONENT
   ==================================== */
.lawyer-profile-badge {
    background: linear-gradient(135deg, white, var(--background-light));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    max-width: 280px;
    box-shadow: 0 4px 12px var(--shadow-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.lawyer-profile-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--canada-red), var(--canada-blue));
}

.badge-header {
    position: relative;
    margin-bottom: 15px;
}

.badge-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--canada-red);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.badge-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder i {
    font-size: 50px;
    color: var(--canada-red);
}

.badge-verified {
    position: absolute;
    bottom: 5px;
    right: calc(50% - 60px);
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.badge-verified i {
    color: #34a853;
    font-size: 18px;
}

.badge-body {
    margin-bottom: 15px;
}

.badge-name {
    font-size: 1.2em;
    margin: 0 0 8px 0;
    color: var(--canada-blue);
}

.badge-credential,
.badge-category,
.badge-specialty,
.badge-location,
.badge-experience {
    font-size: 0.85em;
    color: var(--text-light);
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.badge-credential i,
.badge-category i,
.badge-specialty i,
.badge-location i,
.badge-experience i {
    color: var(--canada-red);
    font-size: 0.9em;
}

.badge-more {
    background: var(--canada-gold);
    color: var(--text-dark);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: bold;
}

.badge-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.badge-rating i {
    color: var(--canada-gold);
    font-size: 1.1em;
}

.badge-rating strong {
    color: var(--text-dark);
    font-size: 1.1em;
}

.badge-rating span {
    color: var(--text-light);
    font-size: 0.9em;
}

.badge-footer {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--canada-red);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.badge-btn:hover {
    background: #B00020;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.badge-btn i {
    font-size: 0.9em;
}

/* Responsive adjustments for components */
@media (max-width: 480px) {
    .lawyer-business-card,
    .lawyer-profile-badge {
        max-width: 100%;
    }
}

/* ====================================
   PAGINATION STYLES
   ==================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0 40px;
    padding: 10px 0;
    clear: both;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    color: var(--canada-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination .page-numbers:hover {
    background: var(--canada-blue);
    color: white;
    border-color: var(--canada-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination .page-numbers.current {
    background: var(--canada-red);
    color: white;
    border-color: var(--canada-red);
    cursor: default;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Prev/Next buttons in pagination */
.pagination .prev,
.pagination .next {
    font-weight: 600;
}

/* Ensure pagination appears at bottom */
.site-main {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.lawyers-content,
.archive-content {
    flex: 1;
}

/* ====================================
   SINGLE POST STYLES
   ==================================== */
.single .site-main {
    padding: 40px 0;
}

.single .entry-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--canada-red);
    padding-bottom: 15px;
}

.single .entry-title {
    color: var(--canada-blue);
    font-size: 2.5em;
    font-weight: bold;
}

.single .entry-meta {
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: 10px;
}

.single .post-thumbnail img {
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--shadow-light);
    max-width: 100%;
    height: auto;
}

.single .entry-content {
    line-height: 1.7;
    font-size: 1.1em;
}

.single .entry-content p,
.single .entry-content ul,
.single .entry-content ol {
    margin-bottom: 1.5em;
}

.single .entry-content h2,
.single .entry-content h3 {
    color: var(--canada-blue);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.single .entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-light);
}

.single .cat-links,
.single .tags-links {
    display: block;
    margin-bottom: 10px;
}

.single .cat-links a,
.single .tags-links a {
    color: var(--canada-red);
    text-decoration: none;
}

.single .cat-links a:hover,
.single .tags-links a:hover {
    text-decoration: underline;
}

/* Pagination responsiveness */
@media (max-width: 768px) {
    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

body.single {
    background-color: #fff;
}
