/*
 Theme Name:   The Company Child
 Theme URI:    http://example.com/thecompany-child/
 Description:  Modernized child theme for The Company. Focuses on clean, professional, and powerful design for security services.
 Author:       Antigravity
 Author URI:   http://example.com
 Template:     thecompany
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         modern, clean, security, dark-blue
*/

/* Modern Fonts - Priority on Vietnamese (Be Vietnam Pro) */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0d2c54;
    /* Deep Safety Blue */
    --accent-color: #c9a227;
    /* Metallic Gold */
    --text-color: #2c3e50;
    --text-light: #5d6d7e;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --font-stack: 'Be Vietnam Pro', Helvetica, Arial, sans-serif;
    --header-height: 90px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-stack);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.8;
    /* Increased for better Vietnamese readability */
    font-size: 17px;
    /* Bumped up from 15px */
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-stack);
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.8rem;
    line-height: 1.4;
}

a {
    transition: var(--transition);
}

/* Header & Navigation Modernization */
#top {
    background: var(--bg-white) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: auto !important;
    /* Allow flex height */
    padding: 10px 0;
    position: sticky !important;
    /* Modern Sticky Header */
    top: 0;
    z-index: 1000;
}

#top .container {
    max-width: 1200px;
}

/* Use Flexbox for Header Layout */
#top .row>div {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Safety for small screens */
}

/* Logo Fixes */
.logo {
    display: flex;
    /* Fix alignment */
    align-items: center;
    padding: 0;
    margin: 10px 0;
    float: none !important;
    /* Override theme float */
}

.logo img {
    max-height: 50px !important;
    /* Constrain size forcefully */
    width: auto !important;
    /* Override inline styles */
}

/* Navigation Menu */
.mainnav {
    display: flex !important;
    align-items: center;
    float: none !important;
    padding: 0;
}

.mainnav ul.menu>li>a {
    font-family: var(--font-stack);
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color);
    text-transform: uppercase;
    padding: 20px 15px;
    letter-spacing: 0.5px;
}

.mainnav ul.menu>li>a:hover {
    color: var(--accent-color);
    background: transparent;
}

/* Submenus */
.mainnav ul.menu>li>ul {
    background: var(--primary-color);
    border-top: 3px solid var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.mainnav ul.menu>li>ul li a {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mainnav ul.menu>li>ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 25px;
    /* Slide effect */
}

/* Buttons */
.button,
input[type=submit] {
    background: var(--primary-color) !important;
    border: none;
    border-radius: 6px;
    /* Slightly more rounded */
    color: #fff !important;
    font-family: var(--font-stack);
    font-weight: 600;
    padding: 14px 32px;
    /* Slightly larger */
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(13, 44, 84, 0.15);
    transition: var(--transition);
    cursor: pointer;
}

.button:hover,
input[type=submit]:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Content Areas */
/* Main Content Wrapper Constraint */
#content,
.main-content,
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 15px;
    /* Add side padding for small screens */
    width: 100%;
}

/* Ensure images don't overflow */
#content img {
    max-width: 100%;
    height: auto;
}

.section-title h2 {
    font-size: 32px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

/* Footer Modernization */
#footer {
    background: #111;
    color: #888;
    padding: 40px 0 0 !important;
    margin: 0 !important;
}

#footer h3 {
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    /* Reduced from 25px */
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
    /* Reduced from 10px */
    display: inline-block;
}

#footer p {
    margin-bottom: 10px;
    /* Compact paragraphs */
}

/* Fix for White Box in Footer Widgets */
#footer .widget,
#footer .panel,
#footer .sidepanel {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
    /* Reduced from default */
    color: #bbb;
}

#footer .widget strong {
    color: #fff;
    /* Highlights white */
}

#footer .widget a {
    color: #bbb;
    text-decoration: none;
}

#footer .widget a:hover {
    color: var(--accent-color);
}

/* Form Elements */
input[type="text"],
input[type="email"],
textarea {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    width: 100%;
    font-family: var(--font-stack);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #fff;
}

/* Utility Classes for clean layout */
.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Modern Blog & Category Improvements */

/* Blog Module / Post Cards (Overriding SVG "Triangle" Style) */
.portfolio-item,
.blogtiles .portfolio-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Hide the old SVG/Path overlay if possible or reset it */
.portfolio-item svg {
    display: none !important;
}

.portfolio-item figure {
    position: relative;
    height: 100%;
    margin: 0;
}

/* Featured Image */
.portfolio-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: 3px solid var(--accent-color);
}

/* Content Area */
.portfolio-item figcaption {
    position: relative;
    padding: 25px;
    background: #fff;
    text-align: left;
    height: auto;
    width: 100%;
    top: auto;
    left: auto;
    opacity: 1;
    /* Force visible */
}

/* Restore Titles & Text */
.portfolio-item h3 {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 10px 0;
    color: var(--primary-color) !important;
    font-weight: 700;
}

.portfolio-item h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-date {
    font-size: 12px;
    text-transform: uppercase;
    color: #999 !important;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

/* Excerpt */
.portfolio-item p {
    font-size: 14px;
    color: var(--text-light) !important;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* View Button */
.button-container {
    text-align: left;
    margin-top: 15px;
}

.button-container .button {
    padding: 8px 20px;
    font-size: 12px;
}

/* Pagination */
#nicepagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 4px;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid #ddd;
    font-weight: 600;
    text-decoration: none;
}

#nicepagination .page-numbers.current,
#nicepagination .page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Category Widgets / Sidebar */
.widget_categories ul,
.widget_archive ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories li,
.widget_archive li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.widget_categories li a,
.widget_archive li a {
    color: var(--text-color);
    font-weight: 500;
    display: block;
    transition: padding-left 0.2s;
}

.widget_categories li a:hover,
.widget_archive li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.widget_categories li a:before {
    content: '\203A';
    /* Chevron */
    margin-right: 8px;
    color: var(--accent-color);
    font-weight: bold;
}

/* Reset Blog Content Hover mess from parent theme */
.blog-content-hover {
    display: none;
    /* Simplify integration interaction */
}

/* Ensure container spacing */
.section.blogtiles .container {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* =========================================
   SINGLE POST OPTIMIZATION
   ========================================= */

/* Hide the ugly/empty grey header on single posts */
.single .page-header,
.single .breadcrumbs {
    display: none !important;
}

/* Main Container Spacing */
.single .hentry {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

/* Post Title */
.single .post-title {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

/* Post Meta (Date, Category, etc.) */
.single .meta {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.single .meta-part {
    display: inline-flex;
    align-items: center;
}

.single .meta-part i {
    color: var(--accent-color);
    margin-right: 5px;
}

/* Post Content Typography */
.single .post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.single .post-content p {
    margin-bottom: 20px;
}

.single .post-content h2,
.single .post-content h3,
.single .post-content h4 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
}

.single .post-content blockquote {
    border-left: 5px solid var(--accent-color);
    padding: 20px;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
    margin: 30px 0;
}

.single .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Tags */
.meta-tags {
    display: block;
    margin-top: 20px;
}

.meta-tags a {
    display: inline-block;
    background: #f1f1f1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.meta-tags a:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Author Box */
#author-container {
    background: #f4f7f6;
    padding: 30px;
    border-radius: 8px;
    margin-top: 50px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: start;
}

#author-container img.avatar {
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#author-container h4 {
    margin-top: 0;
    font-size: 18px;
    color: var(--primary-color);
}

/* Comments Area */
#comments {
    margin-top: 50px;
}

.comment-list li {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.comment-reply-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

/* Sidebar Improvements */
#sidebar h3 {
    font-size: 18px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}


/* =========================================
   HOMEPAGE PRO STYLES
   ========================================= */

/* Service Grid Fix - Aggressive Grid alignment */
.service-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

.service-item {
    display: flex !important;
    margin-bottom: 30px;
}

.service-box {
    background: #fff;
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(13, 44, 84, 0.05);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.service-box .icon-box {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    font-size: 32px;
    transition: all 0.3s ease;
}

.service-box:hover .icon-box {
    background: var(--primary-color);
    color: var(--accent-color);
}

.service-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-box p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.service-box .read-more {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section h2 {
    font-weight: 700;
}

/* Slider fix: Removing problematic constraint */
#hero-slider {
    min-height: 300px;
    background: #000;
}

/* =========================================
   ARCHIVE / CATEGORY HEADER FIX
   ========================================= */
.page-header,
.archive-header {
    background: #f4f7f6;
    padding: 30px 0;
    /* Reduced from likely 60px+ */
    margin-bottom: 40px;
    border-bottom: 1px solid #e1e4e8;
    text-align: center;
}

.page-header h1,
.archive-header h1 {
    font-size: 28px;
    /* Reduced size */
    margin: 0;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
}

.page-header .subtitle,
.archive-header .taxonomy-description {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}