/*
Theme Name: HR Tech Pro Theme
Theme URI: https://example.com/
Author: Antigravity
Author URI: https://example.com/
Description: A modern, SEO-friendly, highly optimized custom WordPress theme for HR Technology content.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hrtechpro
*/

:root {
    --primary-color: #0F172A; /* Deep Navy */
    --secondary-color: #0D9488; /* Vibrant Teal */
    --accent-color: #F59E0B; /* Amber for attention */
    --text-color: #334155;
    --text-light: #64748B;
    --bg-color: #F8FAFC;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(15, 23, 42, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(13, 148, 136, 0.12) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(15, 23, 42, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

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

/* Global 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 {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 15px;
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea {
    min-height: 120px;
}

/* ==========================================
 * Single Post / Gutenberg Content Reading Styles
 * ========================================== */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 760px; /* Optimal reading width */
    margin: 0 auto;
}

.entry-content p {
    margin-bottom: 1.75rem;
}

/* Gutenberg Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: 3.5rem; /* Massive top margin to ensure clear separation */
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 800;
}

.entry-content h1 { font-size: 2.5rem; }
.entry-content h2 { font-size: 2rem; }
.entry-content h3 { font-size: 1.5rem; }
.entry-content h4 { font-size: 1.25rem; }

/* In case the user just bolded paragraphs instead of using actual Headings */
.entry-content p > strong {
    color: var(--primary-color);
}

/* Links in content */
.entry-content p a,
.entry-content li a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.entry-content p a:hover,
.entry-content li a:hover {
    color: var(--primary-color);
    text-decoration-color: var(--primary-color);
}

/* Blockquotes */
.entry-content blockquote,
.entry-content .wp-block-quote {
    margin: 3rem 0;
    padding: 2rem 2.5rem;
    background-color: var(--bg-color);
    border-left: 6px solid var(--secondary-color);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1.35rem;
    color: var(--primary-color);
}

.entry-content blockquote p {
    margin-bottom: 0;
}

.entry-content blockquote cite,
.entry-content .wp-block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 600;
    color: var(--text-light);
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin-top: 1rem;
    margin-bottom: 2.5rem; /* Increased significantly to separate from next section */
    padding-left: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.85rem; /* More breathing room between list items */
    line-height: 1.8;
}

.entry-content ul li {
    list-style-type: disc;
}

.entry-content ul li::marker {
    color: var(--secondary-color);
}

/* Gutenberg Images and Captions */
.entry-content .wp-block-image {
    margin: 2.5rem 0;
}

.entry-content .wp-block-image img {
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.entry-content figcaption,
.entry-content .wp-element-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    font-style: italic;
}

/* Drop Caps */
.entry-content p.has-drop-cap:not(:focus):first-letter {
    float: left;
    font-size: 4.5rem;
    line-height: 0.8;
    margin: 0.1em 0.1em 0 0;
    color: var(--primary-color);
    font-weight: 800;
}

/* Separators */
.entry-content hr,
.entry-content .wp-block-separator {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 3rem auto;
    max-width: 50%;
}

/* Code Blocks */
.entry-content pre,
.entry-content .wp-block-code {
    position: relative;
    background-color: #1E293B; /* Deep dark bg */
    color: #E2E8F0;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    overflow-x: auto;
    margin: 2.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.entry-content code {
    background-color: #F1F5F9;
    color: #0F172A;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.entry-content pre code,
.entry-content .wp-block-code code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Copy Button */
.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.copy-code-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.copy-code-btn.copied {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

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

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-branding .site-title a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.site-branding img.custom-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

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

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    display: block;
    padding: 10px 0;
}

.main-navigation a:hover {
    color: var(--secondary-color);
}

/* Sub-menu styling */
.main-navigation ul ul.sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

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

.main-navigation ul ul.sub-menu li {
    width: 100%;
}

.main-navigation ul ul.sub-menu a {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.main-navigation ul ul.sub-menu a:hover {
    background-color: var(--bg-color);
    color: var(--secondary-color);
}

/* Nested sub-menus */
.main-navigation ul ul.sub-menu ul.sub-menu {
    top: 0;
    left: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #1E293B);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.25rem;
    color: #CBD5E1;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
    background-color: #0F766E;
    color: var(--white);
    transform: translateY(-2px);
}

/* Section Headings */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2.2rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.article-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #E2E8F0;
}

.article-content {
    padding: 24px;
}

.article-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.article-title a {
    color: var(--primary-color);
}

.article-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Newsletter Section */
.newsletter-section {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 60px;
}

.newsletter-section h2 {
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 100%;
    font-size: 1rem;
    font-family: var(--font-body);
}

.newsletter-form button {
    cursor: pointer;
    border: none;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-widget h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

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

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

.site-info {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94A3B8;
    font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    position: relative;
    transition: background-color 0.3s;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    left: 0;
    transition: transform 0.3s, top 0.3s;
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

/* Hamburger active state */
.menu-toggle[aria-expanded="true"] .hamburger-icon {
    background-color: transparent;
}
.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ==========================================
 * Related Articles Section
 * ========================================== */
.related-articles-section {
    margin-top: 50px;
    margin-bottom: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-articles-heading {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 700;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.related-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
}

.related-thumbnail {
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-thumbnail img {
    transform: scale(1.05);
}

.related-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: block;
}

.related-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-title a {
    color: var(--primary-color);
}

.related-title a:hover {
    color: var(--secondary-color);
}

.related-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

.related-read-more {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.related-read-more:hover {
    color: var(--primary-color);
}

/* ==========================================
 * Comments Section
 * ========================================== */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
}

.comments-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.comment-list .comment {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
}

.comment-list .children {
    list-style: none;
    margin-top: 25px;
    padding-left: 0;
    margin-left: 20px;
    border-left: 2px solid var(--border-color);
}

.comment-list .children .comment {
    border: none;
    box-shadow: none;
    padding: 0 0 0 20px;
    background: transparent;
    margin-bottom: 20px;
}

.comment-body {
    position: relative;
}

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-author img.avatar {
    border-radius: 50%;
    margin-right: 15px;
    width: 50px;
    height: 50px;
}

.comment-author .fn {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-style: normal;
}

.comment-metadata {
    margin-left: auto;
    font-size: 0.85rem;
}

.comment-metadata a {
    color: var(--text-light);
}

.comment-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.reply {
    margin-top: 15px;
}

.comment-reply-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.comment-reply-link:hover {
    color: var(--primary-color);
}

/* Comment Form */
#respond {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.7);
    margin-top: 40px;
}

#reply-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 700;
}

#reply-title small a {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--accent-color);
    margin-left: 10px;
}

.comment-form {
    display: flex;
    flex-direction: column;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.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 var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text-color);
    transition: all 0.3s ease;
    background-color: var(--bg-color);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    background-color: var(--white);
}

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

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.comment-form-cookies-consent label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-submit {
    margin-top: 10px;
    margin-bottom: 0;
}

.comment-form .submit {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.comment-form .submit:hover {
    background-color: #0F766E;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        padding: 20px;
        display: none; /* Hidden by default */
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation ul ul.sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        display: none;
        transform: none;
        padding-left: 15px;
    }
    
    .main-navigation li:hover > ul.sub-menu,
    .main-navigation li:focus-within > ul.sub-menu {
        display: block;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}
