/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for better mobile UX */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* Let gallery images stretch to fill their container (needed for zoom effect) */
.wp-block-gallery img {
    height: 100% !important;
    object-fit: cover !important;
}
a {
    color: #0074a2;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0, 116, 162, 0.2); /* iOS tap feedback */
}
a:hover,
a:active {
    color: #0074a2;
    text-decoration: underline;
}

/* Phone links - Make them stand out on mobile */
a[href^="tel:"] {
    color: #b22222;
    font-weight: 600;
    white-space: nowrap;
}

/* Better touch targets for mobile - minimum 44x44px */
@media (max-width: 768px) {
    a[href^="tel:"],
    a[href^="mailto:"],
    .menu-item a,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 16px;
    }
}
/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}
/* Mobile Menu */
#mobile-menu {
    display: none;
    background: #333;
    color: #fff;
    z-index: 999;
    position: relative;
}

/* Hamburger toggle button */
#nav-toggle {
    display: none;
    background: #333;
    padding: 20px;
    cursor: pointer;
    min-height: 60px;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    user-select: none;
    position: relative;
    z-index: 1000;
    width: 100%;
}

/* Hamburger icon - 3 lines */
#nav-toggle .toggle {
    width: 30px;
    height: 3px;
    background: #fff;
    display: block;
    position: relative;
    transition: background 0.3s ease;
}

#nav-toggle .toggle::before,
#nav-toggle .toggle::after {
    content: '';
    width: 30px;
    height: 3px;
    background: #fff;
    display: block;
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

#nav-toggle .toggle::before {
    top: -10px;
}

#nav-toggle .toggle::after {
    bottom: -10px;
}

/* Animate hamburger to X when open */
#nav-toggle.open .toggle {
    background: transparent;
}

#nav-toggle.open .toggle::before {
    top: 0;
    transform: rotate(45deg);
}

#nav-toggle.open .toggle::after {
    bottom: 0;
    transform: rotate(-45deg);
}

#nav-toggle:active {
    background: #222;
}

@media screen and (max-width: 768px) {
    #nav-toggle {
        display: block;
    }

    /* Mobile menu hidden by default */
    #mobile-menu {
        display: none;
    }

    /* Show mobile menu when open */
    #mobile-menu.open {
        display: block;
    }

    #site-navigation {
        display: none;
    }
}
/* Header */
.mobile-header {
    display: none;
    background: #333;
    padding: 20px;
    text-align: center;
}
.mobile-header .site-title a {
    color: #fff;
    font-size: 18px;
    text-decoration: none;
}
@media screen and (max-width: 768px) {
    .mobile-header {
        display: block;
    }
}
#masthead {
    background: #333;
    padding: 20px 0;
}
.header-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-branding {
    text-align: center;
    margin-bottom: 20px;
}
.site-branding img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
/* Navigation */
.main-navigation {
    background: #333;
}
.main-navigation .menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}
.main-navigation .menu-item {
    margin: 0;
}
.main-navigation .menu-item a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}
.main-navigation .menu-item a:hover {
    background: #b22222;
    color: #fff;
}
.main-navigation .current-menu-item a {
    background: #b22222;
}
.arrow.genericon {
    display: none;
}
/* Dropdown Menu Styles */
.main-navigation .menu-item {
    position: relative;
}
.main-navigation .menu-item-has-children > a {
    cursor: pointer;
}
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 220px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 10000;
}
.main-navigation .menu-item:hover > .sub-menu,
.main-navigation .menu-item.open > .sub-menu {
    display: block;
}
.main-navigation .sub-menu .menu-item {
    width: 100%;
    position: relative;
}
.main-navigation .sub-menu .menu-item a {
    padding: 12px 20px;
    border-bottom: 1px solid #444;
    display: block;
    white-space: nowrap;
}
.main-navigation .sub-menu .menu-item:last-child a {
    border-bottom: none;
}
.main-navigation .sub-menu .menu-item a:hover {
    background: #b22222;
}
@media screen and (max-width: 768px) {
    .main-navigation .menu {
        flex-direction: column;
    }
    .main-navigation .menu-item {
        width: 100%;
    }
    /* Mobile dropdowns - show on click/tap */
    .main-navigation .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: #222;
    }
    .main-navigation .menu-item:hover > .sub-menu {
        display: none; /* Disable hover on mobile */
    }
    .main-navigation .menu-item.open > .sub-menu {
        display: block;
    }
    .main-navigation .sub-menu .menu-item a {
        padding-left: 40px;
    }
}
/* Mobile Menu Styles */
#mobile-menu .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
#mobile-menu .menu-item {
    border-bottom: 1px solid #555;
}
#mobile-menu .menu-item a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
}
#mobile-menu .menu-item a:hover {
    background: #b22222;
}
/* Mobile Menu Dropdown Styles */
#mobile-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #222;
}
#mobile-menu .menu-item.open > .sub-menu {
    display: block;
}
#mobile-menu .sub-menu .menu-item {
    border-bottom: 1px solid #444;
}
#mobile-menu .sub-menu .menu-item a {
    padding-left: 40px;
    background: #222;
}
#mobile-menu .sub-menu .menu-item a:hover {
    background: #b22222;
}
/* Content Area */
#page-clip {
    overflow-x: hidden;
}
#page-wrap {
    max-width: 100%;
}
#page {
    margin: 0 auto;
}
#content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}
#primary {
    flex: 1 1 70%;
    min-width: 0;
}
#secondary {
    flex: 1 1 25%;
    min-width: 280px;
}
@media screen and (max-width: 968px) {
    #content {
        flex-direction: column;
    }
    #primary,
    #secondary {
        flex: 1 1 100%;
    }
}
/* Entry Header */
.entry-header {
    margin-bottom: 30px;
}
.entry-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    margin-bottom: 20px;
}
/* Entry Content */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
}
.entry-content p {
    margin-bottom: 20px;
}
.entry-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 30px 0 20px;
    color: #b22222;
    border-bottom: 3px solid #b22222;
    padding-bottom: 10px;
}
.entry-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 25px 0 15px;
    color: #8b0000;
    font-style: italic;
}
.entry-content a {
    color: #b22222;
    text-decoration: none;
}
.entry-content a:hover {
    text-decoration: underline;
}
figcaption {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    color: #666;
    font-style: italic;
}
/* Image Blocks */
.wp-block-image {
    margin: 20px 0;
}
.wp-block-image img {
    display: block;
    margin: 0 auto;
}
.wp-block-image.alignleft {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 50%;
}
.wp-block-image.alignleft img {
    height: auto;
}
.wp-block-image.alignright {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 50%;
}
.wp-block-image.alignright img {
    height: auto;
}
/* Floated figures inside wp-block-image */
.wp-block-image figure.alignleft {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 50%;
}
.wp-block-image figure.alignleft img {
    height: auto;
    width: 100%;
}
.wp-block-image figure.alignright {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 50%;
}
.wp-block-image figure.alignright img {
    height: auto;
    width: 100%;
}
.photographer-portrait img {
    width: 257px;
    height: 257px;
    border-radius: 50%;
    margin: 20px auto;
    object-fit: cover;
}
/* Calendly Widget */
.calendly-inline-widget {
    min-width: 320px;
    height: 630px;
    margin: 30px 0;
}
/* Sidebar */
.widget-area {
    font-size: 14px;
}
.widget {
    margin-bottom: 40px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}
.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}
.textwidget blockquote {
    margin: 15px 0;
    padding: 15px 20px;
    background: #fff;
    border-left: 4px solid #0074a2;
    font-style: italic;
    color: #555;
}
.textwidget p {
    margin-bottom: 10px;
}
/* Footer */
.footer-wrap {
    background: #333;
    color: #fff;
    padding: 30px 20px;
    margin-top: 40px;
}
.site-footer {
    max-width: 1240px;
    margin: 0 auto;
    text-align: center;
}
.site-info {
    margin-bottom: 20px;
    font-size: 14px;
    color: #ccc;
}
.site-info a {
    color: #fff;
    text-decoration: none;
}
.site-info a:hover {
    color: #0074a2;
}
.genericon {
    display: inline-block;
}
/* Footer Navigation */
#footer-navigation .menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0;
    margin: 0;
}
#footer-navigation .menu-item a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}
#footer-navigation .menu-item a:hover {
    color: #0074a2;
}
/* Responsive Images */
@media screen and (max-width: 600px) {
    .wp-block-gallery {
        grid-template-columns: 1fr;
    }
    .entry-title {
        font-size: 28px;
    }
    .entry-content h2 {
        font-size: 24px;
    }
    .entry-content h3 {
        font-size: 20px;
    }
    .wp-block-image.alignleft,
    .wp-block-image.alignright,
    .wp-block-image figure.alignleft,
    .wp-block-image figure.alignright {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }

    .wp-block-image figure.alignleft img,
    .wp-block-image figure.alignright img {
        width: 100%;
        height: auto;
    }
}
/* Forms - Mobile Optimized */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    font-size: 16px; /* Prevent iOS zoom on focus */
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 100%;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0074a2;
    outline-offset: 2px;
    border-color: #0074a2;
}

/* Buttons */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
a.button {
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    min-height: 44px; /* Touch target size */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
a.button:hover {
    background: #0074a2;
}

button:active,
input[type="button"]:active,
input[type="reset"]:active,
input[type="submit"]:active,
a.button:active {
    background: #005580;
    transform: scale(0.98); /* Subtle press effect */
}
/* FINAL FINAL FIX – works on your static HTML site */
ul.indented-bullets,
.entry-content ul,
ul:not(.menu) {
    padding-left: 2rem !important;
    margin: 1.2em 0 !important;
    list-style: disc outside !important;
}
ul.indented-bullets ul,
.entry-content ul ul {
    padding-left: 1.5rem !important;
    list-style: circle outside !important;
}
/* CLEAN GALLERY HOVER EFFECT – ONE BLOCK TO RULE THEM ALL */
.wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 30px !important;
    margin: 40px 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.wp-block-gallery figure {
    position: relative !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    transition: all 0.4s ease !important;
    /* Fixed aspect ratio using padding trick (works everywhere, overrides aspect-ratio issues) */
    height: 0 !important;
    padding-bottom: 120% !important; /* Portrait ratio for headshots; change to 100% for square */
}
.wp-block-gallery figure:hover {
    transform: translateY(-12px) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35) !important;
}
.wp-block-gallery img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.8s ease, filter 0.6s ease !important;
}
.wp-block-gallery figure:hover img {
    transform: scale(1.10) !important;
    filter: brightness(1.15) saturate(1.2) !important;
}
/* Hover caption overlay */
.wp-block-gallery figcaption {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%) !important;
    color: #fff !important;
    padding: 50px 20px 20px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    transform: translateY(20px) !important;
    opacity: 0 !important;
    transition: all 0.4s ease !important;
    z-index: 2 !important;
    margin: 0 !important;
    pointer-events: none !important; /* Allows hover on image below */
}
.wp-block-gallery figure:hover figcaption {
    transform: translateY(0) !important;
    opacity: 1 !important;
}
/* Hide default static captions */
.wp-element-caption,
figcaption:not(.wp-block-gallery figcaption) {
    display: none !important;
}
/* PURE CSS LIGHTBOX – CLICK TO ENLARGE */
.gallery-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9999;
    cursor: zoom-out;
    padding: 20px;
    box-sizing: border-box;
}
.gallery-lightbox:target {
    opacity: 1;
    visibility: visible;
}
.gallery-lightbox img {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}
.gallery-lightbox:target img {
    transform: scale(1);
}
/* Optional: nice close "X" button */
.gallery-lightbox::after {
    content: "×";
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 50px;
    color: #fff;
    opacity: 0.7;
    cursor: pointer;
}
/* PURE CSS LIGHTBOX – CLICK ANY GALLERY IMAGE TO ENLARGE */
.gallery-lightbox {
    position: fixed;
    inset: 0; /* top/right/bottom/left = 0 */
    background: rgba(0,0,0,0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}
/* When someone clicks the link → show the lightbox */
.gallery-lightbox:target {
    opacity: 1;
    visibility: visible;
}
/* The enlarged image */
.gallery-lightbox img {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7);
    transform: scale(0.92);
    transition: transform 0.4s ease;
}
.gallery-lightbox:target img {
    transform: scale(1);
}
/* Big white "×" in the top-right corner */
.gallery-lightbox::after {
    content: "×";
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 60px;
    font-weight: 300;
    color: #fff;
    opacity: 0.8;
    line-height: 1;
    pointer-events: none; /* so you can still click the background to close */
    user-select: none;
}
/* Optional: make the whole background clickable to close */
.gallery-lightbox {
    cursor: zoom-out;
}
/* 2-COLUMN RESPONSIVE VIDEO GRID */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two equal columns */
    gap: 30px;
    margin: 50px 0;
}
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
/* Stack vertically on phones/tablets */
@media (max-width: 968px) {
    .video-grid {
        grid-template-columns: 1fr; /* one column */
        gap: 40px;
    }
}

/* === ENHANCED VIDEO OVERLAY FIXES (UPDATED - MORE AGGRESSIVE FOR PERSISTENT ISSUES) === */
/* Ensure content area stays in flow and above videos */
.entry-content,
#main,
#primary {
    position: relative !important;
    z-index: 10 !important;  /* Boost content z-index to layer above any video glitches */
    overflow: visible !important;
}

/* Anti-Overlay Fix: Tame All Videos & Iframes - Even Stronger Overrides */
video,
iframe {
    position: static !important;  /* Static to fully remove from flow issues; use relative if needed for positioning */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;  /* Ultra-low to ensure behind everything */
    max-height: 60vh !important;  /* Strict cap; adjust to 80vh if videos clip */
    max-width: 100% !important;
    width: auto !important;  /* Allow natural sizing */
    height: auto !important;
    display: block !important;
    margin: 20px auto !important;
    transform: none !important;  /* Kill any JS transforms */
    box-shadow: none !important;  /* Prevent shadow overlaps */
}

/* Specific to YouTube & Vimeo Iframes (Target src attributes) */
iframe[src*="youtube.com"],
iframe[src*="vimeo.com"] {
    position: static !important;
    display: block !important;
    margin: 20px 0 !important;  /* Vertical spacing in content */
    border-radius: 8px !important;  /* Soften edges */
}

/* Target Entry Content Iframes Directly (e.g., the YouTube one) */
.entry-content iframe,
.entry-content div iframe {  /* Covers nested ones */
    position: static !important;
    width: 100% !important;
    max-width: 560px !important;  /* Match original width */
    height: 315px !important;  /* Fixed height to prevent stretch/overlay */
    margin: 20px auto !important;
    display: block !important;
}

/* Video Grid Specific Fixes - Ensure Wrappers Have Defined Height & No Overflow */
.video-grid .video-wrapper {
    position: relative !important;
    height: auto !important;  /* Auto to fit content */
    min-height: 200px !important;  /* Prevent collapse */
    overflow: visible !important;  /* Allow scroll if needed */
    z-index: 1 !important;
}

.video-grid .video-wrapper > div[style*="padding"] {  /* Padding trick divs */
    position: relative !important;
    height: 0 !important;
    padding-bottom: 56.25% !important;  /* Lock to 16:9; change to 177.78% for vertical videos */
    width: 100% !important;
}

.video-grid iframe {
    position: absolute !important;  /* Allow absolute only inside wrapper */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;  /* Keep low */
}

/* If a Video is Vertical/Portrait, Adjust Aspect (Add class 'vertical-video' to wrapper if needed) */
.video-wrapper.vertical-video > div[style*="padding"] {
    padding-bottom: 177.78% !important;  /* 9:16 portrait ratio */
}

/* Kill any stuck lightbox/modals that might contain video */
.gallery-lightbox,
.modal,
.popup,
[class*="vimeo-player"],
[class*="youtube-player"] {  /* Target player classes if JS adds them */
    position: static !important;  /* Pull any dynamic players into flow */
    z-index: 1 !important;
    display: block !important;  /* Prevent hidden overlays */
}
.gallery-lightbox:target {
    position: fixed !important;  /* Allow intentional lightbox */
    z-index: 9999 !important;
}

/* Vertical Video Responsive Fix - Updated for Portrait Handling */
@media (min-width: 769px) {  /* Desktop: Constrain tall videos */
    iframe[src*="vimeo.com"],
    iframe[src*="youtube.com"] {
        aspect-ratio: 16/9 !important;  /* Default landscape; override for vertical */
        height: auto !important;
        max-height: 50vh !important;
    }
    .video-grid .video-wrapper {
        aspect-ratio: 16/9 !important;
    }
}

@media (max-width: 768px) {  /* Mobile: Prioritize vertical if needed */
    .video-wrapper,
    .wp-block-video,
    .entry-content iframe {
        position: relative !important;
        height: auto !important;
        max-height: 70vh !important;
        width: 100vw !important;
    }
    iframe {
        object-fit: contain !important;  /* Fit vertical videos fully */
        aspect-ratio: auto !important;  /* Let video dictate */
    }
    .video-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin: 20px 0 !important;
    }
}

/* Additional Safeguards for JS/Video Players */
body > iframe,  /* Top-level iframes */
.entry-content > div > iframe:first-child {  /* First iframe in content divs */
    position: static !important;
    z-index: 1 !important;
    margin-top: 20px !important;  /* Space from header */
}

/* Ensure No Overflow from Page Clip */
#page-clip {
    overflow: visible !important;  /* Temporarily allow y-overflow to debug; revert to hidden if no h-scroll */
}

/* === END ENHANCED VIDEO FIXES === */

/* Left-aligned video containers */
.entry-content iframe {
    display: block;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Centered text under circular portrait */
.photographer-caption-text {
    text-align: center;
    font-size: 16px;
    margin: 15px 0;
    font-weight: 500;
}

/* LIGHTBOX GALLERY STYLES */
.wp-block-gallery figure {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wp-block-gallery figure:hover {
    transform: scale(1.05);
}

/* Lightbox Overlay */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.lightbox-overlay.active {
    display: flex;
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 300;
    line-height: 1;
    z-index: 100000;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: #b22222;
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 20px 25px;
    line-height: 1;
    border-radius: 5px;
    transition: all 0.3s ease;
    z-index: 100000;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #b22222;
    transform: translateY(-50%) scale(1.1);
}

/* Lightbox Caption */
.lightbox-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    max-width: 80%;
    text-align: center;
}

/* Lightbox Navigation Instructions */
.lightbox-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
    opacity: 0.8;
}

/* Mobile Responsiveness for Lightbox */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 15px 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
    }

    .lightbox-caption {
        font-size: 14px;
        bottom: 50px;
    }

    .lightbox-instructions {
        font-size: 11px;
        bottom: 10px;
        padding: 6px 12px;
    }
}

/* === END ENHANCED VIDEO FIXES === */

/* === MOBILE OPTIMIZATION ENHANCEMENTS === */

/* Optimize Calendly widget for mobile */
@media (max-width: 768px) {
    .calendly-inline-widget {
        height: 700px; /* Taller for mobile scroll */
        margin: 20px -20px; /* Full width on mobile */
        min-width: 100%;
    }
}

/* Mobile Content Padding */
@media (max-width: 768px) {
    #content {
        padding: 20px 15px;
    }

    .entry-content {
        font-size: 16px; /* Larger for readability */
        line-height: 1.7;
    }

    /* Larger headings on mobile for better hierarchy */
    .entry-title {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .entry-content h2 {
        font-size: 26px;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .entry-content h3 {
        font-size: 22px;
        margin-top: 25px;
        margin-bottom: 12px;
    }

    /* Better paragraph spacing on mobile */
    .entry-content p {
        margin-bottom: 20px;
    }
}

/* Mobile Sidebar Improvements */
@media (max-width: 968px) {
    .widget {
        padding: 15px;
        margin-bottom: 25px;
    }

    /* Make contact info more prominent on mobile */
    .widget address {
        font-size: 15px;
        line-height: 1.8;
    }

    /* Phone number CTA - Make it a big tap target */
    .widget a[href^="tel:"] {
        display: block;
        background: #b22222;
        color: #fff;
        padding: 15px 20px;
        text-align: center;
        border-radius: 5px;
        margin: 15px 0;
        font-size: 18px;
        font-weight: bold;
        text-decoration: none;
    }

    .widget a[href^="tel:"]:active {
        background: #8b0000;
        transform: scale(0.98);
    }
}

/* Optimize images for mobile viewport - prevent overflow */
@media (max-width: 768px) {
    img {
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .wp-block-image img {
        width: 100%;
    }

    /* Gallery images on mobile */
    .wp-block-gallery {
        margin: 20px 0;
    }

    .wp-block-gallery figure {
        margin: 10px 0;
    }
}

/* Mobile Footer Improvements */
@media (max-width: 768px) {
    .footer-wrap {
        padding: 20px 15px;
    }

    .site-footer {
        font-size: 14px;
        text-align: center;
    }

    .site-footer address {
        line-height: 2;
    }

    /* Footer navigation - larger touch targets */
    #footer-navigation .menu {
        justify-content: center;
        gap: 20px;
    }

    #footer-navigation .menu-item a {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    #page-wrap,
    #page,
    #content,
    #primary {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Prevent wide elements from breaking layout */
    iframe,
    embed,
    object {
        max-width: 100%;
    }
}

/* Mobile Performance - Reduce animations on slower devices */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    * {
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari viewport height fix */
    body {
        min-height: -webkit-fill-available;
    }

    /* Prevent iOS Safari bottom bar from causing layout issues */
    #page-wrap {
        min-height: -webkit-fill-available;
    }
}

/* Android Chrome specific optimizations */
@media (max-width: 768px) {
    /* Disable pull-to-refresh on scroll containers to prevent conflicts */
    body {
        overscroll-behavior-y: contain;
    }
}

/* ========================================
   WEBRING STYLES
   ======================================== */

/* Member Directory Grid */
.webring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.webring-member-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.webring-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.webring-member-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 15px;
    border-radius: 4px;
}

.webring-member-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
    text-align: center;
}

.webring-member-card .category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin: 0 auto 10px;
    text-transform: capitalize;
}

.webring-member-card .description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.webring-member-card .social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.webring-member-card .social-links a {
    color: #0074a2;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.webring-member-card .social-links a:hover {
    color: #b22222;
}

.webring-member-card .verification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Signup Form */
#webring-signup-form {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#webring-signup-form .form-group {
    margin-bottom: 20px;
}

#webring-signup-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

#webring-signup-form label .required {
    color: #b22222;
}

#webring-signup-form input[type="text"],
#webring-signup-form input[type="url"],
#webring-signup-form input[type="email"],
#webring-signup-form input[type="tel"],
#webring-signup-form input[type="file"],
#webring-signup-form select,
#webring-signup-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    margin-top: 5px;
    font-family: inherit;
}

#webring-signup-form textarea {
    resize: vertical;
    min-height: 100px;
}

#webring-signup-form .char-counter {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

#webring-signup-form .char-counter.warning {
    color: #ff9800;
}

#webring-signup-form .char-counter.error {
    color: #b22222;
}

#webring-signup-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#webring-signup-form .checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

#webring-signup-form .form-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

#webring-signup-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    background: #b22222;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

#webring-signup-form button[type="submit"]:hover {
    background: #8b0000;
}

#webring-signup-form button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#webring-signup-form .form-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

#webring-signup-form .form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#webring-signup-form .form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Widget Installation Guide */
.widget-installation {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.widget-installation h3 {
    margin-top: 0;
    color: #b22222;
}

.widget-installation .code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 15px 0;
    position: relative;
}

.widget-installation .code-block code {
    white-space: pre-wrap;
    word-break: break-all;
}

.widget-installation .copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0074a2;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.widget-installation .copy-button:hover {
    background: #005a82;
}

/* Webring Widget Preview (for documentation) */
.lv-webring-widget {
    background: #fff;
    border: 2px solid #b22222;
    border-radius: 8px;
    padding: 15px;
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lv-webring-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.lv-webring-header img {
    width: 40px;
    height: 40px;
}

.lv-webring-header span {
    font-weight: bold;
    color: #b22222;
}

.lv-webring-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lv-webring-nav a {
    background: #b22222;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.lv-webring-nav a:hover {
    background: #8b0000;
}

/* Educational Section */
.webring-info {
    background: #f9f9f9;
    color: #333;
    padding: 40px;
    border-radius: 8px;
    margin: 30px 0;
}

.webring-info h2 {
    color: #b22222;
    margin-top: 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}

.webring-info ul {
    list-style-type: none;
    padding-left: 0;
}

.webring-info ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.webring-info ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .webring-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #webring-signup-form {
        padding: 20px;
        margin: 20px 10px;
    }

    .widget-installation {
        padding: 20px 15px;
    }

    .widget-installation .code-block {
        font-size: 12px;
        padding: 15px;
    }

    .lv-webring-nav {
        flex-direction: column;
    }

    .lv-webring-nav a {
        width: 100%;
    }

    .webring-info {
        padding: 25px 20px;
    }
}

@media screen and (max-width: 600px) {
    .webring-member-card {
        padding: 15px;
    }

    #webring-signup-form input,
    #webring-signup-form select,
    #webring-signup-form textarea {
        font-size: 16px; /* Critical for iOS - prevents zoom on focus */
    }
}

/* === END MOBILE OPTIMIZATION === */