.top-gallery-section {
    overflow: hidden!important;
}
/**
 * Shortcode Styles for Properties n8n Integration
 */

/* Development Tags Shortcode */
.pni-development-tags {
    margin: 20px 0;
}

.pni-development-tags a {
    color: #007cba;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.pni-development-tags a:hover {
    text-decoration: underline;
}

/* Development Gallery Shortcode (Carousel) */
.pni-development-gallery {
    margin: 30px 0;
    width: 100%;
}

.pni-gallery-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Owl Carousel Core Styles - Fallback in case CDN doesn't load */
.pni-gallery-carousel .owl-stage-outer {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.pni-gallery-carousel .owl-stage {
    position: relative;
    display: flex;
    align-items: stretch;
    backface-visibility: hidden;
    transform: translate3d(0px, 0px, 0px);
}

.pni-gallery-carousel .owl-item {
    position: relative;
    min-height: 1px;
    float: left;
    backface-visibility: hidden;
    transform: translateZ(0);
    flex: 0 0 auto;
    width: auto;
}

/* Ensure proper width calculation for carousel items */
.pni-gallery-carousel.owl-carousel .pni-gallery-item {
    width: 100%;
    margin: 0;
}

.pni-gallery-carousel .owl-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* Clear floats */
.pni-gallery-carousel::after {
    content: "";
    display: table;
    clear: both;
}

.pni-gallery-carousel .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.pni-gallery-carousel .owl-nav button {
    pointer-events: all;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    margin: 0 10px !important;
}

.pni-gallery-carousel .owl-nav button:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: scale(1.1) !important;
}

.pni-gallery-carousel .owl-nav .owl-prev {
    left: 0;
}

.pni-gallery-carousel .owl-nav .owl-next {
    right: 0;
}

.pni-gallery-carousel .owl-dots {
    text-align: center;
    margin-top: 20px;
}

.pni-gallery-carousel .owl-dots .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

.pni-gallery-carousel .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    display: block;
    transition: all 0.3s ease;
}

.pni-gallery-carousel .owl-dots .owl-dot.active span,
.pni-gallery-carousel .owl-dots .owl-dot:hover span {
    background: #007cba;
    transform: scale(1.2);
}

/* Aspect Ratio Classes */
.pni-gallery-aspect-square {
    padding-bottom: 100% !important; /* 1:1 aspect ratio */
}

.pni-gallery-aspect-portrait {
    padding-bottom: 133.33% !important; /* 3:4 aspect ratio */
}

.pni-gallery-aspect-landscape {
    padding-bottom: 66.67% !important; /* 3:2 aspect ratio */
}

.pni-gallery-aspect-wide {
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
}

.pni-gallery-aspect-ultrawide {
    padding-bottom: 42.86% !important; /* 21:9 aspect ratio */
}

/* Debug: Add visible borders to see the gallery items 
.pni-gallery-item {
    border: 2px solid #ff0000 !important;
}

.pni-gallery-image,
.pni-gallery-lightbox {
    border: 2px solid #00ff00 !important;
}

/* Additional common aspect ratios */
.pni-gallery-aspect-4-3 {
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.pni-gallery-aspect-5-4 {
    padding-bottom: 80%; /* 5:4 aspect ratio */
}

.pni-gallery-aspect-3-1 {
    padding-bottom: 33.33%; /* 3:1 aspect ratio */
}

.pni-gallery-aspect-2-1 {
    padding-bottom: 50%; /* 2:1 aspect ratio */
}

/* Gallery Item (Carousel) */
.pni-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: #ffffff;
    margin: 0 10px;
    width: 100%;
    flex-shrink: 0;
}

/* Fallback: If Owl Carousel doesn't load, display items in a grid */
.pni-gallery-carousel:not(.owl-carousel) {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.pni-gallery-carousel:not(.owl-carousel) .pni-gallery-item {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 250px;
    margin: 0;
}

@media (max-width: 768px) {
    .pni-gallery-carousel:not(.owl-carousel) .pni-gallery-item {
        flex: 1 1 calc(50% - 10px);
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .pni-gallery-carousel:not(.owl-carousel) .pni-gallery-item {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

.pni-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Gallery Image (Carousel) */
.pni-gallery-image {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
    background-color: #f0f0f0;
    display: block;
    border-radius: 12px;
}

.pni-gallery-item:hover .pni-gallery-image {
    transform: scale(1.05);
}

/* Lightbox link styling (Carousel) */
.pni-gallery-lightbox {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Prevent other lightbox plugins from interfering */
.pni-gallery-lightbox.pni-lightbox-controlled {
    /* Reset any conflicting styles from other lightbox plugins */
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.pni-gallery-lightbox.pni-lightbox-controlled:hover {
    /* Ensure our hover effects take precedence */
    transform: none !important;
    opacity: 1 !important;
}

.pni-gallery-item:hover .pni-gallery-lightbox {
    transform: scale(1.05);
}

/* Gallery Lightbox */
.pni-gallery-lightbox {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.pni-gallery-lightbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.pni-gallery-lightbox::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pni-gallery-lightbox:hover::before,
.pni-gallery-lightbox:hover::after {
    opacity: 1;
}

/* Gallery Captions */
.pni-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #ffffff;
    padding: 20px 15px 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.pni-gallery-item:hover .pni-gallery-caption {
    opacity: 1;
}

.pni-gallery-caption-text {
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ensure gallery items maintain their aspect ratios */
.pni-gallery-item {
    min-height: 200px; /* Minimum height fallback */
}

/* Responsive adjustments for different aspect ratios */
@media (max-width: 768px) {
    .pni-gallery-aspect-wide,
    .pni-gallery-aspect-ultrawide {
        padding-bottom: 75% !important; /* Force 4:3 on mobile for better mobile experience */
    }
}

@media (max-width: 480px) {
    .pni-gallery-item {
        min-height: 150px; /* Smaller minimum height on mobile */
    }
    
    .pni-gallery-aspect-portrait {
        padding-bottom: 100% !important; /* Force square on mobile for better mobile experience */
    }
}

/* Error Messages */
.pni-error {
    color: #dc3232;
    background: #fef7f7;
    border: 1px solid #dc3232;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive Design for Carousel */
@media (max-width: 768px) {
    .pni-gallery-carousel .owl-nav button {
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
        margin: 0 5px !important;
    }
    
    .pni-gallery-item {
        margin: 0 5px;
    }
    
    .pni-gallery-caption {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .pni-gallery-carousel .owl-nav button {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
        margin: 0 2px !important;
    }
    
    .pni-gallery-item {
        margin: 0 2px;
    }
    
    .pni-development-tags .pni-tag-link {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
    
    .pni-development-tags {
        text-align: center;
    }
}

/* Loading States */
.pni-gallery-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.pni-gallery-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.pni-gallery-lightbox:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.pni-tag-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .pni-gallery-lightbox::before,
    .pni-gallery-lightbox::after {
        display: none;
    }
    
    .pni-gallery-caption {
        opacity: 1;
        background: #ffffff;
        color: #000000;
        border: 1px solid #000000;
    }
    
    .pni-development-tags {
        background: #ffffff;
        border: 1px solid #000000;
    }
}

/* Simple Lightbox Fallback */
.pni-simple-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pni-simple-lightbox.active {
    opacity: 1;
}

.pni-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.pni-lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.pni-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.3s ease;
}

.pni-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.pni-lightbox-caption {
    margin-top: 15px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Development Properties Table Shortcode */
.pni-development-properties-table {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Property Filters */
.pni-property-filters {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.pni-filter-btn {
    margin-right: 10px;
    padding: 5px 10px;
    cursor: pointer;
    background: #2D3746;
    color: white;
    font-family: "Aventa", Sans-serif;
}

.pni-filter-btn:hover {
    transform: translateY(-1px);
}

.pni-filter-btn.pni-filter-active {
    background: white;
    border-color: #2D3746;
    color: #2D3746;
}

/* Properties Table Container */
.pni-properties-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Properties Table */
.pni-properties-table {
    width: 100%;
    border-collapse: collapse;
    font-family: sans-serif;
    color: #555;
    text-align: center;
}

.pni-properties-table th {
    color: #555;
    padding: 15px 12px;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
    font-family: sans-serif;
}

.pni-properties-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.pni-properties-table tbody tr {
    transition: background-color 0.2s ease;
}

.pni-properties-table tbody tr:hover {
    background-color: #f8f9fa;
}

.pni-properties-table tbody tr:last-child td {
    border-bottom: none;
}

/* Property Row States */
.pni-property-row.hidden {
    display: none;
}

.pni-property-row.visible {
    display: table-row;
}

/* Row Count Display */
.pni-row-count {
    margin: 15px 0;
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 6px;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Animation Effects */
.pni-property-row.animate-in {
    animation: fadeInUp 0.3s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Column Specific Styling */
.pni-properties-table th:nth-child(1),
.pni-properties-table td:nth-child(1) {
    font-weight: 500;
}

/* Property Link Styling */
.pni-property-link {
    color: #2d3746;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.pni-property-link:hover {
    color: #2d3746;
    text-decoration: underline;
}

.pni-property-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pni-property-filters {
        justify-content: center;
    }
    
    .pni-filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .pni-properties-table th,
    .pni-properties-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
}

@media (max-width: 480px) {
    .pni-property-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pni-filter-btn {
        text-align: center;
        border-radius: 8px;
    }
    
    .pni-properties-table-container {
        font-size: 12px;
    }
    
    .pni-properties-table th,
    .pni-properties-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

/* Loading States */
.pni-properties-table-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.pni-properties-table-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Empty State */
.pni-properties-table-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Development Typology Shortcode */
.pni-development-typology {
    line-height: 1.5;
}

.pni-development-typology .typology_prefix {
    font-weight: 600;
}

.pni-development-typology .pni-error {
    color: #dc3232;
    font-style: italic;
}

/* Development Hero Shortcode */
.pni-development-hero {
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 15px!important;
    overflow: hidden!important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pni-development-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive hero image */
@media (max-width: 768px) {
    .pni-development-hero {
        border-radius: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Development Map Shortcode */
.pni-development-map {
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pni-development-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.pni-development-map iframe {
    border-radius: 15px;
}

/* Development Amenities Shortcode */
.pni-development-amenities {
    margin: 20px 0;
}

.pni-amenity-item {
    color: #fff;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.pni-amenity-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pni-amenity-item i {
    font-size: 18px;
    color: #748B9E;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.pni-amenity-item .amenity-name {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.pni-amenity-parent {
    font-weight: 600;
    padding-left: 8px;
}

.pni-amenity-child {
    margin-left: 20px;
    font-size: 13px;
    color: #666;
    border-left: 2px solid #e9ecef;
    padding-left: 8px;
}

.pni-amenity-child .amenity-name {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

/* Responsive Design for Map and Amenities */
@media (max-width: 768px) {
    .pni-development-map {
        border-radius: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .pni-amenity-item {
        padding: 6px 0;
        margin-bottom: 8px;
    }
    
    .pni-amenity-item i {
        font-size: 16px;
        margin-right: 10px;
    }
    
    .pni-amenity-item .amenity-name {
        font-size: 13px;
    }
}

/* Responsive Design for Typology */
@media (max-width: 768px) {
    .pni-development-typology {
        font-size: 14px;
        text-align: center;
    }
}

/* Development Logo Shortcode */
.pni-development-logo {
    margin: 20px 0;
    text-align: center;
}

.pni-development-logo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pni-development-logo img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.pni-development-logo.pni-no-logo {
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}



/* Responsive Design for Logo */
@media (max-width: 768px) {
    .pni-development-logo {
        margin: 15px 0;
    }
    
    .pni-development-logo img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .pni-development-logo img {
        max-width: 120px;
    }
}

/* Print Styles */
@media print {
    .pni-property-filters {
        display: none;
    }
    
    .pni-properties-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .pni-properties-table th {
        background: #f0f0f0 !important;
        border: 1px solid #000;
    }
    
    .pni-properties-table td {
        border: 1px solid #000;
    }
    
    .pni-development-typology .typology_prefix {
        color: #000 !important;
    }
    
    .pni-development-logo img {
        box-shadow: none;
        border: 1px solid #000;
    }
}
