/*
Theme Name: Pall Spera Co
Theme URI: https://www.powerwebgraphics.com
Author: Paul Geary
Author URI: https://www.powerwebgraphics.com
Description: A responsive WordPress theme with full-screen slideshow, portfolio, and customizable sections.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pall-spera-co
*/

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

body {
    font-family: var(--body-font, 'Inter', Arial, Helvetica, sans-serif);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

#main-content {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.section-title,
.archive-section-title,
.page-header-title,
.cta-title {
    font-family: var(--heading-font, 'Playfair Display', serif);
}

/* Default Content Text Styles */
.entry-content,
.page-content,
article .entry-content,
article .page-content {
    font-family: var(--body-font, 'Inter', Arial, Helvetica, sans-serif);
    font-style: normal;
    font-weight: 400;
    color: rgb(31, 33, 28);
    font-size: 18px;
    line-height: 31px;
}

.entry-content p,
.page-content p,
article .entry-content p,
article .page-content p,
.entry-content li,
.page-content li,
article .entry-content li,
article .page-content li,
.entry-content td,
.page-content td,
article .entry-content td,
article .page-content td,
.entry-content th,
.page-content th,
article .entry-content th,
article .page-content th {
    font-family: var(--body-font, 'Inter', Arial, Helvetica, sans-serif);
    font-style: normal;
    font-weight: 400;
    color: rgb(31, 33, 28);
    font-size: 18px;
    line-height: 31px;
}

.entry-content p,
.page-content p,
article .entry-content p,
article .page-content p {
    margin-bottom: 1em;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0) 85%);
    transform: translateY(0);
    overflow: visible;
    transition: background 0.6s ease, padding 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

/* Black gradient overlay that fades in/out */
.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0) 85%);
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: -2;
    pointer-events: none;
}

.navbar.scrolled::after {
    opacity: 0;
}

.navbar.scrolled {
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: transparent; /* Remove gradient background when scrolled */
}

.navbar.scrolled::before,
.navbar:hover::before,
.navbar:has(.navbar-menu li:hover)::before,
.navbar:has(.navbar-menu .sub-menu:hover)::before {
    transform: translateY(0);
}

.navbar:hover,
.navbar:has(.navbar-menu li:hover),
.navbar:has(.navbar-menu .sub-menu:hover) {
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar:hover .navbar-menu a,
.navbar:has(.navbar-menu li:hover) .navbar-menu a,
.navbar:has(.navbar-menu .sub-menu:hover) .navbar-menu a {
    color: #2c2c2c;
}


.navbar:hover .menu-toggle,
.navbar:has(.navbar-menu li:hover) .menu-toggle,
.navbar:has(.navbar-menu .sub-menu:hover) .menu-toggle {
    color: #2c2c2c;
}

.navbar.scrolled::before {
    transform: translateY(0);
}

.navbar-logo {
    display: flex;
    align-items: center;
    position: relative;
    height: auto;
    z-index: 1001;
}

.navbar-logo a {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    width: auto;
}

.navbar-logo img {
    width: auto;
    height: auto;
    max-height: 50px;
    display: block;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
    font-family: var(--navigation-font, 'Inter', Arial, Helvetica, sans-serif);
    position: relative;
    z-index: 1;
}

.navbar-menu li {
    position: relative;
}

.navbar-menu a {
    color: #ffffff;
    text-decoration: none;
    font-family: var(--navigation-font, 'Inter', Arial, Helvetica, sans-serif);
    font-size: 16px;
    font-weight: 500;
    transition: color 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 5px 0;
}

.navbar.scrolled .navbar-menu a {
    color: #2c2c2c;
}

.navbar-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--theme-color, #007bff);
    transition: width 0.3s ease;
}

.navbar-menu a:hover::before {
    width: 100%;
}

/* Right-aligned block: login/account above nav menu */
.navbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Logged-in indicator for subscribers (no admin bar) - sits above nav */
.navbar-account {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--navigation-font, 'Inter', Arial, Helvetica, sans-serif);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.navbar.scrolled .navbar-account,
.navbar:hover .navbar-account,
.navbar:has(.navbar-menu li:hover) .navbar-account,
.navbar:has(.navbar-menu .sub-menu:hover) .navbar-account {
    color: rgba(44, 44, 44, 0.9);
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .navbar-account-menu,
.navbar:hover .navbar-account-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-account-label {
    white-space: nowrap;
}

.navbar-account-name {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.navbar-account-name:hover {
    opacity: 0.8;
}

/* Account Navigation Menu Dropdown */
.navbar-account-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.navbar-account:hover .navbar-account-menu,
.navbar-account:focus-within .navbar-account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-account-menu li {
    margin: 0;
    padding: 0;
}

.navbar-account-menu a {
    display: block;
    padding: 10px 16px;
    color: rgba(44, 44, 44, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.navbar-account-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(44, 44, 44, 1);
}

.navbar-account-sep {
    opacity: 0.6;
    user-select: none;
    font-weight: 300;
}

.navbar-account-logout {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 0;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}

.navbar-account-logout:hover {
    opacity: 0.8;
}

/* Log in / Create account links when logged out (same chip, same spot) */
.navbar-account-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 0;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}

.navbar-account-link:hover {
    opacity: 0.8;
}

/* Submenu */
.navbar-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    min-width: 200px;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
}

.navbar-menu li:hover > .sub-menu,
.navbar-menu .sub-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-menu .sub-menu a {
    color: #2c2c2c !important;
    font-family: var(--navigation-font, 'Inter', Arial, Helvetica, sans-serif);
    display: block;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.navbar-menu .sub-menu a:hover {
    background-color: var(--theme-color, #007bff);
    color: #ffffff !important;
}

.navbar-menu .sub-menu a::before {
    display: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.navbar.scrolled .menu-toggle {
    color: #2c2c2c;
}

/* Full Screen Slideshow */
.slideshow-container {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #24386A;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
    will-change: clip-path;
}

/* When scrolled, crop sides (left/right) to match navigation bar height (set via JS) */
.slideshow-container.scrolled {
    /* Clip-path will be set dynamically via JavaScript to crop sides matching navbar height */
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.slideshow-container.scrolled.hero-crop-content {
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

.slideshow-container.scrolled.hero-crop-edge {
    transition: clip-path 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0s;
}

/* Property detail page (ps-idx-search): do not apply hero slideshow styling — keep slideshow centered and never crop on scroll */
body.ps-idx-property-detail-page .property-detail-fullscreen .slideshow-section .slideshow-container,
body.ps-idx-property-detail-page .property-detail-fullscreen .slideshow-container {
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 0;
    left: auto;
    right: auto;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
    clip-path: none;
    transition: none;
    will-change: auto;
}
body.ps-idx-property-detail-page .property-detail-fullscreen .slideshow-container.scrolled {
    clip-path: none;
}

@media (max-width: 768px) {
    /* Disable all slideshow cropping on mobile: no clip-path, no image crop */
    .slideshow-container.scrolled,
    .slideshow-container.scrolled.hero-crop-content,
    .slideshow-container.scrolled.hero-crop-edge {
        width: 100% !important;
        left: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        clip-path: none !important;
    }
    
    .hero-container.scrolled .hero-video-wrapper,
    .hero-container.scrolled .hero-youtube-video,
    .hero-container.scrolled .hero-hosted-video {
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
    }
    
    /* Show full slide image on mobile without cropping (contain instead of cover) */
    .slide-image-wrap .slide-image,
    .slide > .slide-image {
        object-fit: contain;
        min-width: auto;
        min-height: auto;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Hero Video Wrapper - Full Width */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-youtube-video,
.hero-hosted-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100%;
    min-width: 100vw;
    min-height: 100%;
    max-width: none;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    transition: none;
    border: none;
    margin: 0;
    padding: 0;
}

/* When scrolled, videos stay full width but container crops top/bottom */
.hero-container.scrolled .hero-video-wrapper {
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-container.scrolled .hero-youtube-video,
.hero-container.scrolled .hero-hosted-video {
    width: 100vw;
    height: 100%;
    min-width: 100vw;
    min-height: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-video-wrapper .slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    max-width: 90%;
}

/* Ensure video covers full area on mobile */
@media (max-width: 768px) {
    .hero-youtube-video,
    .hero-hosted-video {
        width: 100%;
        height: 100%;
    }
}

.slideshow-container .slide.active:only-child {
    background: #24386A;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

/* Wrapper fills the slide; image is centered and covers inside it */
.slide-image-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slide-image-wrap .slide-image {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    animation: slideImageZoom 20s ease-in-out infinite;
    /* Centering: applied in keyframes so animation doesn't override */
}

/* Fallback when image is not inside wrapper (legacy) */
.slide > .slide-image {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    animation: slideImageZoom 20s ease-in-out infinite;
}

@keyframes slideImageZoom {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(var(--zoom-level, 1.1));
    }
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    max-width: 90%;
}

.slide-title {
    font-family: var(--script-font, 'Winsome'), cursive;
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-subtitle {
    font-family: var(--heading-font, 'Playfair Display', serif);
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Page Header */
.page-header {
    position: relative;
    width: 100%;
    min-height: 200px;
    height: var(--page-header-height, 200px);
    margin-top: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    z-index: 1;
}

.page-header.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-header.has-color {
    background-color: var(--page-header-color, #152D4D);
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    padding: 20px 20px 20px 20px;
}

.page-header-title {
    font-size: 3rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.page-header-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    opacity: 0.9;
}

.page-header-no-image {
    background: #f5f5f5;
    padding: 60px 40px;
    text-align: center;
}

.page-header-no-image .page-header-title {
    color: #2c2c2c;
    text-shadow: none;
}

.page-content {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: 80px 40px;
}

/* Reduce spacing on archive pages */
.page-content-archive {
    padding-bottom: 0;
}

.archive-section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 30px;
    margin-top: 0;
    color: #333;
}

/* Override section padding for archive sections */
.portfolio-archive-section.section {
    padding-top: 0;
    padding-bottom: 80px;
}

.employees-section-about {
    padding-top: 0;
    padding-bottom: 80px;
}

/* Blog Post Layout Styles */
.blog-wide-layout .blog-wide-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px;
}

.blog-fullwidth-layout {
    width: 100%;
}

.blog-fullwidth-content {
    width: 100%;
    padding: 0;
}

.blog-fullwidth-content img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-fullwidth-content p,
.blog-fullwidth-content h1,
.blog-fullwidth-content h2,
.blog-fullwidth-content h3,
.blog-fullwidth-content h4,
.blog-fullwidth-content h5,
.blog-fullwidth-content h6,
.blog-fullwidth-content ul,
.blog-fullwidth-content ol,
.blog-fullwidth-content blockquote {
    max-width: var(--content-max-width, 1200px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .blog-wide-layout .blog-wide-content {
        padding: 40px 20px;
    }
    
    .blog-fullwidth-content p,
    .blog-fullwidth-content h1,
    .blog-fullwidth-content h2,
    .blog-fullwidth-content h3,
    .blog-fullwidth-content h4,
    .blog-fullwidth-content h5,
    .blog-fullwidth-content h6,
    .blog-fullwidth-content ul,
    .blog-fullwidth-content ol,
    .blog-fullwidth-content blockquote {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.post-meta {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 20px;
}

.post-meta a {
    color: #999;
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--theme-color, #007bff);
}

.page-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-links a {
    color: var(--theme-color, #007bff);
    text-decoration: none;
    margin: 0 5px;
}

.page-links a:hover {
    text-decoration: underline;
}

/* Sections */
.section {
    padding: 80px 0;
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: #2c2c2c;
}

/* Portfolio Section */
/* Archive Page Styles */
.portfolio-archive-section {
    padding-top: 0;
}

.archive-intro {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.archive-intro p {
    margin-bottom: 1em;
}

.archive-intro p:last-child {
    margin-bottom: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* Portfolio item styles are defined later in the file for consistency */

/* Content Sections */
.content-section {
    margin-bottom: 60px;
}

.content-section-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c2c2c;
}

.content-section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* Blog Posts Section */
/* Blog grid: 3 columns by default; 4 columns when viewport is 1400px or wider */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 1400px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.blog-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog-item:hover {
    transform: translateY(-5px);
}

.blog-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-item-content {
    padding: 20px;
}

.blog-item-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.blog-item-title a {
    color: #2c2c2c;
    text-decoration: none;
}

.blog-item-title a:hover {
    color: var(--theme-color, #007bff);
}

.blog-item-meta {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 10px;
}

.blog-item-meta .exclusive-badge {
    display: inline-block;
    background: #24386a;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    margin-right: 0.5em;
}

.blog-item-meta .post-location,
.blog-item-meta .post-price {
    margin-right: 0.5em;
}

.blog-item-meta .post-price {
    font-weight: 600;
    color: #333;
}

.blog-item-excerpt {
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    color: var(--theme-color, #007bff);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Property listing post content (SEO pages) */
.property-featured-image,
article .property-featured-image {
    margin: 0 0 1.5em 0;
    max-width: 100%;
}
.property-hero-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.property-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5em 0;
}
@media (min-width: 600px) {
    .property-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}
.property-gallery-item {
    margin: 0;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.property-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.property-intro {
    font-size: 1.1em;
}
.property-listing-cta {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}
.property-listing-cta .button {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: var(--theme-color, #152D4D);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}
.property-listing-cta .button:hover {
    opacity: 0.9;
}
.property-seo-footer {
    color: #666;
    font-size: 0.95em;
}

.property-details {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1em;
}
.property-detail-sep {
    margin: 0 0.4em;
    color: #999;
}
.property-remarks {
    margin: 1.5em 0;
    padding: 1em 0;
    border-top: 1px solid #e0e0e0;
}
.property-remarks-title {
    font-size: 1.15rem;
    margin-bottom: 0.5em;
}
.property-remarks-content {
    line-height: 1.6;
}
.property-remarks-content p:last-child {
    margin-bottom: 0;
}

/* Statistics / Stat Graphs section (charts) */
.statistics-section .stats-subtitle,
.stat-graphs-section .stats-subtitle {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.statistics-section .stats-subtitle:first-of-type,
.stat-graphs-section .stats-subtitle:first-of-type { margin-top: 0; }
.statistics-section .stats-desc,
.stat-graphs-section .stats-desc {
    color: #666;
    margin-bottom: 1.5rem;
}
/* Desktop: 3 chart groups across (SFH | Condo | Land); 2 across on medium screens */
.statistics-section .stats-charts-grid,
.stat-graphs-section .stats-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (min-width: 1024px) {
    .statistics-section .stats-charts-grid,
    .stat-graphs-section .stats-charts-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
.statistics-section .stats-chart-group,
.stat-graphs-section .stats-chart-group {
    margin-bottom: 0;
}
.statistics-section .stats-chart-title,
.stat-graphs-section .stats-chart-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.statistics-section .stats-charts-row,
.stat-graphs-section .stats-charts-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.statistics-section .stats-chart-wrap,
.stat-graphs-section .stats-chart-wrap {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    height: 420px;
}
.statistics-section .stats-chart-label,
.stat-graphs-section .stats-chart-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #555;
}
.statistics-section .stats-table-group {
    margin-bottom: 2rem;
}
.statistics-section .stats-table-wrap {
    overflow-x: auto;
}
.statistics-section .stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.statistics-section .stats-table th,
.statistics-section .stats-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
.statistics-section .stats-table th {
    background: #f0f0f0;
    font-weight: 600;
}
.statistics-section .stats-table th:not(:first-child),
.statistics-section .stats-table td:not(:first-child) {
    text-align: center;
}
/* Stat table section (standalone) uses same table styles */
.stat-table-section .stats-table th:not(:first-child),
.stat-table-section .stats-table td:not(:first-child) {
    text-align: center;
}
.stat-table-section .stats-table th,
.stat-table-section .stats-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}
.stat-table-section .stats-table th {
    background: #f0f0f0;
    font-weight: 600;
}
.stat-table-section .stats-table-wrap {
    overflow-x: auto;
}
.stat-table-section .stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.stat-table-section .stats-desc {
    color: #666;
    margin-bottom: 1.5rem;
}
.stat-table-section .stats-table-group {
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    .statistics-section .stats-charts-grid,
    .stat-graphs-section .stats-charts-grid {
        grid-template-columns: 1fr;
    }
    .statistics-section .stats-charts-row,
    .stat-graphs-section .stats-charts-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .statistics-section .stats-chart-wrap,
    .stat-graphs-section .stats-chart-wrap {
        padding: 0.75rem;
        max-width: 100%;
        height: 380px;
    }
    .statistics-section .stats-chart-wrap canvas,
    .stat-graphs-section .stats-chart-wrap canvas {
        max-width: 100%;
    }
    .statistics-section .stats-chart-label,
    .stat-graphs-section .stats-chart-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    .statistics-section .stats-subtitle,
    .stat-graphs-section .stats-subtitle {
        font-size: 1.25rem;
    }
    .statistics-section .stats-table-wrap {
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
    }
    .statistics-section .stats-table {
        font-size: 0.8rem;
        min-width: 280px;
    }
    .statistics-section .stats-table th,
    .statistics-section .stats-table td {
        padding: 0.5rem 0.5rem;
    }
    .statistics-section .stats-chart-group,
    .stat-graphs-section .stats-chart-group {
        margin-bottom: 2rem;
    }
}

/* Archive / Blog index layout */
.archive-main {
    padding: 0;
}

.archive-header.page-header {
    min-height: 180px;
}

.archive-header .page-header-description {
    font-size: 1.1rem;
    margin-top: 0.75em;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.archive-posts-section {
    padding: 60px 0 80px;
}

.archive-posts-section .section-content-wrapper {
    padding: 0 40px;
}

.archive-posts-section .blog-grid {
    margin-top: 0;
}

/* Placeholder when post has no featured image */
.blog-item-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
    text-decoration: none;
}

.blog-item-placeholder {
    color: #999;
    font-size: 0.9rem;
}

/* Pagination */
.archive-posts-section .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.archive-posts-section .nav-links a,
.archive-posts-section .nav-links .current {
    display: inline-block;
    padding: 10px 18px;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--theme-color, #007bff);
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.archive-posts-section .nav-links a:hover {
    background: var(--theme-color, #007bff);
    color: #fff;
    border-color: var(--theme-color, #007bff);
}

.archive-posts-section .nav-links .current {
    background: var(--theme-color, #007bff);
    color: #fff;
    border-color: var(--theme-color, #007bff);
}

.archive-posts-section .no-posts-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .archive-posts-section .section-content-wrapper {
        padding: 0 20px;
    }

    .archive-header .page-header-title {
        font-size: 1.75rem;
    }
}

/* Call to Action Section */
.cta-section {
    background: var(--theme-color, #007bff);
    color: #ffffff;
    text-align: center;
    padding: 80px 40px;
    position: relative;
}

/* If CTA has background image, overlay theme color */
.cta-section[style*="background-image"] {
    background-color: var(--theme-color, #007bff);
    background-blend-mode: overlay;
}

.cta-section[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--theme-color, #007bff);
    opacity: 0.7;
    z-index: 0;
}

.cta-section[style*="background-image"] .cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #ffffff;
    color: var(--theme-color, #007bff);
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: #2c2c2c;
    color: #ffffff;
    padding: 60px 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    margin-bottom: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-widget p,
.footer-widget a {
    color: #cccccc;
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--theme-color, #007bff);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    color: #999;
}

/* Portfolio Single Page Styles */
.portfolio-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    margin-bottom: 0;
}

.portfolio-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.portfolio-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 2;
}

.portfolio-title {
    font-size: 3rem;
    color: #ffffff;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.portfolio-details-section {
    padding-top: 60px;
}

.portfolio-details-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
}

.portfolio-details-box {
    background: var(--theme-color, #007bff);
    color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.portfolio-details-box h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #ffffff;
    text-align: center;
}

.portfolio-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portfolio-details-list li {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
}

.portfolio-details-list li:last-child {
    border-bottom: none;
}

.portfolio-details-list li i {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    margin-right: 15px;
    color: #ffffff;
}

.portfolio-details-list .detail-label {
    flex: 1;
    font-weight: 500;
    color: #ffffff;
}

.portfolio-details-list .detail-value {
    font-weight: 600;
    font-size: 1.2rem;
    color: #ffffff;
}

.portfolio-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.portfolio-content-section {
    padding-top: 60px;
}

.portfolio-gallery-section {
    padding-top: 60px;
}

.portfolio-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.portfolio-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Square images */
    width: 100%;
}

.portfolio-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.portfolio-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.portfolio-gallery-item:hover img {
    transform: scale(1.08); /* Slight zoom on hover */
}

/* Lightbox Styles */
.portfolio-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

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

.portfolio-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.portfolio-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.portfolio-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.portfolio-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.portfolio-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.portfolio-lightbox-prev {
    left: 20px;
}

.portfolio-lightbox-next {
    right: 20px;
}

.portfolio-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10000;
}

@media (max-width: 768px) {
    .portfolio-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .portfolio-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .portfolio-lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
    
    .portfolio-lightbox-prev {
        left: 10px;
    }
    
    .portfolio-lightbox-next {
        right: 10px;
    }
}

.portfolio-cta {
    margin-top: 60px;
}

.related-portfolio-section {
    padding-top: 60px;
    border-top: 1px solid #eee;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.portfolio-item-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portfolio-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: 2;
}

.portfolio-item-title-overlay {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 3;
    position: relative;
    opacity: 1;
}

.portfolio-item:hover .portfolio-item-overlay {
    background: rgba(var(--theme-color-rgb, 0, 123, 255), 0.2);
}

/* Animated border lines from corners */
.portfolio-border-top,
.portfolio-border-right,
.portfolio-border-bottom,
.portfolio-border-left {
    position: absolute;
    background: #ffffff;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
}

.portfolio-border-top {
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    transform-origin: left center;
    transform: scaleX(0);
}

.portfolio-border-right {
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 2px;
    transform-origin: top center;
    transform: scaleY(0);
}

.portfolio-border-bottom {
    left: 20px;
    right: 20px;
    bottom: 20px;
    height: 2px;
    transform-origin: right center;
    transform: scaleX(0);
}

.portfolio-border-left {
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 2px;
    transform-origin: bottom center;
    transform: scaleY(0);
}

.portfolio-item:hover .portfolio-border-top {
    opacity: 1;
    animation: drawLineTop 0.4s ease-in-out forwards;
}

.portfolio-item:hover .portfolio-border-right {
    opacity: 1;
    animation: drawLineRight 0.4s ease-in-out forwards;
}

.portfolio-item:hover .portfolio-border-bottom {
    opacity: 1;
    animation: drawLineBottom 0.4s ease-in-out forwards;
}

.portfolio-item:hover .portfolio-border-left {
    opacity: 1;
    animation: drawLineLeft 0.4s ease-in-out forwards;
}

@keyframes drawLineTop {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

@keyframes drawLineRight {
    0% {
        transform: scaleY(0);
    }
    100% {
        transform: scaleY(1);
    }
}

@keyframes drawLineBottom {
    0% {
        transform: scaleX(0);
    }
    100% {
        transform: scaleX(1);
    }
}

@keyframes drawLineLeft {
    0% {
        transform: scaleY(0);
    }
    100% {
        transform: scaleY(1);
    }
}

.portfolio-item:hover .portfolio-item-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--theme-color, #007bff);
    opacity: 0.2;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Responsive Portfolio Styles */
@media (max-width: 768px) {
    .portfolio-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .portfolio-title {
        font-size: 2rem;
    }
    
    .portfolio-details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .portfolio-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
    }

    .navbar-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar-menu a {
        color: #2c2c2c;
        display: block;
        padding: 10px 0;
    }

    .navbar.scrolled .navbar-menu {
        background: rgba(255, 255, 255, 0.98);
    }

    .slide-title {
        font-size: 2.5rem;
    }

    .slide-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 20px;
    }

    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr; /* One column on small screens */
    }

    /* Make navbar always visible on mobile with semi-transparent background */
    .navbar {
        padding: 15px 20px;
        /*background: rgba(0, 0, 0, 0.7) !important; /* Override gradient for better visibility on mobile */
    }
    
    /* On mobile, show white background overlay when scrolled */
    .navbar::before {
        transform: translateY(0);
        opacity: 0;
        transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .navbar.scrolled::before {
        opacity: 1;
    }
    
    /* Ensure navbar logo is visible on mobile */

    .navbar.scrolled {
        padding: 10px 20px;
    }

    .page-header-title {
        font-size: 2rem;
    }

    .page-content {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Employee Section Styles */
.employees-section .employee-grid {
    display: grid;
    gap: 40px;
    margin-top: 30px;
}

/* About Page - 3 columns on desktop */
.employees-section-about .employee-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.employees-about-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    color: #333;
}

/* Landing Page - 3 columns on desktop */
.employees-section:not(.employees-section-about) .employee-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.employee-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Landing page cards - simpler style, no rounded corners */
.employee-card-landing {
    text-align: center;
    padding: 20px;
    border-radius: 0;
}

.employee-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain;
    display: block;
}

/* About page photos - no cropping, use larger size */
.employees-section-about .employee-photo {
    object-fit: contain;
    border-radius: 8px;
}

/* Landing page photos - no cropping, no rounded corners */
.employee-card-landing .employee-photo {
    border-radius: 0;
    object-fit: contain;
    margin-bottom: 15px;
}

.employee-info {
    text-align: center;
}

.employee-name {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.employee-card-landing .employee-name {
    font-size: 1.3em;
    margin-bottom: 8px;
}

.employee-position {
    font-size: 1em;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.employee-card-landing .employee-position {
    margin-bottom: 0;
    font-size: 0.95em;
}

.employee-learn-more-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--theme-color, #007bff);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.employee-learn-more-button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.employee-bio {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.employee-email,
.employee-phone {
    margin: 8px 0;
    color: #666;
}

.employee-email a {
    color: var(--theme-color);
    text-decoration: none;
}

.employee-email a:hover {
    text-decoration: underline;
}

.employee-social {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.employee-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-color);
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.employee-social a:hover {
    transform: scale(1.1);
    background: #0056b3;
}

.employee-group-title {
    font-size: 2em;
    margin-bottom: 30px;
    margin-top: 40px;
    color: #333;
    text-align: center;
}

/* Employee Bio Page Styles */
.employee-bio-page {
    max-width: 1000px;
    margin: 0 auto;
}

.employee-bio-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.employee-bio-photo {
    flex: 0 0 300px;
}

.employee-bio-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.employee-bio-info {
    flex: 1;
}

.employee-bio-name {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.employee-bio-position {
    font-size: 1.3em;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
}

.employee-bio-details {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.employee-bio-details p {
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 31px;
}

.employee-bio-details strong {
    display: inline-block;
    min-width: 80px;
    color: #333;
}

.employee-bio-details a {
    color: var(--theme-color, #007bff);
    text-decoration: none;
}

.employee-bio-details a:hover {
    text-decoration: underline;
}

.employee-bio-social {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.employee-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--theme-color, #007bff);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.employee-social-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

.employee-social-link i {
    font-size: 1.2em;
}

.employee-bio-text {
    margin-top: 30px;
}

/* Responsive Employee Bio Page */
@media (max-width: 768px) {
    .employee-bio-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .employee-bio-photo {
        flex: 0 0 auto;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .employee-bio-name {
        font-size: 2em;
        text-align: center;
    }
    
    .employee-bio-position {
        text-align: center;
    }
    
    .employee-bio-social {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Popup Modal Styles */
.pall-spera-co-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.pall-spera-co-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.popup-open {
    overflow: hidden;
}

.pall-spera-co-popup-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pall-spera-co-popup-overlay.active .pall-spera-co-popup-container {
    transform: scale(1);
}

.pall-spera-co-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease;
}

.pall-spera-co-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
}

.pall-spera-co-popup-content {
    padding: 40px;
}

.pall-spera-co-popup-widget-area {
    width: 100%;
}

.pall-spera-co-popup-widget-area .popup-widget {
    margin-bottom: 20px;
}

.pall-spera-co-popup-widget-area .popup-widget:last-child {
    margin-bottom: 0;
}

.pall-spera-co-popup-widget-area .popup-widget-title {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #333;
}

/* Responsive Popup */
@media (max-width: 768px) {
    .pall-spera-co-popup-container {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 0;
    }
    
    .pall-spera-co-popup-content {
        padding: 30px 20px;
    }
    
    .pall-spera-co-popup-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

/* Responsive Employee Grid */
@media (max-width: 1024px) {
    .employees-section-about .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .employees-section-about .employee-grid {
        grid-template-columns: 1fr;
    }
    
    .employees-about-title {
        font-size: 2em;
    }
}

.employee-group-title:first-child {
    margin-top: 0;
}

/* Responsive adjustments for employees */
@media (max-width: 1024px) {
    .employees-section-about .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .employees-section:not(.employees-section-about) .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .employees-section-about .employee-grid,
    .employees-section:not(.employees-section-about) .employee-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Section Background Width Classes */
.section.bg-edge-to-edge {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
    position: relative;
}

.section.bg-content-area {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* Section Content Wrapper */
.section-content-wrapper {
    position: relative;
    z-index: 1;
}

.section-content-wrapper.content-content-area {
    max-width: var(--content-max-width, 1200px);
    margin: 0 auto;
    padding: 40px;
}

.section-content-wrapper.content-edge-to-edge {
    width: 100%;
    margin-left: 5%;
    margin-right: 5%;
    padding: 0 20px; /* Add horizontal padding for readability */
}

/* Landing page: divider bar between sections (charcoal, 3/4 content width, center-heavy shadow) */
.landing-section-divider {
    width: 75%;
    max-width: calc(var(--content-max-width, 1200px) * 0.75);
    margin: 1.5rem auto;
    height: 1px;
    background: #36454F;
    border-radius: 1px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.12);
}

.landing-section-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 70%;
    height: 28px;
    background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 0, 0, 0.22), transparent 72%);
    pointer-events: none;
}

/* No Content/Items Messages */
.no-content-message,
.no-items-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Scroll Animation Classes - Initial State (Hidden) */
.section.scroll-animate {
    opacity: 0;
}

/* Sections without scroll-animate should be visible */
.section:not(.scroll-animate) {
    opacity: 1 !important;
}

/* Ensure sections are visible - show immediately if in viewport on load */
.section.scroll-animate {
    /* Will be shown by JS when animated class is added */
}

/* Fallback: Show sections after a delay if JS hasn't triggered (2 second delay) */
.section.scroll-animate:not(.animated) {
    animation: fadeInFallback 0.5s ease-out 2s forwards;
}

@keyframes fadeInFallback {
    to {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

/* Ensure all sections have proper display and visibility */
.section {
    display: block;
    visibility: visible;
}

.section.scroll-animate.fade-in,
.section.scroll-animate.fade_in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.section.scroll-animate.fade-slide-up,
.section.scroll-animate.fade_slide_up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.scroll-animate.slide-left,
.section.scroll-animate.slide_left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.scroll-animate.slide-right,
.section.scroll-animate.slide_right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.scroll-animate.slide-down,
.section.scroll-animate.slide_down {
    opacity: 0;
    transform: translateY(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.scroll-animate.zoom-in,
.section.scroll-animate.zoom_in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Scroll Animation Classes - Visible State */
.section.scroll-animate.animated {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
}

/* Section Background Styles */
.section[style*="background-image"] {
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Use scroll for parallax control via JavaScript */
    position: relative;
    min-height: 100px; /* Ensure section has height even with no content */
}

/* Non-parallax sections keep fixed background position */
.section.bg-parallax-disabled[style*="background-image"] {
    background-attachment: scroll;
    /* Background position is set via inline style and should remain fixed */
}

/* Parallax sections - JavaScript will control background-position */
.section.bg-parallax-enabled[style*="background-image"] {
    background-attachment: scroll;
    /* Initial position set via inline style, then JavaScript takes over */
}

/* When background image is present, padding is controlled via inline styles from PHP */
/* Top and bottom spacing can be set in customizer to show more of the background image */

/* Restore padding for content wrapper when background image is present */
.section[style*="background-image"] .section-content-wrapper {
    padding-top: var(--section-padding-top, 80px);
    padding-bottom: var(--section-padding-top, 80px);
}

.section[style*="background-image"] > * {
    position: relative;
    z-index: 1;
}

/* Content background overlay for readability - opacity applied to background-color only (via rgba) */
.section[style*="background-image"] .section-content-wrapper[style*="background-color"] {
    padding: 20px;
    border-radius: 4px;
}

/* Regular content background (no opacity) when no image */
.section:not([style*="background-image"]) .section-content-wrapper[style*="background-color"] {
    padding: 20px;
    border-radius: 4px;
}

/* Parallax Background Effect */
.section.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
}

/* Mobile: Disable fixed background for better performance */
@media (max-width: 768px) {
    /* Force all sections to edge-to-edge on mobile */
    .section.bg-content-area {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Force all content wrappers to edge-to-edge on mobile */
    .section-content-wrapper.content-content-area {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .section-content-wrapper.content-edge-to-edge {
        margin-left: 2%;
        margin-right: 2%;
        padding-left: 20px;
        padding-right: 20px;
    }
}

