/*
Theme Name: Telephone UK Theme
Description: A modern WordPress directory theme for Telephone Directory In United Kingdon
Version: 1.0
Author: Custom Theme
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: #555;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

[class*="col-"] {
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Header Styles */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-left: 2rem;
}

.main-navigation a {
    font-weight: 500;
    color: #2c3e50;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* Hero Section */
.hero-section {
    min-height: 800px;
    background: url('assets/hero-section.png') center/cover no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.25rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Search Section */
.search-section {
    background: #fff;
    padding: 4rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto 0;
}

.search-form select {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.3s ease;
}

.search-form select:focus {
    outline: none;
    border-color: #3498db;
}

.search-form select:disabled {
    background: #f8f9fa;
    color: #6c757d;
}

/* Card Styles */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.card-title a {
    color: inherit;
}

.card-title a:hover {
    color: #3498db;
}

.card-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-excerpt {
    color: #555;
    line-height: 1.6;
}

/* Rating Display */
.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.stars {
    color: #ffc107;
}

.rating-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Work Time Display */
.work-time {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.work-time h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.work-hours {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.work-day {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.work-day:last-child {
    border-bottom: none;
}

/* Contact Info */
.contact-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: #3498db;
}

/* Breadcrumbs */
.breadcrumbs {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #3498db;
}

.breadcrumb-item.current {
    color: #6c757d;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.browse-section {
    background: #f8f9fa;
}

.popular-section {
    background: #fff;
}

.articles-section {
    background: #f8f9fa;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.mobile-open {
        display: block;
    }
    
    .col-3, .col-4, .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .work-hours {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card-content {
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #2980b9;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(4) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.main-navigation.mobile-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.main-navigation.mobile-open ul {
    flex-direction: column;
    padding: 1rem 0;
}

.main-navigation.mobile-open li {
    margin: 0;
    text-align: center;
}

.main-navigation.mobile-open a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid #e1e8ed;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Animation Classes */
.card.animate-in {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Card Styles */
.card.hover-effect {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

/* Work Time Enhancements */
.work-time h4 {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.work-time h4::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 0;
    transition: transform 0.3s ease;
}

.work-time h4.expanded::after {
    transform: rotate(180deg);
}

.current-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.current-status.open {
    background: #d4edda;
    color: #155724;
}

.current-status.closed {
    background: #f8d7da;
    color: #721c24;
}

/* Topics List Styling */
.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-item {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #6c757d;
    border: 1px solid #e1e8ed;
}

/* Directory Specific Styles */
.directory-single .entry-header {
    margin-bottom: 2rem;
}

.directory-single .back-navigation {
    margin-bottom: 1rem;
}

.directory-single .entry-featured-image {
    margin-bottom: 2rem;
}

.directory-single .entry-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.directory-content,
.address-section,
.map-section,
.website-section,
.description-section,
.rating-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e1e8ed;
}

.related-posts h2 {
    margin-bottom: 2rem;
    text-align: center;
}

/* Taxonomy Navigation */
.taxonomy-navigation {
    margin-top: 2rem;
    text-align: center;
}

/* Search Form Enhancements */
.search-form.focused {
    transform: scale(1.02);
}

.search-form select:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.page-header .page-title {
    margin-bottom: 1rem;
}

.taxonomy-description {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Entry Meta Styles */
.entry-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.entry-meta span {
    margin-right: 1rem;
}

.entry-meta a {
    color: #6c757d;
}

.entry-meta a:hover {
    color: #3498db;
}

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e1e8ed;
    border-bottom: 1px solid #e1e8ed;
}

.nav-subtitle {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: 600;
    color: #2c3e50;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
    gap: 0.5rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border: 1px solid #e1e8ed;
    color: #3498db;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* Screen Reader Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
