/*
Theme Name: NitroShock
Description: A modern, plugin-compatible WordPress theme with AI-powered customization capabilities. Features responsive design, flexible layouts, and extensive plugin support.
Author: NitroShock
Author URI: https://nitroshock.ai
Version: 1.5.2
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nitroshock
Domain Path: /languages
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-logo, custom-menu, editor-colors, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.4

NitroShock WordPress Theme, Copyright 2025-2026
NitroShock is distributed under the terms of the GNU GPL

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/

/* Reset and Base Styles 
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}
*/
/* Container */
/* Scoped to the theme's own #page wrapper: imported site chrome may reuse
   the bare class (e.g. <header class="site">), and an unscoped rule blows
   such an element up to a full-viewport flex column. */
#page.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
  /*  padding: 0 20px; */
    gap: 30px;
    width: 100%;
}

/* Header */
.site-header {
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #eee);
    padding: 20px 0;
}

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

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

.custom-logo {
    max-height: 60px;
    width: auto;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.site-title a {
    text-decoration: none;
    color: var(--color-heading, #333);
}

.site-description {
    margin: 0;
    color: var(--color-text-muted, #666);
    font-size: 14px;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

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

.main-navigation a {
    text-decoration: none;
    color: var(--color-text, #333);
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-primary, #0073aa);
}

/* Dropdowns in the theme's own (fallback) header. The built header gets these
   from the site-builder loader; this is for a site with no header set yet. */
.main-navigation li {
    position: relative;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 70;
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--color-background, #fff);
    border-radius: 10px;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.3);
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu,
.main-navigation li.focus > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 8px 10px;
}

.main-navigation .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    margin-left: 0.35em;
    border-left: 0.3em solid transparent;
    border-right: 0.3em solid transparent;
    border-top: 0.32em solid currentColor;
    opacity: 0.7;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 8px;
    color: var(--color-text, #333);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

/* The preset's generic button rules (primary fill on hover/focus) must not
   turn the toggle into a solid block once it has focus. */
.main-navigation .menu-toggle,
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus,
.main-navigation .menu-toggle:active {
    background: transparent;
    color: var(--color-text, #333);
    box-shadow: none;
    transform: none;
}

.main-navigation .menu-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #0073aa);
    outline-offset: 2px;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

.menu-toggle .menu-toggle-close,
.main-navigation.toggled .menu-toggle .menu-toggle-open {
    display: none;
}

.main-navigation.toggled .menu-toggle .menu-toggle-close {
    display: block;
}

/* Main Content Area */
.content-area {
    flex: 1;
    box-sizing: border-box;
}

.site-content,
.widget-area,
.main {
    box-sizing: border-box;
}

/* Theme-rendered content (blog index, posts, archives, plain pages): the
   builder owns vertical rhythm on builder pages, so only these get padding.
   Body class from nitroshock_body_class_additions(). */
.ns-theme-content .main {
    padding: clamp(32px, 5vw, 56px) 20px;
}

/* Phones: the content area already has 20px side padding (no-sidebar rule). */
@media (max-width: 768px) {
    .ns-theme-content .main {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Readable line length for theme-rendered text (posts, plain pages). Builder
   pages are full-bleed sections and are not affected. */
.ns-theme-content .entry-header,
.ns-theme-content .entry-content,
.ns-theme-content .entry-footer,
.ns-theme-content .comments-area,
.ns-theme-content .page-header,
.ns-theme-content .posts-navigation,
.ns-theme-content .post-navigation {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.ns-theme-content .main > article {
    margin-bottom: 56px;
}

.ns-theme-content .main > article:last-of-type {
    margin-bottom: 0;
}

/* Builder posts hide the title, so the meta line (date, author) stands alone
   above full-width sections. Align it with the section content (.ns-container-lg:
   1440px, 20px gutters) instead of the viewport edge. */
.ns-builder-content .entry-header {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 20px 0;
}

.ns-builder-content .entry-header .entry-meta {
    margin-bottom: 4px;
}

.ns-theme-content .posts-navigation,
.ns-theme-content .pagination {
    margin-top: 32px;
}

/* .main margin removed - builder sections own their vertical rhythm (.ns-section). */

/* Sidebar */
.widget-area {
    flex: 0 0 300px;
    margin-top: 40px;
}

/* Brand tokens when the preset/brand CSS is loaded (builder pages); the old
   fixed light values otherwise, so blog/archive pages look as before. Without
   the tokens a dark palette put light headings on this light card. */
.widget {
    background: var(--color-surface, #f9f9f9);
    color: var(--color-text, #333);
    border: 1px solid var(--color-border, transparent);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.widget-title,
.widget h2,
.widget h3 {
    color: var(--color-heading, inherit);
}

.widget-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

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

.widget li {
    padding: 5px 0;
    border-bottom: 1px solid var(--color-border, #eee);
}

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

.widget a {
    color: var(--color-link, var(--color-primary, #333));
    text-decoration: none;
}

.widget a:hover {
    color: var(--color-primary, #0073aa);
}

/* Posts - page/post box styling removed: builder sections own spacing/borders. */

.entry-header {
    margin-bottom: 20px;
}

.entry-title {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
}

.entry-title a {
    color: var(--color-heading, #333);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--color-primary, #0073aa);
}

.entry-meta {
    color: var(--color-text-muted, #666);
    font-size: 14px;
    margin-bottom: 15px;
}

.entry-meta a {
    color: var(--color-text-muted, #666);
    text-decoration: none;
}

.entry-meta a:hover {
    color: var(--color-primary, #0073aa);
}

/* nitroshock_posted_on() prints the published and the modified time; only the
   published one is shown (the modified time stays in the markup for schema). */
.entry-meta .updated:not(.published) {
    display: none;
}

.entry-meta .posted-on + .byline::before {
    content: "\00b7";
    margin: 0 6px;
}

.entry-content {
    line-height: 1.7;
}

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

.more-link {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--color-primary, #0073aa);
    color: var(--color-text-inverse, #fff);
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.more-link:hover {
    background: color-mix(in srgb, var(--color-primary, #0073aa) 86%, #000);
    color: var(--color-text-inverse, #fff);
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border, #eee);
}

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

.comment {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--color-surface, #f9f9f9);
    border-radius: 5px;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-meta {
    color: var(--color-text-muted, #666);
    font-size: 14px;
    margin-bottom: 10px;
}

/* Footer */
.site-footer {
    background: var(--color-surface, #333);
    color: var(--color-text, #fff);
    padding: 40px 0 20px;
    margin-top: 60px;
}

/* The built footer (data-ns-chrome) owns its own padding and background. */
/* :where() keeps this at zero specificity, so an imported design whose own
   footer landmark uses class="site-footer" keeps its padding. */
:where(.site-footer[data-ns-chrome]) {
    padding: 0;
    margin-top: 0;
}

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

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget {
    color: #ccc;
}

.footer-widget .widget-title {
    color: #fff;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.footer-widget a {
    color: #ccc;
}

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

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-border, #555);
    color: var(--color-text-muted, #999);
    font-size: 14px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 3px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #333);
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 15px;
}

input[type="submit"],
button,
.wp-block-button__link {
    background: var(--color-primary, #0073aa);
    color: var(--color-text-inverse, #fff);
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover,
button:hover,
.wp-block-button__link:hover {
    background: color-mix(in srgb, var(--color-primary, #0073aa) 86%, #000);
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 6px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 7px;
    width: auto;
    z-index: 100000;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    /* The fallback header on phones: site title left, hamburger right, and the
       menu opens IN FLOW under them (full width), not absolutely positioned,
       which used to land it at the bottom of the document where nobody saw it. */
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .site-branding {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-title {
        font-size: 22px;
    }

    .main-navigation {
        display: contents;
    }

    .main-navigation .menu-toggle {
        flex: 0 0 auto;
        order: 1;
    }

    .main-navigation > ul {
        order: 2;
    }

    .main-navigation > ul {
        display: none;
        flex: 1 1 100%;
        flex-direction: column;
        position: static;
        background: transparent;
        border: 0;
        border-top: 1px solid var(--color-border, #eee);
        margin-top: 8px;
        padding: 8px 0 4px;
        gap: 0;
    }

    .main-navigation.toggled > ul {
        display: flex;
    }

    .main-navigation a {
        display: block;
        padding: 10px 0;
    }

    .main-navigation .sub-menu,
    .main-navigation li:hover > .sub-menu,
    .main-navigation li:focus-within > .sub-menu {
        display: flex;
        position: static;
        min-width: 0;
        padding: 0 0 0 16px;
        background: transparent;
        box-shadow: none;
        border: 0;
        border-radius: 0;
    }

    .main-navigation .sub-menu li,
    .main-navigation > ul > li {
        border: 0;
    }

    .main-navigation .sub-menu a {
        padding: 8px 0;
    }

    .main-navigation .menu-item-has-children > a::after {
        content: none;
    }

    .menu-toggle {
        display: inline-flex;
    }
    
    .site-content {
        flex-direction: column;
        gap: 0;
    }
    
    .widget-area {
        flex: none;
        margin-top: 20px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        font-size: 24px;
    }
}

/* Plugin Compatibility */
/* WooCommerce */
.woocommerce div.product,
.woocommerce-page div.product {
    margin-bottom: 40px;
}

/* Contact Form 7 */
.wpcf7-form {
    margin: 20px 0;
}

/* Yoast SEO Breadcrumbs */
.yoast-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* Jetpack */
.sharedaddy {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Block Editor Styles */
.wp-block-group {
    margin-bottom: 30px;
}

.wp-block-columns {
    margin-bottom: 30px;
}

.wp-block-image {
    margin-bottom: 20px;
}

.wp-block-gallery {
    margin-bottom: 30px;
}

/* Custom AI Styling Classes (for future AI integration) */
.ai-generated-header {
    position: relative;
}

.ai-generated-footer {
    position: relative;
}

.ai-generated-sidebar {
    position: relative;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .widget-area,
    .menu-toggle {
        display: none;
    }
    
    .site-content {
        max-width: none;
        padding: 0;
    }
    
    .content-area {
        max-width: none;
    }
}

/* Layout Classes for Sidebar Positioning */
.no-sidebar .site-content {
    display: block;
}

.no-sidebar .content-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Left */
.sidebar-left .site-content {
    flex-direction: row-reverse;
}

.sidebar-left .widget-area {
    margin-right: 30px;
    margin-left: 0;
}

/* Sidebar Right (default) */
.sidebar-right .widget-area {
    margin-left: 30px;
    margin-right: 0;
}

/* Full Width Template */
.page-template-page-full-width .site-content,
.full-width .site-content {
    display: block;
    max-width: 100% !important;
    padding: 0;
    margin: 0;
}

.page-template-page-full-width .content-area,
.full-width .content-area {
    width: 100%;
    max-width: 100% !important;
    margin: 0;
}

.page-template-page-full-width .main,
.full-width .main {
    margin: 0;
    padding: 40px 20px;
    max-width: 100%;
}

/* Also apply full-width to pages with no-sidebar meta */
/* Builder pages own their width (full-bleed sections); a plain page keeps the
   1200px layout and the reading width above. */
body.no-sidebar.page.ns-builder-content .site-content {
    max-width: 100%;
}

body.no-sidebar.page.ns-builder-content .content-area {
    max-width: 100%;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .has-sidebar .site-content {
        flex-direction: column;
    }
    
    .sidebar-left .site-content {
        flex-direction: column;
    }
    
    .widget-area {
        margin: 20px 0 0 0 !important;
        flex: none;
    }
    
    .no-sidebar .content-area {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .page-template-page-full-width .content-area,
    .full-width .content-area {
        padding: 0;
        max-width: 100%;
    }
}
