/*
Theme Name: FreeSteno
Theme URI: https://freesteno.in
Author: Prashant
Description: Freesteno typing tools website theme. Working dropdown navigation, large icons, orange-teal hero, mobile responsive, AdSense ready.
Version: 6.0
License: GNU General Public License v2 or later
Text Domain: Freesteno
*/

/* =============================================
   RESET
   ============================================= */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Open Sans',Arial,sans-serif; font-size:14px; color:#333; background:#f5f5f5; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; display:block; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background:#fff;
    padding:10px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
    border-bottom:1px solid #eee;
}
.logo-wrap { display:flex; align-items:center; }
.logo-icon {
    width:56px; height:56px;
    background:#f90; border-radius:8px 0 0 8px;
    display:flex; align-items:center; justify-content:center;
    font-size:0;
}
.logo-icon::after { content:'F'; font-size:32px; font-weight:900; color:#fff; font-family:Georgia,serif; }
.logo-text {
    display:flex; align-items:center; height:56px;
    border:2px solid #f90; border-left:none;
    border-radius:0 8px 8px 0; padding:0 12px 0 10px;
    background:#fff;
}
.logo-text .lt { font-size:22px; font-weight:400; color:#444; }
.logo-text .lb { font-size:22px; font-weight:700; color:#f90; }
.header-right { display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.header-top-row { display:flex; align-items:center; gap:5px; }
.sbtn {
    width:32px; height:32px; border-radius:4px;
    display:inline-flex; align-items:center; justify-content:center;
    color:#fff; font-size:13px; font-weight:700;
}
.sbtn:hover { opacity:0.8; }
.s-fb{background:#3b5998;} .s-tw{background:#1da1f2;} .s-gp{background:#dd4b39;}
.s-rd{background:#ff4500;} .s-tm{background:#35465c;} .s-li{background:#0077b5;}
.hdr-search { display:flex; border:2px solid #f90; border-radius:4px; overflow:hidden; margin-left:5px; }
.hdr-search input { border:none; outline:none; padding:6px 12px; font-size:13px; width:180px; }
.hdr-search button { background:#f90; border:none; color:#fff; padding:6px 12px; cursor:pointer; font-size:15px; }
.hdr-search button:hover { background:#e08800; }
.header-bot-row { display:flex; gap:14px; font-size:12.5px; }
.header-bot-row a { color:#555; }
.header-bot-row a:hover { color:#f90; }

/* =============================================
   NAVIGATION — FULLY WORKING
   =============================================
   WordPress outputs this HTML structure:
   <ul class="nav-menu">
     <li class="menu-item-has-children">
       <a>Parent</a>
       <ul class="sub-menu">
         <li><a>Child</a></li>
       </ul>
     </li>
   </ul>
   Our CSS targets exactly these classes.
   ============================================= */

#main-nav {
    background:#444;
    position:sticky;
    top:0;
    z-index:9999;
    width:100%;
}

.nav-inner {
    display:flex;
    align-items:stretch;
    width:100%;
}

/* ── The main <ul> ── */
#main-nav ul.nav-menu {
    display:flex;
    flex-direction:row;
    list-style:none !important;
    margin:0; padding:0;
    width:100%;
    flex-wrap:nowrap;
}

/* ── Every <li> in nav — kill bullets ── */
#main-nav ul.nav-menu li,
#main-nav ul.nav-menu li * {
    list-style:none !important;
    list-style-type:none !important;
}

/* ── Top level list items ── */
#main-nav ul.nav-menu > li {
    position:relative;
    display:block;
}

/* ── Top level links ── */
#main-nav ul.nav-menu > li > a {
    display:flex;
    align-items:center;
    gap:3px;
    padding:13px 15px;
    color:#fff;
    font-size:13.5px;
    font-weight:600;
    white-space:nowrap;
    transition:background 0.15s;
    cursor:pointer;
}
#main-nav ul.nav-menu > li > a:hover,
#main-nav ul.nav-menu > li.current-menu-item > a,
#main-nav ul.nav-menu > li.current_page_item > a,
#main-nav ul.nav-menu > li.current-menu-ancestor > a {
    background:#f90;
    color:#fff;
}

/* ── Caret (added by JS) ── */
.tb-caret {
    font-size:9px;
    opacity:0.8;
    display:inline-block;
    transition:transform 0.2s;
}

/* =============================================
   DROPDOWN — Desktop hover
   ============================================= */

/* The child <ul class="sub-menu"> — hidden by default */
#main-nav ul.nav-menu > li > ul.sub-menu {
    display:none;
    position:absolute;
    top:100%;
    left:0;
    z-index:99999;
    background:#fff;
    min-width:210px;
    list-style:none !important;
    margin:0; padding:5px 0;
    border:1px solid #e0e0e0;
    border-top:3px solid #f90;
    border-radius:0 0 5px 5px;
    box-shadow:0 6px 20px rgba(0,0,0,0.15);
}

/* Show on hover — CSS only, works without JavaScript */
#main-nav ul.nav-menu > li:hover > ul.sub-menu {
    display:block;
}

/* Sub-menu list items */
#main-nav ul.nav-menu > li > ul.sub-menu > li {
    display:block;
    list-style:none !important;
}

/* Sub-menu links */
#main-nav ul.nav-menu > li > ul.sub-menu > li > a {
    display:block;
    padding:10px 18px;
    font-size:13px;
    font-weight:400;
    color:#333;
    border-bottom:1px solid #f5f5f5;
    transition:background 0.12s, padding-left 0.12s;
    white-space:nowrap;
}
#main-nav ul.nav-menu > li > ul.sub-menu > li:last-child > a {
    border-bottom:none;
}
#main-nav ul.nav-menu > li > ul.sub-menu > li > a:hover {
    background:#fff8ee;
    color:#f90;
    padding-left:24px;
}

/* ── Mobile hamburger ── */
.nav-toggle {
    display:none;
    background:none; border:none;
    color:#fff; font-size:26px;
    cursor:pointer; padding:8px 16px;
    margin-left:auto;
}

/* =============================================
   HERO
   ============================================= */
.hero {
    background:linear-gradient(135deg,#c85800 0%,#e07000 25%,#1a6060 65%,#0d4040 100%);
    padding:50px 20px 65px;
    text-align:center; color:#fff;
}
.hero h1 { font-size:32px; font-weight:700; margin-bottom:14px; text-shadow:0 2px 8px rgba(0,0,0,0.25); }
.hero p  { font-size:15px; line-height:1.75; max-width:780px; margin:0 auto; opacity:0.95; }

/* =============================================
   TOOL GRID
   ============================================= */
.tools-section {
    background:#fff; margin:0 30px;
    border-radius:4px; box-shadow:0 2px 12px rgba(0,0,0,0.1);
    position:relative; top:-22px;
}
.tools-grid { display:grid; grid-template-columns:repeat(4,1fr); }
.tool-item {
    display:flex; flex-direction:column; align-items:flex-start;
    padding:40px 30px 40px 36px;
    border-right:1px solid #e8e8e8;
    border-bottom:1px solid #e8e8e8;
    text-decoration:none; color:inherit;
    transition:background 0.2s;
}
.tool-item:hover { background:#fffbf5; }
.tool-item:nth-child(4n)       { border-right:none; }
.tool-item:nth-last-child(-n+4){ border-bottom:none; }
.tool-icon-wrap { width:90px; height:90px; display:flex; align-items:center; justify-content:center; margin-bottom:18px; }
.tool-icon-wrap svg { width:90px; height:90px; }
.tool-label { font-size:18px; font-weight:400; color:#333; }

/* =============================================
   CONTENT
   ============================================= */
.content-wrap { max-width:1100px; margin:30px auto; padding:0 20px; }
.card { background:#fff; border:1px solid #e0e0e0; padding:22px 24px; margin-bottom:18px; border-radius:4px; }
.card h2 { font-size:17px; font-weight:700; color:#333; border-left:4px solid #f90; padding-left:11px; margin-bottom:12px; }
.card p  { font-size:13.5px; line-height:1.8; color:#555; margin-bottom:10px; }
.card p:last-child { margin-bottom:0; }
.card a  { color:#f90; font-weight:600; }
.grid3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; margin-bottom:18px; }
.g3card { background:#fff; border:1px solid #e0e0e0; padding:16px; border-radius:4px; }
.g3card h3 { font-size:13.5px; font-weight:700; color:#f90; margin-bottom:8px; padding-bottom:7px; border-bottom:1px solid #eee; }
.g3card p  { font-size:12.5px; line-height:1.7; color:#555; }
.faq-item { border-bottom:1px solid #eee; padding:11px 0; }
.faq-item:last-child { border-bottom:none; }
.faq-q { font-weight:700; font-size:13px; color:#333; margin-bottom:5px; }
.faq-q::before { content:"Q. "; color:#f90; }
.faq-a { font-size:12.5px; color:#555; line-height:1.7; }
.faq-a::before { content:"A. "; font-weight:700; }
.testi { border-left:4px solid #f90; background:#fffbf4; padding:11px 15px; margin-bottom:10px; border-radius:0 4px 4px 0; font-size:13px; color:#555; line-height:1.7; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb { background:#f9f9f9; border-bottom:1px solid #eee; padding:7px 0; font-size:12px; }
.breadcrumb .wrap { max-width:1100px; margin:0 auto; padding:0 20px; display:flex; gap:6px; align-items:center; }
.breadcrumb a { color:#f90; }
.breadcrumb span { color:#999; }

/* =============================================
   AD ZONES
   ============================================= */
.ad-zone { background:#fff; border:1px dashed #ddd; min-height:90px; display:flex; align-items:center; justify-content:center; color:#ccc; font-size:11.5px; border-radius:4px; margin:14px 0; text-align:center; padding:10px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background:#2d2d2d; color:#ccc; padding:28px 20px 0; margin-top:20px; }
.footer-grid { max-width:1100px; margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:24px; font-size:12.5px; padding-bottom:22px; }
.fcol h4 { font-size:13px; font-weight:700; color:#f90; margin-bottom:11px; padding-bottom:7px; border-bottom:1px solid #444; }
.fcol p  { line-height:1.75; margin-bottom:7px; }
.fcol ul { list-style:none !important; margin:0; padding:0; }
.fcol ul li { list-style:none !important; padding:3px 0; }
.fcol ul li a { color:#ccc; }
.fcol ul li a:hover { color:#f90; }
/* WordPress wp_nav_menu footer output */
.fcol ul.menu { list-style:none !important; margin:0; padding:0; }
.fcol ul.menu li { list-style:none !important; padding:3px 0; }
.fcol ul.menu li a { color:#ccc; font-size:12.5px; }
.fcol ul.menu li a:hover { color:#f90; }
.footer-social { display:flex; gap:7px; margin-top:12px; }
.footer-social a { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }
.footer-bottom { background:#1a1a1a; color:#888; text-align:center; padding:11px 20px; font-size:11.5px; border-top:1px solid #3a3a3a; }
.footer-bottom a { color:#999; }
.footer-bottom a:hover { color:#f90; }

/* =============================================
   MOBILE — max 900px
   ============================================= */
@media (max-width:900px) {

    /* Show hamburger */
    .nav-toggle { display:flex !important; align-items:center; }

    /* Hide full menu by default — show when .tb-menu-open added by JS */
    #main-nav ul.nav-menu {
        display:none !important;
        flex-direction:column !important;
        background:#444;
        width:100%;
    }
    #main-nav ul.nav-menu.tb-menu-open {
        display:flex !important;
    }

    .nav-inner { flex-wrap:wrap; }

    /* Top links on mobile */
    #main-nav ul.nav-menu > li > a {
        padding:12px 16px;
        border-bottom:1px solid rgba(255,255,255,0.07);
        width:100%;
    }

    /* Dropdown on mobile — OVERRIDE the :hover */
    #main-nav ul.nav-menu > li:hover > ul.sub-menu {
        display:none !important;  /* disable CSS hover on mobile */
    }

    /* Show only when JS adds .tb-open to the parent li */
    #main-nav ul.nav-menu > li.tb-open > ul.sub-menu {
        display:block !important;
        position:static !important;
        box-shadow:none !important;
        border:none !important;
        border-left:3px solid #f90 !important;
        border-top:none !important;
        border-radius:0 !important;
        background:#3a3a3a !important;
        min-width:0;
        margin-left:16px;
        padding:0;
        animation:none !important;
    }
    #main-nav ul.nav-menu > li.tb-open > ul.sub-menu > li > a {
        color:#ddd !important;
        padding:9px 16px !important;
        border-bottom:1px solid rgba(255,255,255,0.05) !important;
        background:transparent !important;
    }
    #main-nav ul.nav-menu > li.tb-open > ul.sub-menu > li > a:hover {
        color:#f90 !important;
        background:rgba(255,255,255,0.05) !important;
        padding-left:22px !important;
    }

    /* Layout fixes */
    .site-header { flex-direction:column; align-items:center; text-align:center; }
    .header-right { align-items:center; }
    .header-top-row { flex-wrap:wrap; justify-content:center; }
    .hdr-search input { width:130px; }
    .hero h1 { font-size:22px; }
    .hero p  { font-size:13px; }
    .tools-section { margin:0 8px; }
    .tools-grid { grid-template-columns:repeat(2,1fr); }
    .tool-item { padding:28px 16px; align-items:center; text-align:center; }
    .tool-item:nth-child(4n)       { border-right:1px solid #e8e8e8; }
    .tool-item:nth-child(2n)       { border-right:none; }
    .tool-item:nth-last-child(-n+4){ border-bottom:1px solid #e8e8e8; }
    .tool-item:nth-last-child(-n+2){ border-bottom:none; }
    .tool-icon-wrap { width:70px; height:70px; }
    .tool-icon-wrap svg { width:70px; height:70px; }
    .tool-label { font-size:15px; }
    .grid3 { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width:480px) {
    .hero h1 { font-size:18px; }
    .logo-text .lt,.logo-text .lb { font-size:18px; }
    .logo-icon { width:46px; height:46px; }
    .logo-text { height:46px; }
    .footer-grid { grid-template-columns:1fr; }
    .tool-item { padding:20px 8px; }
    .tool-icon-wrap { width:56px; height:56px; }
    .tool-icon-wrap svg { width:56px; height:56px; }
    .tool-label { font-size:13px; }
}

/* =============================================
   AD ZONES — Top Bar & Bottom Popup
   ============================================= */

/* Bottom Popup Ad */
.tb-bottom-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 2px solid #f90;
    box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 10px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.tb-bottom-ad.tb-ad-visible {
    transform: translateY(0);
}
.tb-bottom-ad.tb-ad-hidden {
    transform: translateY(100%);
}
.tb-bottom-ad-close {
    background: #f90;
    border: none;
    color: #fff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.tb-bottom-ad-close:hover {
    background: #e08800;
    transform: scale(1.1);
}
.tb-bottom-ad-content {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}
.tb-bottom-ad-content .ad-zone {
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .ad-zone-top-bar { padding: 6px 0; min-height: 50px; }
    .tb-bottom-ad { padding: 6px 0 8px; }
    .tb-bottom-ad-close { width: 32px; height: 32px; font-size: 17px; }
}
