/*
Theme Name: ITAgency WP
Theme URI: https://example.com/itagency-wp
Author: AJCNDEV
Description: Professional IT Services & Web Development theme. A fully dynamic and customizable WordPress theme built with native WordPress APIs. All content is editable from the dashboard without any external plugins.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: itagency-wp
Tags: one-column, two-columns, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-width-template, theme-options, translation-ready, blog, portfolio

ITAgency WP - Professional IT Services & Web Development Theme
100% editable from WordPress dashboard using native APIs only.
*/

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

/* Screen Reader Text */
.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: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

/* Captions */
.wp-caption {
    margin-bottom: 1.5em;
    max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption .wp-caption-text {
    margin: 0.8075em 0;
    font-size: 0.875em;
    text-align: center;
}

/* Galleries */
.gallery {
    margin-bottom: 1.5em;
    display: grid;
    grid-gap: 1.5em;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    width: 100%;
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
    grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
    grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
    grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
    display: block;
}

/* WordPress Admin Bar Fix */
body.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
}

/* ==========================================================================
   Theme Specific Overrides
   ========================================================================== */

/* Ensure smooth transitions for dynamic content */
[data-aos] {
    pointer-events: auto !important;
}

/* WordPress editor alignment support */
.has-text-align-center {
    text-align: center;
}

.has-text-align-left {
    text-align: left;
}

.has-text-align-right {
    text-align: right;
}

/* Wide and full width support */
.alignwide {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    max-width: 100vw;
    width: 100vw;
}

.alignfull {
    margin-left: calc(-100vw / 2 + 100% / 2);
    margin-right: calc(-100vw / 2 + 100% / 2);
    max-width: 100vw;
    width: 100vw;
}

/* Sticky post styles */
.sticky {
    position: relative;
}

.sticky::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary, #6366f1);
}

/* Post navigation */
.post-navigation,
.posts-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 200px;
}

.nav-next {
    text-align: right;
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: 1rem;
}

.comment-content {
    margin-bottom: 1rem;
}

.comment-reply-link {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Comment form */
.comment-form {
    margin-top: 2rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary, #6366f1);
}

.comment-form .form-submit {
    margin-top: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    background: var(--color-surface, #1f2937);
    color: var(--color-text-primary, #f9fafb);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-primary, #6366f1);
    color: #fff;
}

/* Widget areas */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary, #6366f1);
}

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

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

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

.widget ul li a {
    color: var(--color-text-primary, #f9fafb);
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget ul li a:hover {
    color: var(--color-primary, #6366f1);
}

/* Search widget */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--color-surface, #1f2937);
    color: var(--color-text-primary, #f9fafb);
}

.search-form .search-submit {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-form .search-submit:hover {
    background: var(--color-primary-dark, #4f46e5);
}

/* Byline and posted on (for theme check) */
.byline,
.posted-on {
    display: inline;
}

.single .byline,
.group-blog .byline {
    display: inline;
}

/* Infinite scroll */
.infinite-scroll .posts-navigation,
.infinite-scroll.neverending .site-footer {
    display: none;
}

.infinity-end.neverending .site-footer {
    display: block;
}

/* Page links */
.page-links {
    clear: both;
    margin: 1.5rem 0;
}

.page-links .page-number {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0 0.25rem;
    background: var(--color-surface, #1f2937);
    border-radius: 0.25rem;
}

.page-links .page-number.current {
    background: var(--color-primary, #6366f1);
    color: #fff;
}

/* Hidden home nav items */
.itagency-hidden-home {
    display: none !important;
}
