/*
Theme Name: Clear Shores
Description: A custom Tailwind CSS theme for Clear Shores MN.
Author: Custom Theme Builder
Version: 1.0.1
Text Domain: gopherstate
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
}

/* Gs_Map module — fill the parent wrapper */
.gs-map-frame,
.gs-map-frame .gs-map-canvas,
.gs-map-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
}
.gs-map-empty {
    background: #1f2937;
}

/* ── Article content typography ─────────────────────────────────────────────
   Styles core WP block text (headings, paragraphs, lists, etc.) inside
   gs-article-content.  Excludes elements inside .gs-block so all custom
   blocks (both section and sidebar) keep their own styling untouched.
   :where() keeps specificity at 0 so block-level utility classes always win.
   ────────────────────────────────────────────────────────────────────────── */

.gs-article-content :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, figure, hr):not(.gs-block *) {
    margin-block: 1.25em;
    line-height: 1.7;
}

.gs-article-content :where(h2):not(.gs-block *) {
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #111827;
    margin-block: 2em 0.75em;
    border-left: 4px solid #1a80b6;
    padding-left: 0.75rem;
}

.gs-article-content :where(h3):not(.gs-block *) {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-block: 1.75em 0.5em;
}

.gs-article-content :where(h4):not(.gs-block *) {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-block: 1.5em 0.5em;
}

.gs-article-content :where(p, li):not(.gs-block *) {
    font-size: 1.0625rem;
}

.gs-article-content :where(ul, ol):not(.gs-block *) {
    padding-left: 1.5rem;
}

.gs-article-content :where(ul):not(.gs-block *) { list-style: disc; }
.gs-article-content :where(ol):not(.gs-block *) { list-style: decimal; }

.gs-article-content :where(li):not(.gs-block *) {
    margin-block: 0.5em;
}

.gs-article-content :where(a):not(.gs-block *) {
    color: #1a80b6;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gs-article-content :where(strong, b):not(.gs-block *) {
    color: #111827;
    font-weight: 700;
}

.gs-article-content :where(blockquote):not(.gs-block *) {
    border-left: 4px solid #1a80b6;
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
}

/* First/last text element doesn't double-pad against section spacing */
.gs-article-content > :first-child { margin-top: 0; }
.gs-article-content > :last-child  { margin-bottom: 0; }

/* Custom Logo */
.custom-logo-link img.custom-logo {
    max-height: 70px;
    width: auto;
    display: block;
}

/* Sidebar Widgets — base styles for dynamically added widgets */
.gs-widget { margin-bottom: 0; }

.gs-widget p {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.gs-widget a {
    color: #374151;
    text-decoration: none;
    transition: color 0.15s;
}

.gs-widget a:hover { color: #1a80b6; }

.gs-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gs-widget ul li a {
    font-weight: 600;
    font-size: 0.875rem;
}

/* The Comparison Slider Styles */
.comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    touch-action: none;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.image-after {
    z-index: 20;
    clip-path: inset(0 50% 0 0); 
    will-change: clip-path;
}

.slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: white;
    z-index: 25;
    pointer-events: none;
    will-change: left;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: #1a80b6;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: grab;
}

.slider-handle:active {
    cursor: grabbing;
    background-color: #0f5f88;
}

.slider-handle i {
    color: white;
    font-size: 14px;
}

.label-badge {
    position: absolute;
    bottom: 20px;
    background-color: rgba(26, 128, 182, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 25;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Primary Nav Dropdowns ─────────────────────────────────────────────────── */

/* Parent item — anchor for the absolute sub-menu */
header nav .menu-item-has-children {
    position: relative;
}

/* Chevron indicator after parent link */
header nav .menu-item-has-children > a::after {
    content: '\f078'; /* fa-chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.5rem;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

header nav .menu-item-has-children:hover > a::after,
header nav .menu-item-has-children:focus-within > a::after {
    transform: rotate(180deg);
}

/* Sub-menu panel — hidden by default */
header nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border-top: 3px solid #1a80b6;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    z-index: 200;
    padding: 6px 0;
    list-style: none;
    margin: 0;

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;

    /* Override any conflicting flex from .gs-widget ul */
    display: block !important;
    flex-direction: unset;
    gap: unset;
}

/* Invisible bridge so mouse can travel from parent to sub-menu without closing */
header nav .sub-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

/* Visible on hover or keyboard focus-within */
header nav .menu-item-has-children:hover > .sub-menu,
header nav .menu-item-has-children:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Sub-menu items */
header nav .sub-menu li {
    display: block;
    padding: 0;
    margin: 0;
}

header nav .sub-menu li a {
    display: block;
    padding: 9px 18px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s, padding-left 0.15s;
    border-left: 3px solid transparent;
}

header nav .sub-menu li a:hover {
    background-color: #fef2f2;
    color: #1a80b6;
    border-left-color: #1a80b6;
    padding-left: 21px;
}

/* ── Block alignment widths ────────────────────────────────────────────────
   Default: direct children of gs-article-content get 1280px (max-w-7xl),
   matching the theme's standard container width across all templates.
   Custom section blocks tagged .gs-full-section break out to full viewport
   so their colored backgrounds span edge-to-edge.
   ────────────────────────────────────────────────────────────────────────── */

.gs-article-content > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.gs-article-content > .gs-full-section {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.gs-article-content > .alignleft  { float: left;  margin-right: 1.5rem; }
.gs-article-content > .alignright { float: right; margin-left: 1.5rem; }

.gs-article-content .size-full {
    height: auto;
}
