/*
Theme Name: Halal Restaurant Directory Theme
Theme URI: https://halal-restaurants.local
Description: Modern directory theme for halal restaurants with map integration and search features
Author: Your Name
Author URI: https://your-site.com
Version: 1.0.0
License: GPL-2.0
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: halal-directory-theme
Domain Path: /languages
Tags: directory, map, restaurants, halal, responsive
*/

/* Reset and Normalize */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #1e7f4f;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #145c38;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

a {
    color: #1e7f4f;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #158f3f;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1e7f4f 0%, #158f3f 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.site-header {
    padding: 20px 0;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: white;
}

.site-title a:hover {
    color: #f9a826;
}

.site-description {
    font-size: 14px;
    margin-top: 5px;
    opacity: 0.9;
}

/* Navigation */
nav.main-navigation {
    background: rgba(0, 0, 0, 0.1);
    padding: 0;
}

nav.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav.main-navigation li {
    margin-right: 0;
}

nav.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: white;
    transition: background 0.3s ease;
}

nav.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar h3 {
    border-bottom: 3px solid #1e7f4f;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.sidebar a:hover {
    background: #f4f7f6;
}

/* Footer */
footer {
    background: #1e7f4f;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    color: #f9a826;
    border-bottom: 2px solid #f9a826;
    padding-bottom: 10px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #f4f7f6;
}

.footer-widget a:hover {
    color: #f9a826;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #f4f7f6;
}

/* Posts and Pages */
.post, .page {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-title {
    color: #1e7f4f;
    border-bottom: 3px solid #f9a826;
    padding-bottom: 15px;
}

.page-header {
    margin-bottom: 18px;
}

.page-title {
    color: #0f3d27;
    background: linear-gradient(90deg, rgba(30, 127, 79, 0.12) 0%, rgba(30, 127, 79, 0.04) 100%);
    border-left: 5px solid #1e7f4f;
    border-bottom: none;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
    display: inline-block;
}

.post-meta {
    color: #999;
    font-size: 14px;
    margin: 10px 0 20px 0;
}

.post-meta span {
    margin-right: 15px;
}

.post-content {
    line-height: 1.8;
}

/* Archive Page */
.archive-header {
    background: linear-gradient(135deg, #1e7f4f 0%, #158f3f 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    border-radius: 8px;
    text-align: center;
}

.archive-header h1 {
    color: white;
    border: none;
    margin: 0;
}

/* Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Buttons */
.btn, button, input[type="button"], input[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    background: #1e7f4f;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.btn:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    background: #158f3f;
    transform: translateY(-2px);
}

.btn.secondary {
    background: #f9a826;
}

.btn.secondary:hover {
    background: #f08a00;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1e7f4f;
    box-shadow: 0 0 0 3px rgba(30, 127, 79, 0.1);
}

/* Search Form */
.search-form {
    margin-bottom: 30px;
}

.search-form .search-submit {
    margin-top: 10px;
}

/* Directory Specific Styles */
.halal-restaurants-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.restaurant-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.restaurant-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1e7f4f 0%, #158f3f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.restaurant-card-content {
    padding: 20px;
}

.restaurant-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e7f4f;
    margin-bottom: 10px;
}

.restaurant-card-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.restaurant-card-meta strong {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.restaurant-card-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.restaurant-card-buttons a {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.restaurant-card-buttons .btn-view {
    background: #1e7f4f;
    color: white;
}

.restaurant-card-buttons .btn-view:hover {
    background: #158f3f;
}

.restaurant-card-buttons .btn-website {
    background: #f9a826;
    color: white;
}

.restaurant-card-buttons .btn-website:hover {
    background: #f08a00;
}

/* SEO Blog Components */
.seo-article-card {
    background: linear-gradient(135deg, #f8faf9 0%, #ffffff 100%);
    border: 1px solid #e5efea;
    border-left: 6px solid #1e7f4f;
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.seo-article-card p:last-child {
    margin-bottom: 0;
}

.seo-keywords {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(30, 127, 79, 0.08);
    color: #145c38;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.seo-toc-card {
    background: #ffffff;
    border: 1px solid #e5efea;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 0 0 24px;
}

.seo-toc-card h2 {
    margin-bottom: 10px;
    font-size: 1.35rem;
    color: #145c38;
}

.seo-toc-card ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.seo-toc-card li {
    margin: 8px 0;
}

.seo-toc-card a {
    color: #145c38;
    font-weight: 600;
}

.seo-toc-card a:hover {
    color: #0f3d27;
    text-decoration: underline;
}

.seo-section-card {
    background: #fff;
    border: 1px solid #ecf3ef;
    border-radius: 10px;
    padding: 20px;
    margin: 0 0 20px;
}

.seo-section-card h2,
.seo-section-card h3 {
    color: #145c38;
}

.seo-accordion {
    margin-top: 18px;
}

.seo-accordion-item {
    border: 1px solid #e2eee8;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 10px;
    overflow: hidden;
}

.seo-accordion-item summary {
    cursor: pointer;
    padding: 14px 16px;
    background: #f3f8f5;
    color: #145c38;
    font-weight: 700;
    list-style: none;
}

.seo-accordion-item summary::-webkit-details-marker {
    display: none;
}

.seo-accordion-item[open] summary {
    background: #e8f2ed;
}

.seo-accordion-content {
    padding: 14px 16px 16px;
    color: #2f3d36;
}

.seo-cta-note {
    border-left: 4px solid #f9a826;
    background: #fff8ea;
    padding: 12px 14px;
    border-radius: 6px;
    margin: 18px 0;
}

/* Halal Guides Index */
.halal-guides-index-wrap {
    margin: 10px 0 20px;
}

.halal-guides-index-header {
    margin-bottom: 20px;
}

.halal-guides-index-header p {
    color: #50625a;
    max-width: 760px;
}

.halal-guides-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.halal-guide-card {
    background: #ffffff;
    border: 1px solid #e8f1ec;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.halal-guide-card-thumb {
    display: block;
    background: #e7f1ec;
    min-height: 180px;
}

.halal-guide-card-thumb img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.halal-guide-card-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: #145c38;
    font-weight: 700;
}

.halal-guide-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.halal-guide-card-body h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.halal-guide-card-body h2 a {
    color: #145c38;
}

.halal-guide-card-body p {
    color: #4f6159;
    margin: 0;
    flex: 1;
}

.blog-index-wrap .halal-guides-index-header p {
    max-width: 700px;
}

.blog-post-card .halal-guide-card-thumb-fallback {
    background: linear-gradient(135deg, #1e7f4f 0%, #0d5c38 100%);
    color: #ffffff;
}

.blog-index-pagination {
    margin-top: 24px;
}

.blog-index-pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.blog-index-pagination a,
.blog-index-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #d8e9df;
    background: #ffffff;
    color: #145c38;
    font-weight: 700;
}

.blog-index-pagination .current {
    background: #1e7f4f;
    border-color: #1e7f4f;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .posts-grid,
    .halal-restaurants-directory {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    nav.main-navigation ul {
        flex-direction: column;
    }

    nav.main-navigation a {
        padding: 12px 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .posts-grid,
    .halal-restaurants-directory {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .restaurant-card-buttons {
        flex-direction: column;
    }

    main {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    .site-title {
        font-size: 22px;
    }

    .post, .page {
        padding: 20px 15px;
    }
}
