/**
 * WordPress-specific styles and theme overrides
 *
 * @package base-new
 */

/* ==========================================================================
   CSS Custom Properties Override
   Uncomment and modify to customize your brand colors
   ========================================================================== */

/*
:root {
    --theme-color: #F41E1E;
    --theme-color2: #3843C1;
    --title-color: #1D2229;
    --body-color: #6A6A6A;
}
*/

/* ==========================================================================
   WordPress Core Alignment Classes
   ========================================================================== */

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

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

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignwide {
    margin-left: -10%;
    margin-right: -10%;
    max-width: 120%;
    width: 120%;
}

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

/* ==========================================================================
   WordPress Captions
   ========================================================================== */

.wp-caption {
    max-width: 100%;
}

.wp-caption img {
    display: block;
    width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--body-color);
    padding: 0.5rem 0;
    text-align: center;
}

/* ==========================================================================
   WordPress Gallery
   ========================================================================== */

.gallery {
    display: grid;
    grid-gap: 1rem;
    margin-bottom: 1.5rem;
}

.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-item {
    margin: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Screen Reader Text
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.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;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   WordPress Navigation Menu Compatibility
   ========================================================================== */

/* Main menu styling for WordPress output */
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu > ul {
    display: flex;
    gap: 0;
}

.main-menu > ul > li {
    position: relative;
}

.main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu .sub-menu li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.main-menu .sub-menu li:last-child {
    border-bottom: none;
}

.main-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--title-color);
}

.main-menu .sub-menu a:hover {
    background: var(--theme-color);
    color: #fff;
}

/* Dropdown indicator for items with children */
.main-menu .menu-item-has-children > a::after {
    content: "\f107";
    font-family: "Font Awesome 6 Pro";
    font-weight: 400;
    margin-left: 5px;
}

/* Mobile menu WordPress compatibility */
.th-mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.th-mobile-menu .sub-menu {
    display: none;
    padding-left: 15px;
}

.th-mobile-menu .menu-item-has-children.active > .sub-menu {
    display: block;
}

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

.th-pagination .nav-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.th-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f5f5f5;
    border-radius: 5px;
    color: var(--title-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.th-pagination .page-numbers:hover,
.th-pagination .page-numbers.current {
    background: var(--theme-color);
    color: #fff;
}

/* ==========================================================================
   WordPress Comments
   ========================================================================== */

.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: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.comment-form textarea {
    min-height: 150px;
}

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

.comment-form .submit {
    background: var(--theme-color);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    background: var(--theme-color2);
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

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

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

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

.comment-author .fn {
    font-weight: 600;
    color: var(--title-color);
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--body-color);
    margin-bottom: 1rem;
}

.reply a {
    font-size: 0.875rem;
    color: var(--theme-color);
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.th-post-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

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

.th-post-navigation .nav-previous,
.th-post-navigation .nav-next {
    max-width: 48%;
}

.th-post-navigation .nav-subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--body-color);
    margin-bottom: 0.25rem;
}

.th-post-navigation .nav-title {
    display: block;
    font-weight: 600;
    color: var(--title-color);
}

.th-post-navigation a:hover .nav-title {
    color: var(--theme-color);
}

/* ==========================================================================
   Error Page
   ========================================================================== */

.th-error-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-number {
    font-size: 150px;
    font-weight: 900;
    color: var(--theme-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.error-text {
    max-width: 500px;
    margin: 0 auto 2rem;
    color: var(--body-color);
}

/* ==========================================================================
   Custom Logo
   ========================================================================== */

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

.footer-logo .custom-logo {
    max-height: 80px;
}

/* ==========================================================================
   Site Title (when no logo)
   ========================================================================== */

.site-title {
    font-family: var(--title-font);
    font-weight: 700;
    color: var(--title-color);
    text-decoration: none;
}

.footer-wrapper .site-title {
    color: #fff;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.sidebar-area .widget {
    margin-bottom: 2rem;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 10px;
}

.sidebar-area .widget-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--theme-color);
}

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

.sidebar-area .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.sidebar-area .widget a {
    color: var(--body-color);
}

.sidebar-area .widget a:hover {
    color: var(--theme-color);
}

/* ==========================================================================
   Blog Spacing (using Fitkit classes)
   ========================================================================== */

.space-top {
    padding-top: 80px;
}

.space-extra-bottom {
    padding-bottom: 100px;
}

.space {
    padding-top: 80px;
    padding-bottom: 80px;
}

@media (min-width: 992px) {
    .space-top {
        padding-top: 120px;
    }

    .space-extra-bottom {
        padding-bottom: 140px;
    }

    .space {
        padding-top: 120px;
        padding-bottom: 120px;
    }
}

/* ==========================================================================
   Tagcloud
   ========================================================================== */

.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tagcloud a {
    display: inline-block;
    padding: 5px 15px;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 14px;
    color: var(--body-color);
    transition: all 0.3s ease;
}

.tagcloud a:hover {
    background: var(--theme-color);
    color: #fff;
}
