/*
Theme Name: MeFolio Child
Theme URI: http://demo.lion-coders.com/wp/mefolio/
Author: LionCoders
Author URI: http://lion-coders.com/
Description: Security-hardened & optimized child theme for MeFolio. Fixes all security vulnerabilities, updates deprecated APIs, and improves performance — with zero visual changes.
Version: 1.9.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: mefolio
Text Domain: mefolio
Tags: one-column, custom-menu, featured-images, full-width-template, translation-ready
*/

/* =========================================================
   CHILD THEME CSS
   ---------------------------------------------------------
   The parent style.css + css/style.css are enqueued via
   functions.php — no @import needed.

   Only add overrides below this line.
   ========================================================= */

/* Accessibility: Skip-to-content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 10px;
    background: #00ffc3;
    color: #0f172a;
    padding: 8px 16px;
    z-index: 99999;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
}

/* Custom preloader — minimal MA monogram with spinning ring */
.ma-loader {
    position: relative;
    width: 60px;
    height: 60px;
}
.ma-loader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}
.ma-loader-ring {
    width: 60px;
    height: 60px;
    animation: maLoaderSpin 1.2s linear infinite;
}
@keyframes maLoaderSpin {
    to { transform: rotate(360deg); }
}

/* Typed.js cursor style */
.typed-cursor {
    opacity: 1;
    animation: typedBlink 0.7s infinite;
    font-weight: 100;
    color: #00ffc3;
}
@keyframes typedBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .preloader, .preloader-left,
    .animated, .owl-carousel .owl-item,
    .cursor {
        animation: none !important;
        transition: none !important;
    }
}

/* Add font-display: swap for Ionicons (parent lacks it) */
@font-face {
    font-family: "Ionicons";
    src: url("../mefolio/fonts/ionicons.ttf") format("truetype"),
         url("../mefolio/fonts/ionicons.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Blog: fallback gradient for posts without featured images */
#blog-header:not([style*="background-image: url(h"]) {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
}
/* Blog listing: placeholder for posts without thumbnails */
.hentry:not(.has-post-thumbnail) .post-title {
    padding-top: 10px;
}

/* Fix: Content area needs top padding to clear the fixed nav bar */
.content-lc {
    padding: 50px 70px 30px;
}

/* WPForms styling — underline inputs matching original CF7 look */
#contactForm .wpforms-container .wpforms-form .wpforms-field {
    margin-bottom: 0 !important;
    padding-top: 8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#contactForm .wpforms-field-label {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #aaa !important;
    font-weight: 400 !important;
    margin-bottom: 2px !important;
}
#contactForm .wpforms-required-label {
    color: #ccc !important;
    font-size: 9px !important;
}
#contactForm .wpforms-form input[type="text"],
#contactForm .wpforms-form input[type="email"],
#contactForm .wpforms-form input[type="number"],
#contactForm .wpforms-form input[type="tel"],
#contactForm .wpforms-form select,
#contactForm .wpforms-form textarea {
    width: 100% !important;
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    border-radius: 0 !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
    color: #333 !important;
    background: transparent !important;
    outline: none !important;
    font-family: inherit !important;
    transition: border-color 0.3s !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}
#contactForm .wpforms-form .wpforms-field-medium,
#contactForm .wpforms-form .wpforms-field-large {
    max-width: 100% !important;
    width: 100% !important;
}
#contactForm .wpforms-form select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 4px center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    padding-right: 20px !important;
}
#contactForm .wpforms-form input[type="text"]:focus,
#contactForm .wpforms-form input[type="email"]:focus,
#contactForm .wpforms-form input[type="number"]:focus,
#contactForm .wpforms-form input[type="tel"]:focus,
#contactForm .wpforms-form select:focus,
#contactForm .wpforms-form textarea:focus {
    border-bottom-color: #333 !important;
    box-shadow: none !important;
}
#contactForm .wpforms-form textarea {
    min-height: 80px !important;
    resize: vertical !important;
}
#contactForm .wpforms-form button[type="submit"],
#contactForm .wpforms-form .wpforms-submit {
    background: #333 !important;
    color: #fff !important;
    border: 2px solid #333 !important;
    border-radius: 0 !important;
    padding: 12px 28px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 2px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    margin-top: 10px !important;
    display: inline-block !important;
}
#contactForm .wpforms-form button[type="submit"]:hover,
#contactForm .wpforms-form .wpforms-submit:hover {
    background: transparent !important;
    color: #333 !important;
    border-color: #333 !important;
}
/* Hide WPForms honeypot field immediately (prevents flash on AJAX load) */
#wpforms-2898-field_4-container {
    position: absolute !important;
    overflow: hidden !important;
    height: 1px !important;
    width: 1px !important;
    clip: rect(0,0,0,0) !important;
    clip-path: inset(50%) !important;
}
/* Validation errors — no layout shift, absolute positioned */
#contactForm .wpforms-container .wpforms-form .wpforms-field {
    position: relative !important;
    padding-bottom: 18px !important;
}
#contactForm .wpforms-form label.wpforms-error {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    font-size: 11px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #e74c3c !important;
    line-height: 1 !important;
}
/* Highlight invalid fields with red underline */
#contactForm .wpforms-form input.wpforms-error,
#contactForm .wpforms-form textarea.wpforms-error,
#contactForm .wpforms-form select.wpforms-error {
    border-bottom-color: #e74c3c !important;
}
/* Math captcha — compact */
#contactForm .wpforms-field-captcha .wpforms-field-label {
    font-size: 10px !important;
    letter-spacing: 1px !important;
}
#contactForm .wpforms-field-captcha .wpforms-captcha-math {
    font-size: 14px !important;
    color: #666 !important;
}

/* Hide broken signature image (Elementor data has invalid URL) */
img.sign[src$="/resume/"],
img.sign[src=""],
img.sign:not([src*="."]) {
    display: none !important;
}

/* Testimonial carousel: normalize company logos in absolute-positioned circles */
.testimonials img {
    object-fit: contain !important;
    background: #fff !important;
    padding: 4px !important;
    width: 90px !important;
    height: 90px !important;
}
/* Ensure testimonial cards have room for the absolutely positioned image */
#liontestimonial .item.testimonials {
    text-align: center;
    padding: 50px 20px 20px;
    margin-top: 50px;
}
#liontestimonial .item.testimonials blockquote {
    margin: 0;
    padding: 10px 15px;
    border: none;
    font-size: 15px;
    line-height: 1.8;
    color: #2d2d2d;
}
#liontestimonial .item.testimonials .quote {
    color: #555;
    font-size: 13px;
    margin-top: 14px;
}
#liontestimonial .item.testimonials .quote span {
    font-weight: 600;
    color: #222;
    font-size: 14px;
}
#liontestimonial .owl-nav {
    text-align: center;
    margin-top: 10px;
}

/* =========================================================
   SECURITY LAB — Tabbed widget organizer
   ========================================================= */

/* Compact cyber widgets for narrow content area */
.cyber-widget {
    padding: 16px;
    margin: 12px 0;
    font-size: 12px;
}
.cyber-widget-title {
    font-size: 15px;
    margin: 0 0 10px;
    padding-bottom: 6px;
}
.cyber-input-group {
    flex-wrap: wrap;
}
.cyber-input {
    min-width: 0;
    font-size: 12px;
    padding: 8px 10px;
}
.cyber-btn {
    font-size: 11px;
    padding: 8px 14px;
}

/* Security Lab — Hero banner */
.seclab-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border: 1px solid rgba(0,255,195,.15);
    border-radius: 8px;
    padding: 28px 24px 36px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.seclab-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0,255,195,.08) 0%, transparent 70%);
    pointer-events: none;
}
.seclab-hero-content {
    position: relative;
    z-index: 1;
}
.seclab-hero-icon {
    margin-bottom: 12px;
}
.seclab-hero .block-title {
    color: #fff;
}
.seclab-subtitle {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.seclab-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.seclab-stat {
    background: rgba(0,255,195,.06);
    border: 1px solid rgba(0,255,195,.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.5px;
}
.seclab-stat strong {
    color: #00ffc3;
    margin-right: 3px;
}
.seclab-credit {
    color: #64748b;
    font-size: 11px;
    margin: 0;
    letter-spacing: 0.5px;
    font-style: italic;
    position: absolute;
    bottom: 12px;
    right: 16px;
}

/* Security Lab tabs */
.seclab-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid rgba(0,255,195,.2);
    margin-bottom: 0;
}
.seclab-tab {
    background: transparent;
    border: 1px solid rgba(0,255,195,.15);
    border-bottom: none;
    color: #94a3b8;
    padding: 10px 16px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all .25s ease;
    border-radius: 6px 6px 0 0;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.seclab-tab svg {
    opacity: 0.6;
    transition: opacity .25s;
}
.seclab-tab:hover {
    color: #00ffc3;
    background: rgba(0,255,195,.05);
}
.seclab-tab:hover svg {
    opacity: 1;
}
.seclab-tab.active {
    color: #00ffc3;
    border-color: rgba(0,255,195,.4);
    background: rgba(0,255,195,.08);
    border-bottom: 2px solid #0f172a;
}
.seclab-tab.active svg {
    opacity: 1;
}
.seclab-panel {
    display: none;
    padding: 20px 0;
}
.seclab-panel.active {
    display: block;
    animation: seclabFade .35s ease;
}
@keyframes seclabFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section headers within panels */
.seclab-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #00ffc3;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 24px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,255,195,.12);
    display: flex;
    align-items: center;
    gap: 8px;
}
.seclab-section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: #00ffc3;
    border-radius: 2px;
    flex-shrink: 0;
}
.seclab-section-title:first-child {
    margin-top: 0;
}

/* Mobile: content area padding */
@media (max-width: 767px) {
    .content-lc {
        padding: 50px 20px 20px;
    }
    .seclab-hero {
        padding: 20px 16px 32px;
    }
    .seclab-credit {
        position: static;
        text-align: right;
        margin-top: 14px;
    }
    .seclab-stats {
        gap: 8px;
    }
    .seclab-stat {
        font-size: 10px;
        padding: 3px 8px;
    }
    .seclab-tab {
        font-size: 11px;
        padding: 8px 10px;
    }
    .seclab-tab svg {
        display: none;
    }
    .cyber-widget {
        padding: 12px;
    }
}
