/* ==========================================================================
   Pat Carroll Woodturning — site overrides on the Progressive template
   Cybersalt 2026-07-31, revised 2026-08-10 after the 6.1.2.8 template update.

   ⚠️ LOADED FROM THE TEMPLATE STYLE'S `headcode` PARAM (database), NOT index.php.
   The 6.1.2.8 update overwrote index.php and silently unhooked this file, which
   dropped every override at once. headcode lives in `#__template_styles`, so a
   template file update cannot detach it again. Do not re-add the <link> to
   index.php — it would then load twice.

   Colours here are MEASURED from the Joomla 3 site (j3.patcarrollwoodturning.com),
   not eyeballed:  menu bar #474747 · menu links #FFFFFF Lato 14px Title Case ·
   body text #2A363B Raleway · headings #2A363B Lato.
   ========================================================================== */

/* --- Masthead ---------------------------------------------------------------
   #474747 is the old site's measured bar colour. The template paints #top from
   the topBG param, but the fixed .navbar-fixed-top wrapper sits above it and
   ships white, so both still need setting.
   (#top-com-handler was in this rule until 2026-10-26. It is NOT the navbar:
   see "System messages" at the end of this file.) */
#top, .navbar-fixed-top:not(#top-com-handler),
#top .container {
    background-color: #474747 !important;
    border-bottom: 0;
}
#top-nav-line { background-color: #3A3A3A !important; }
#top { border-bottom: 1px solid #565656; }

/* The template's decorative "site name underline" carries the topborders param
   (#c84646) on its right edge, which painted a red bar next to the menu. The
   old site has no red anywhere — hide it. */
.sn-underline { display: none !important; }

/* site name + slogan, light on the dark bar.
   NOTE: the old J3 header had NO site name at all; it is a Progressive feature.
   Tim asked for it to be made legible rather than removed, so it stays. */
#sn-position #h1, #sn-position #h1 a {
    color: #FFFFFF !important;
    font-family: 'Lato', Georgia, serif;
    letter-spacing: .4px;
    white-space: nowrap;
}
#sn-position #h2 {
    color: #C4C4C4 !important;
    font-family: 'Raleway', Arial, sans-serif;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Navigation -------------------------------------------------------------
   Pat has 14 top-level items where the demo has 3. The old site ran 14px Lato in
   Title Case and wrapped to two rows; match that rather than the uppercase
   treatment, and give the unlinked separator items ("Meet the Woodturner",
   "Shop", "Links") the same styling as real links so the bar reads as one unit.
   Without this they inherit body colour and render near-black on the dark bar. */
#menu .menu-nav > li > a,
#menu .menu-nav > li > span.separator {
    display: block;
    padding: 0 9px;
    font-size: 13px;
    line-height: 38px;
    letter-spacing: 0;
    font-family: 'Lato', Arial, sans-serif;
    font-weight: 400;
    text-transform: none;
    color: #FFFFFF !important;
    cursor: pointer;
}
#menu .menu-nav > li { margin: 0; }
#menu .menu-nav > li > a:hover,
#menu .menu-nav > li:hover > span.separator,
#menu .menu-nav > li.current > a,
#menu .menu-nav > li.active > a { color: #57BCE0 !important; }

/* dropdowns on the dark bar */
#menu .menu-nav li ul { background-color: #474747 !important; border-color: #5A5A5A !important; }
#menu .menu-nav li ul li a { color: #F0F0F0 !important; font-size: 13px; text-transform: none; }
#menu .menu-nav li ul li a:hover { color: #57BCE0 !important; background-color: #3A3A3A !important; }

/* --- Typography -------------------------------------------------------------
   Old site pairs Raleway (body) with Lato (headings). Measured, matches. */
body, p, li, td, .item-page { font-family: 'Raleway', Arial, sans-serif; }
h1, h2, h3, h4, h5, .contentheading, .componentheading, .page-header {
    font-family: 'Lato', Georgia, serif; font-weight: 400; color: #2A363B;
}
body { color: #2A363B; }
a { color: #027EA6; }
a:hover { color: #689332; }
#main-content-handler { padding-top: 30px; padding-bottom: 40px; }

/* --- Hero -------------------------------------------------------------------
   Full-bleed, and kill the stock grey scrim that was washing the photograph. */
#slideshow-handler, #slideshow-handler-bg { width: 100%; max-width: none; padding: 0; }
#shad { display: none !important; }
.camera_caption > div {
    background: rgba(0,0,0,.42) !important;
    padding: 12px 26px;
    font-family: 'Lato', Georgia, serif;
    letter-spacing: .5px;
}

/* --- top-long: the 332 IRD / Meet-the-Woodturner video modules --------------
   One custom module per recording lands here. Separate them with a hairline
   rather than 332 heavy boxes. */
#main-content-handler .moduletable { margin-bottom: 22px; }
#main-content-handler .moduletable + .moduletable {
    border-top: 1px solid #ECECEC; padding-top: 22px;
}

/* --- Footer ----------------------------------------------------------------- */
#footer, #footer-line, #bottom-long {
    background-color: #474747 !important; color: #D0D0D0;
}
#footer a, #footer-line a { color: #57BCE0; }

/* --- Fit the brand block beside a 14-item menu -----------------------------
   The 26% / 72% width overrides that used to live here were a workaround from
   when the template ABSOLUTELY positioned #h1/#h2, letting them overflow their
   column and collide with the first menu item. Template 6.1.2.12 returns both to
   normal flow and stacks them, so the workaround is obsolete - and it had become
   the bug: 26% + 72% + the grid's 30px gutter = 1176px inside a 1170px row, six
   pixels over, so the menu wrapped onto its own line BELOW the site name.
   Removed 2026-08-11. The template's own col-md-3 + col-md-9 (270 + 30 + 870 =
   exactly 1170) puts the menu back on the same level as the name and slogan.
   The `top`/`left` offsets are gone for the same reason - inert once #h1/#h2 are
   static. Only the type sizes are kept: they still earn their keep against a
   14-item menu. */
#sn-position #h1 {
    font-size: 21px !important;
    max-width: 300px;
    overflow: hidden;
}
#sn-position #h2 {
    font-size: 8.5px !important;
    max-width: 300px;
}

/* --- Hero: genuinely edge to edge ------------------------------------------ */
#slideshow-handler-bg, #slideshow-handler,
#slideshow-handler .container, #slideshow-handler .row-fluid,
#slideshow-handler [class*="span"] {
    width: 100% !important; max-width: none !important;
    margin-left: 0 !important; margin-right: 0 !important; padding: 0 !important;
}
.camera_wrap, .camera_src, .camera_target_content { width: 100% !important; }

/* --- System messages (Cybersalt 2026-10-26) -----------------------------------
   #top-com-handler is the template's MESSAGE bar. index.php only renders it when
   Joomla has a message (login failed, "You don't have permission", saved...),
   as a fixed bar on top of the header. Until today the masthead rule above
   painted it #474747, so every message showed as a blank grey box covering the
   logo and menu (reported by Pat 2026-10-26 when logging in as a customer).
   Show it as a readable notice floating near the bottom of the screen instead,
   so it never hides the header. */
#top-com-handler {
    position: fixed !important;
    top: auto !important;
    bottom: 24px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: 92%;
    min-height: 0;
    background: transparent !important;
    z-index: 2000;
}
#top-com-handler > .alert {
    opacity: 1 !important; /* Bootstrap 2 "fade in" markup; BS5 keeps .fade at 0 without .show */
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}
#top-com-handler > .alert > button.close { display: none; }
#top-com-handler joomla-alert {
    margin: 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
}

/* --- Desktop header (Tim, 2026-10-27) -----------------------------------------
   The template pads the menu down by (topheight - 66) = 38px, which drops it
   below the logo line. Not needed on desktop: keep the menu level with the logo.
   #top-handler adds specificity, because the template prints its rule inline
   after this file. */
@media (min-width: 980px) {
    #top-handler #menu-handler, #top-handler #top-nav-handler { padding-top: 0; }
}

/* Cybersalt 2026-11-02 cs-empty-modrow-collapse-nonavline: the bridge pulls an empty
   #top-modules1 up 76px (CS-PATCH cs-empty-modrow-collapse, 2026-07-30) assuming the
   breadcrumb bar #nav-line and its 100px bottom margin sit above it. This site has no
   #nav-line, so the pull slid every page's content (and title) under the fixed menu bar.
   Keep the collapse only where #nav-line exists. */
body:not(:has(#nav-line)) #top-modules1:not(:has(*)) { margin-top: 0 !important; }

/* Cybersalt 2026-11-02: Dragon Fly picture at the top of the Urns page (article 2472, Pat asked).
   Floated right on desktop by its inline style; on phones centre it above the text. */
@media (max-width: 767px) {
  img.cs-urn-hero { float: none !important; display: block; width: 100% !important; max-width: 300px !important; height: auto !important; margin: 0 auto 20px !important; }
}
