/*
Theme Name: MileMark Directory Theme
Theme URI: https://milemarkmedia.com
Description: Clean, minimal, professional theme for law firm directory sites.
Version: 2.0
Author: MileMark Media
Author URI: https://milemarkmedia.com
License: Proprietary
Text Domain: milemark-theme
*/

/* === RESET === */
*,*::before,*::after{box-sizing:border-box}
body,h1,h2,h3,h4,h5,h6,p,figure{margin:0;padding:0}
img{max-width:100%;height:auto;display:block}
a{text-decoration:none;color:inherit}

/* === COLOR SCHEMES === */
:root,body.mm-scheme-deep-blue{
    --hd:#0f1e3d;--hd-t:#fff;--hd-h:#3b82f6;
    --ac:#1e40af;--ac2:#1d4ed8;--ac-l:#dbeafe;
    --bg:#f8f9fb;--card:#fff;
    --tx:#1a1a2e;--tx2:#4b5563;--mu:#9ca3af;--bd:#e5e7eb;
    --ft:#0f1e3d;--ft-t:#94a3b8;
    --lk:#1e40af;--hc:#0f1e3d;
    --fh:'Merriweather',Georgia,serif;
    --fb:'Inter',-apple-system,BlinkMacSystemFont,sans-serif;
    --tex:url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
body.mm-scheme-crimson-navy{
    --hd:#1a1a2e;--hd-t:#fff;--hd-h:#dc2626;
    --ac:#b91c1c;--ac2:#dc2626;--ac-l:#fde8e8;
    --bg:#fafafa;--card:#fff;
    --tx:#1a1a2e;--tx2:#4b5563;--mu:#9ca3af;--bd:#e5e7eb;
    --ft:#1a1a2e;--ft-t:#94a3b8;
    --lk:#b91c1c;--hc:#1a1a2e;
    --fh:'Libre Baskerville',Georgia,serif;
    --fb:'Source Sans 3',-apple-system,BlinkMacSystemFont,sans-serif;
    --tex:url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.03'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3Ccircle cx='13' cy='13' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
body.mm-scheme-charcoal-teal{
    --hd:#1e293b;--hd-t:#fff;--hd-h:#14b8a6;
    --ac:#0d9488;--ac2:#14b8a6;--ac-l:#ccfbf1;
    --bg:#f8fafc;--card:#fff;
    --tx:#1e293b;--tx2:#475569;--mu:#94a3b8;--bd:#e2e8f0;
    --ft:#0f172a;--ft-t:#94a3b8;
    --lk:#0d9488;--hc:#1e293b;
    --fh:'Playfair Display',Georgia,serif;
    --fb:'DM Sans',-apple-system,BlinkMacSystemFont,sans-serif;
    --tex:url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.025'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
body.mm-scheme-slate-gold{
    --hd:#1c1c28;--hd-t:#fff;--hd-h:#d4a44c;
    --ac:#b8860b;--ac2:#d4a44c;--ac-l:#fef3c7;
    --bg:#fafaf8;--card:#fff;
    --tx:#1c1c28;--tx2:#4a4a5a;--mu:#9ca3af;--bd:#e5e5dc;
    --ft:#1c1c28;--ft-t:#94a3b8;
    --lk:#b8860b;--hc:#1c1c28;
    --fh:'Cormorant Garamond',Georgia,serif;
    --fb:'Raleway',-apple-system,BlinkMacSystemFont,sans-serif;
    --tex:url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7z' fill='%23fff' fill-opacity='.02'/%3E%3C/svg%3E");
}

/* === TYPOGRAPHY === */
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{font-family:var(--fb);font-size:17px;line-height:1.7;color:var(--tx);background:var(--bg);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,h5,h6{font-family:var(--fh);color:var(--hc);line-height:1.3;font-weight:700}
h1{font-size:2.2em;margin-bottom:.5em}
h2{font-size:1.6em;margin-bottom:.4em}
h3{font-size:1.3em;margin-bottom:.3em}
p{margin-bottom:1em;color:var(--tx2)}
a{color:var(--lk);transition:color .2s}
a:hover{color:var(--ac2)}
blockquote{border-left:4px solid var(--ac);padding:1em 1.5em;margin:1.5em 0;background:var(--ac-l);border-radius:0 6px 6px 0;font-style:italic}
.entry-content ul,.entry-content ol{margin:0 0 1em 1.5em;list-style:revert;padding:0}
.entry-content li{margin-bottom:.3em;list-style:inherit}

/* === LAYOUT === */
.mm-site-container{min-height:100vh;display:flex;flex-direction:column}
.mm-content-area{flex:1;width:100%;max-width:1320px;margin:0 auto;padding:40px 32px 60px}

/* === HEADER === */
.mm-header{
    background:var(--hd);background-image:var(--tex);
    border-bottom:3px solid var(--ac);
    position:sticky;top:0;z-index:1000;
}
.mm-header-inner{
    max-width:1320px;margin:0 auto;padding:0 32px;
    display:flex;align-items:center;height:72px;
}

/* Logo */
.mm-logo{display:flex;align-items:center;gap:12px;color:var(--hd-t);font-weight:700;font-size:1.15em;flex-shrink:0;margin-right:auto}
.mm-logo img{height:56px;width:auto}
.mm-logo:hover{color:var(--hd-t)}

/* === DESKTOP NAV === */
nav.mm-nav{display:block}
ul.mm-menu{display:flex;list-style:none;margin:0;padding:0;align-items:stretch}
ul.mm-menu > li{position:relative;display:flex;align-items:stretch}
ul.mm-menu > li > a{
    display:flex;align-items:center;
    color:var(--hd-t);padding:0 18px;height:72px;
    font-size:.92em;font-weight:500;letter-spacing:.02em;
    border-bottom:2px solid transparent;
    transition:color .2s,border-color .2s;white-space:nowrap;
}
ul.mm-menu > li > a:hover,
ul.mm-menu > li.current-menu-item > a,
ul.mm-menu > li.current_page_item > a{
    color:var(--hd-h);border-bottom-color:var(--hd-h);
}
/* Dropdown arrow */
ul.mm-menu > li.menu-item-has-children > a::after,
ul.mm-menu > li.page_item_has_children > a::after{
    content:'';display:inline-block;width:0;height:0;
    margin-left:6px;border-left:4px solid transparent;
    border-right:4px solid transparent;border-top:4px solid currentColor;
}

/* === DROPDOWN === */
ul.mm-menu > li > .sub-menu,
ul.mm-menu > li > .children{
    display:none;position:absolute;top:100%;left:0;
    background:var(--hd);background-image:var(--tex);
    list-style:none;margin:0;padding:8px 0;min-width:220px;
    border-radius:0 0 6px 6px;box-shadow:0 8px 24px rgba(0,0,0,.25);
    border-top:2px solid var(--ac);z-index:100;
}
ul.mm-menu > li:hover > .sub-menu,
ul.mm-menu > li:hover > .children{display:block}
ul.mm-menu .sub-menu li,
ul.mm-menu .children li{display:block}
ul.mm-menu .sub-menu a,
ul.mm-menu .children a{
    display:block;padding:10px 20px;color:var(--hd-t);
    font-size:.88em;white-space:nowrap;transition:background .15s,color .15s;
}
ul.mm-menu .sub-menu a:hover,
ul.mm-menu .children a:hover{background:rgba(255,255,255,.08);color:var(--hd-h)}

/* === HAMBURGER (hidden on desktop) === */
.mm-hamburger{
    display:none;background:none;border:none;cursor:pointer;
    padding:10px;margin-left:16px;position:relative;
    width:36px;height:36px;
}
.mm-hamburger span{
    display:block;width:22px;height:2px;background:var(--hd-t);
    position:absolute;left:7px;transition:all .3s;
}
.mm-hamburger span:nth-child(1){top:10px}
.mm-hamburger span:nth-child(2){top:17px}
.mm-hamburger span:nth-child(3){top:24px}
.mm-hamburger.is-active span:nth-child(1){top:17px;transform:rotate(45deg)}
.mm-hamburger.is-active span:nth-child(2){opacity:0}
.mm-hamburger.is-active span:nth-child(3){top:17px;transform:rotate(-45deg)}

/* === MOBILE NAV === */
@media(max-width:768px){
    .mm-hamburger{display:block}
    
    nav.mm-nav{
        display:none;position:absolute;top:72px;left:0;right:0;
        background:var(--hd);background-image:var(--tex);
        box-shadow:0 8px 24px rgba(0,0,0,.2);
        max-height:calc(100vh - 72px);overflow-y:auto;
        z-index:999;
    }
    nav.mm-nav.is-open{display:block}
    
    ul.mm-menu{flex-direction:column;padding:8px 0}
    ul.mm-menu > li{display:block}
    ul.mm-menu > li > a{
        height:auto;padding:14px 32px;
        border-bottom:none;font-size:1em;
    }
    
    /* Sub-menu hidden by default on mobile, toggle via JS */
    ul.mm-menu > li > .sub-menu,
    ul.mm-menu > li > .children{
        display:none;position:static;
        box-shadow:none;border-top:none;border-radius:0;
        min-width:0;padding:0;background:rgba(0,0,0,.15);
    }
    ul.mm-menu > li.sub-open > .sub-menu,
    ul.mm-menu > li.sub-open > .children{display:block}
    ul.mm-menu > li:hover > .sub-menu,
    ul.mm-menu > li:hover > .children{display:none}
    ul.mm-menu > li.sub-open:hover > .sub-menu,
    ul.mm-menu > li.sub-open:hover > .children{display:block}
    
    ul.mm-menu .sub-menu a,
    ul.mm-menu .children a{padding:12px 48px;font-size:.9em}
    
    /* Arrow rotates when open */
    ul.mm-menu > li.menu-item-has-children > a::after{
        transition:transform .2s;float:right;margin-top:2px;
    }
    ul.mm-menu > li.sub-open > a::after{transform:rotate(180deg)}
    
    /* Prevent body scroll when nav open */
    body.mm-nav-open{overflow:hidden}
}

/* === FOOTER === */
.mm-footer{
    background:var(--ft);background-image:var(--tex);
    color:var(--ft-t);padding:32px;font-size:.88em;margin-top:auto;
}
.mm-footer-inner{max-width:1320px;margin:0 auto;text-align:center}
.mm-footer a{color:var(--ft-t);transition:color .2s}
.mm-footer a:hover{color:#fff}

/* === BLOG === */
.mm-post-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:28px}
.mm-post-card{
    background:var(--card);border-radius:8px;border:1px solid var(--bd);
    overflow:hidden;transition:box-shadow .25s,transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.mm-post-card:hover{box-shadow:0 12px 32px rgba(0,0,0,.1);transform:translateY(-3px)}
.mm-post-card img{width:100%;height:200px;object-fit:cover}
.mm-post-card-body{padding:24px}
.mm-post-card-body h2{font-size:1.15em;margin-bottom:.4em}
.mm-post-card-body h2 a{color:var(--hc)}
.mm-post-card-body h2 a:hover{color:var(--ac)}
.mm-post-meta{font-size:.82em;color:var(--mu);margin-bottom:.6em}

/* Single */
.mm-single-post{max-width:800px;margin:0 auto}
.mm-single-post h1{margin-bottom:.3em}
.mm-single-post .mm-post-meta{margin-bottom:1.5em}
.mm-single-post .entry-content{line-height:1.8}
.mm-single-post .entry-content h2{margin-top:2em}
.mm-single-post img{border-radius:6px;margin:1.5em 0}

/* Page */
.mm-page-content{max-width:900px;margin:0 auto}
.mm-page-content.mm-full-width{max-width:100%}

/* Pagination */
.mm-pagination{display:flex;justify-content:center;gap:6px;margin:40px 0 20px;flex-wrap:wrap}
.mm-pagination a,.mm-pagination span{
    padding:8px 14px;border:1px solid var(--bd);border-radius:6px;
    font-size:.9em;font-weight:500;color:var(--tx2);transition:all .2s;
}
.mm-pagination a:hover{border-color:var(--ac);color:var(--ac)}
.mm-pagination .current{background:var(--ac);color:#fff;border-color:var(--ac)}

/* Utility */
.mm-btn{
    display:inline-block;padding:10px 24px;background:var(--ac);color:#fff;
    border-radius:6px;font-weight:600;font-size:.92em;transition:background .2s;border:none;cursor:pointer;
}
.mm-btn:hover{background:var(--ac2);color:#fff}

/* === DIRECTORY FULL WIDTH === */
body.post-type-archive-mm_listing .mm-content-area,
body.tax-mm_category .mm-content-area,
body.single-mm_listing .mm-content-area{max-width:100%;padding:0}

/* === RESPONSIVE === */
@media(max-width:600px){
    .mm-content-area{padding:24px 16px 40px}
    h1{font-size:1.7em}h2{font-size:1.3em}
    .mm-post-list{grid-template-columns:1fr}
    .mm-header-inner{padding:0 16px}
}
@media(max-width:480px){
    body{font-size:16px}
    h1{font-size:1.5em}
    .mm-btn{padding:12px 20px;width:100%;text-align:center}
}
