/*
Theme Name: Amplix Theme
Theme URI: https://amplix.io
Author: Amplix
Author URI: https://amplix.io
Description: A modern, flexible WordPress theme optimized for the Amplix Builder plugin. Features clean design, full-width sections, and seamless integration with Amplix page builder.
Version: 1.0.0
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
Text Domain: amplix-theme
Tags: full-site-editing, blog, one-column, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, editor-style, block-styles, wide-blocks

Amplix Theme is designed to work seamlessly with the Amplix Builder plugin,
providing a clean foundation for building custom websites.
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #004499;
}

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

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.3;
    font-weight: 600;
}

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-top: 0;
    margin-bottom: 1rem;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wp-site-blocks > main,
.wp-site-blocks > .site-main {
    flex: 1;
}

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

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 80px;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo img,
.custom-logo {
    max-height: 50px;
    width: auto;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
}

/* ============================================
   NAVIGATION
   ============================================ */

.primary-navigation {
    display: flex;
    align-items: center;
}

.primary-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.primary-navigation li {
    position: relative;
}

.primary-navigation a {
    display: block;
    padding: 10px 0;
    color: #333;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
    color: #0066cc;
}

/* Dropdown menus */
.primary-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 100;
    flex-direction: column;
    gap: 0;
}

.primary-navigation li:hover > .sub-menu {
    display: flex;
}

.primary-navigation .sub-menu a {
    padding: 10px 20px;
}

.primary-navigation .sub-menu a:hover {
    background: #f5f5f5;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.site-main {
    padding: 40px 0;
}

.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page title area */
.page-header {
    background: #f8f9fa;
    padding: 40px 0;
    margin-bottom: 40px;
}

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

.page-title {
    margin: 0;
    font-size: 2.5rem;
}

/* ============================================
   BLOG / POSTS
   ============================================ */

.blog-posts-list {
    display: grid;
    gap: 30px;
}

.post-card {
    display: flex;
    gap: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-card .post-thumbnail {
    flex: 0 0 300px;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}

.post-card .post-content {
    flex: 1;
}

.post-card .entry-title {
    margin: 0 0 15px;
    font-size: 1.5rem;
}

.post-card .entry-title a {
    color: inherit;
}

.post-card .entry-title a:hover {
    color: #0066cc;
}

.post-card .entry-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 15px;
}

.post-card .entry-meta span {
    margin-right: 15px;
}

.post-card .entry-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-card .read-more {
    display: inline-block;
    color: #0066cc;
    font-weight: 500;
}

/* Single post */
.single-post .entry-header {
    margin-bottom: 30px;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.single-post .entry-meta {
    color: #666;
    font-size: 14px;
}

.single-post .entry-content {
    line-height: 1.8;
}

.single-post .entry-content h2 {
    margin-top: 40px;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination,
.post-navigation {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

.pagination a:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.pagination .current {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* ============================================
   SIDEBAR
   ============================================ */

.widget-area {
    padding: 20px 0;
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.widget li:last-child {
    border-bottom: none;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.site-footer {
    background: #222;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.footer-widgets .widget-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.footer-widgets a {
    color: rgba(255,255,255,0.7);
}

.footer-widgets a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
}

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

.copyright {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: #666;
}

.breadcrumbs a:hover {
    color: #0066cc;
}

.breadcrumbs .separator {
    margin: 0 8px;
}

/* ============================================
   FORMS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066cc;
}

button,
.button,
input[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover,
.button:hover,
input[type="submit"]:hover {
    background: #0052a3;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .primary-navigation {
        width: 100%;
        display: none;
        order: 3;
    }

    .primary-navigation.active {
        display: block;
    }

    .primary-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
    }

    .primary-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        padding-left: 20px;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .page-title {
        font-size: 2rem;
    }

    .post-card {
        flex-direction: column;
    }

    .post-card .post-thumbnail {
        flex: none;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   AMPLIX BUILDER INTEGRATION
   ============================================ */

/* Full-width sections */
.amplix-section.full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Amplix Builder content takes precedence */
.amplix-builder-content .entry-content {
    max-width: none;
    padding: 0;
}

/* Hide default page title when using builder */
.amplix-builder-active .page-header {
    display: none;
}
