/*
Theme Name: Telephone Directory UK
Description: A modern, responsive WordPress directory theme for telephone companies in the United Kingdom. Features custom post types, taxonomies, and advanced search functionality.
Version: 1.0
Author: Directory Theme Developer
*/

/* 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;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

[class*="col-"] {
    padding: 0 15px;
}

/* 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: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

/* 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 {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    position: relative;
}

.main-navigation li {
    margin-left: 2rem;
    position: relative;
}

.main-navigation a {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #007bff;
}

/* Dropdown Menu Styles */
.main-navigation .sub-menu,
.main-navigation .children {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-navigation li:hover .sub-menu,
.main-navigation li:hover .children,
.main-navigation li:focus-within .sub-menu,
.main-navigation li:focus-within .children {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li,
.main-navigation .children li {
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}

.main-navigation .sub-menu li:last-child,
.main-navigation .children li:last-child {
    border-bottom: none;
}

.main-navigation .sub-menu a,
.main-navigation .children a {
    padding: 0.75rem 1rem;
    display: block;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.main-navigation .sub-menu a:hover,
.main-navigation .children a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Hero Section */
.hero-section {
    min-height: 800px;
    background: url('assets/hero-section.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    background-attachment: fixed;
}

.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: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* Search Section */
.search-section {
    background: #fff;
    padding: 4rem 0;
    text-align: center;
}

.search-form {
    max-width: 600px;
    margin: 2rem auto 0;
    display: flex;
    gap: 1rem;
}

.search-form select {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.search-form select:focus {
    outline: none;
    border-color: #007bff;
}

/* 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;
    margin-bottom: 2rem;
    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;
    text-decoration: none;
}

.card-title a:hover {
    color: #007bff;
}

.card-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-description {
    color: #555;
    line-height: 1.5;
}

/* Rating Display */
.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.rating-stars {
    color: #ffc107;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
}

/* Work Time Display */
.work-time {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.work-time h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.work-time-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.work-time-item: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: #007bff;
}

/* Breadcrumbs */
.breadcrumbs {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #666;
}

.breadcrumbs a {
    color: #007bff;
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

/* Browse Section */
.browse-section {
    background: #f8f9fa;
}

/* Popular Listings */
.popular-section {
    background: #fff;
}

/* Latest Articles */
.articles-section {
    background: #f8f9fa;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-navigation a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .col-4, .col-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .main-navigation ul {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation li {
        margin: 0.5rem 0;
    }
    
    .main-navigation .sub-menu,
    .main-navigation .children {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        box-shadow: none;
        padding-left: 1rem;
        margin: 0;
        border-radius: 0;
        min-width: auto;
        transition: none;
    }
    
    .main-navigation li.active .sub-menu,
    .main-navigation li.active .children {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .col-4, .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 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: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background: #0056b3;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}
