/*
Theme Name: Antique Padlocks
Theme URI: https://antique-padlocks.com
Description: Custom WordPress theme for Antique Padlocks website - A virtual repository preserving the history of padlocks and locking devices
Version: 1.0.0
Author: Converted from HTML by Claude
Author URI: https://antique-padlocks.com
Text Domain: antique-padlocks
Domain Path: /languages
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #0000EE;
    text-decoration: underline;
}

a:visited {
    color: #551A8B;
}

a:hover {
    color: #00008B;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #ccc;
}

.site-logo {
    margin-bottom: 15px;
}

.site-logo img {
    max-width: 300px;
}

.site-description {
    font-size: 14px;
    line-height: 1.8;
    margin: 20px auto;
    max-width: 800px;
}

/* Navigation */
.main-navigation {
    margin: 20px 0;
}

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

.nav-table td {
    padding: 15px;
    vertical-align: top;
    border: 1px solid #ddd;
}

.nav-column h3 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.nav-column ul {
    list-style: none;
    padding: 0;
}

.nav-column li {
    margin: 5px 0;
}

.nav-column a {
    font-size: 13px;
    line-height: 1.6;
}

/* Main Content */
.site-content {
    margin: 30px 0;
}

.content-area {
    padding: 20px;
}

.page-title,
.entry-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.entry-content {
    font-size: 14px;
    line-height: 1.8;
}

/* Gallery Grid */
.padlock-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gallery-item {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    background: #f9f9f9;
}

.gallery-item img {
    margin-bottom: 10px;
}

.gallery-item-title {
    font-weight: bold;
    margin: 10px 0;
}

.gallery-item-description {
    font-size: 13px;
    color: #666;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table td,
table th {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Forms */
.search-form {
    margin: 20px 0;
}

.search-form input[type="search"] {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    width: 300px;
}

.search-form button {
    padding: 8px 15px;
    font-size: 14px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
}

.search-form button:hover {
    background: #005177;
}

/* Footer */
.site-footer {
    border-top: 2px solid #ccc;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   Custom Post Types - Padlock Listings
   ========================================================================== */

.padlock-listing {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.padlock-meta {
    margin: 15px 0;
    font-size: 13px;
}

.padlock-meta-item {
    margin: 5px 0;
}

.padlock-meta-label {
    font-weight: bold;
    display: inline-block;
    width: 150px;
}

.padlock-images {
    margin: 20px 0;
}

.padlock-images img {
    max-width: 400px;
    margin: 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .nav-table {
        display: block;
    }
    
    .nav-table td {
        display: block;
        width: 100%;
    }
    
    .padlock-gallery {
        grid-template-columns: 1fr;
    }
    
    .search-form input[type="search"] {
        width: 100%;
        max-width: 300px;
    }
}

/* ==========================================================================
   Front Page Styles
   ========================================================================== */

.featured-categories {
    margin: 40px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.category-card {
    border: 1px solid #ddd;
    padding: 20px;
    background: #f9f9f9;
    transition: box-shadow 0.3s;
}

.category-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-card h3 {
    margin-top: 0;
    font-size: 18px;
}

.category-card .count {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.view-category {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: none;
}

.recent-additions {
    margin: 40px 0;
}

.site-stats {
    margin: 40px 0;
    padding: 30px;
    background: #f0f0f0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #0073aa;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* ==========================================================================
   Enhanced Gallery Styles
   ========================================================================== */

.gallery-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    transition: all 0.3s;
}

.gallery-item-meta p {
    margin: 5px 0;
    font-size: 13px;
}

.read-more,
.view-details {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    margin-top: 10px;
}

.read-more:hover,
.view-details:hover {
    color: #005177;
}

/* ==========================================================================
   Search Results Enhancements
   ========================================================================== */

.search-result {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
}

.search-result-padlock {
    display: flex;
    gap: 20px;
}

.result-thumbnail {
    flex-shrink: 0;
}

.result-thumbnail img {
    max-width: 150px;
}

.result-content {
    flex-grow: 1;
}

.result-meta {
    color: #666;
    font-size: 13px;
    margin: 10px 0;
}

.search-result-standard {
    /* Standard post result styles */
}

/* ==========================================================================
   Image Overlay (Lightbox)
   ========================================================================== */

.image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.back-to-top:hover {
    background: #005177;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination,
.posts-navigation,
.post-navigation {
    margin: 30px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.page-numbers:hover {
    background: #f0f0f0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
