* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.home-details-container {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 40px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Professional Success Message Styles */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #059669;
}

.success-message.hidden {
    animation: slideOutRight 0.3s ease-in;
    opacity: 0;
}

.success-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.success-content {
    flex: 1;
}

.success-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.success-text {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

.success-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.success-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading state for button */
.btn-send.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-send.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.share-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.2s ease-out;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.share-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.share-close-btn:hover {
    color: #374151;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.share-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-2px);
}

.share-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.share-option[data-platform="whatsapp"] .share-icon {
    color: #25D366;
}

.share-option[data-platform="facebook"] .share-icon {
    color: #1877F2;
}

.share-option[data-platform="twitter"] .share-icon {
    color: #1DA1F2;
}

.share-option[data-platform="copy"] .share-icon {
    color: #6b7280;
}

.share-option span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.share-url {
    display: flex;
    gap: 8px;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #f9fafb;
}

.copy-url-btn {
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.copy-url-btn:hover {
    background: #2563eb;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Save button active state */
.save-btn.saved {
    background: #10b981;
    color: white;
}

.save-btn.saved:hover {
    background: #059669;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Breadcrumb */
.breadcrumb-section {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0px;
}

.breadcrumb-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-current {
    color: #333;
    font-size: 14px;
}

/* Blue Navbar */
.home-navbar {
    background-color: #1167B1;
    padding: 8px 0;
    margin-top: 0;
    border-radius: 0px;
    text-align: center;
    position: relative;
    z-index: 20;
}

.home-navbar .container {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.home-navbar .nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s;
}

.home-navbar .nav-link.nav-overflow {
    display: inline-block;
}

.home-navbar .nav-link::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: width 0.3s;
}

.home-navbar .nav-link:hover::after,
.home-navbar .nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.nav-overlay.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.nav-sidebar {
    position: fixed;
    right: -320px;
    top: 0;
    height: 100vh;
    width: 320px;
    max-width: 90%;
    background: #1167B1;
    color: #fff;
    z-index: 50;
    box-shadow: -8px 0 24px rgba(0,0,0,0.2);
    transition: right 0.28s ease;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-sidebar.open {
    right: 0;
}

.nav-sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nav-sidebar .sidebar-title {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.nav-sidebar .sidebar-close {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.nav-sidebar .sidebar-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-sidebar .sidebar-list a {
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    transition: background 0.18s;
    font-weight: 600;
}

.nav-sidebar .sidebar-list a:hover {
    background: rgba(255,255,255,0.08);
}

/* ============================================
   IMPROVED GALLERY SECTION WITH PROPER SIZING
   ============================================ */

/* Gallery Section - Desktop: Left-Right Layout */
.gallery-section.gallery-layout {
    display: flex;
    gap: 15px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

/* Main image on the left - Fixed height with proper aspect ratio */
.gallery-section.gallery-layout .main-image {
    flex: 3;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.gallery-section.gallery-layout .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.3s ease;
}

/* District overlay on main image */
.district-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Thumbnails on the right as 2x2 grid - Fixed sizes */
.gallery-section.gallery-layout .thumbnail-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    max-height: 500px;
}

.gallery-section.gallery-layout .thumbnail {
    height: 100%;
    min-height: 120px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.gallery-section.gallery-layout .thumbnail:hover {
    transform: scale(1.02);
    border-color: #007bff;
}

.gallery-section.gallery-layout .thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.gallery-section.gallery-layout .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* No Image Placeholder */
.gallery-section .main-image > div[style*="background: lightgray"] {
    background: #f8f9fa !important;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #6c757d;
}

/* Loading State for Images */
.gallery-section.gallery-layout .main-image img[src=""],
.gallery-section.gallery-layout .main-image img:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   END GALLERY IMPROVEMENTS
   ============================================ */

/* Details Section */
.details-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.details-left {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
}

/* Property Header */
.property-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.property-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.property-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.property-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 14px;
    transition: all 0.3s ease;
    border: none;
}

.save-btn {
    background-color: #5C3317;
    color: #fff;
}

.save-btn svg {
    stroke: #fff;
}

.save-btn:hover {
    background-color: #42240f;
}

.share-btn {
    background-color: #fff;
    color: #5C3317;
    border: 2px solid #5C3317;
}

.share-btn svg {
    stroke: #5C3317;
}

.share-btn:hover {
    background-color: #f3f3f3;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 15px;
    margin-bottom: 15px;
}

.property-location svg {
    color: #01880d;
}

.property-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: #fff;
    color: #1167B1;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.badge-item svg {
    stroke: #1167B1;
}

/* Price Section */
.price-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.price-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #97572B;
    margin-bottom: 0;
}

.price-label {
    font-size: 14px;
    color: #000000;
}

/* Overview Section */
.overview-section,
.property-details-section,
.features-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: left;
}

.overview-form {
    background-color: #e0f0ff;
    padding: 15px;
    border-radius: 0px;
}

.overview-grid {
    display: grid;
    gap: 8px;
}

.overview-row {
    display: flex;
    gap: 2px;
}

.overview-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    width: 150px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 3px solid #97572B;
    color: #000000;
}

.overview-label {
    font-size: 13px;
    margin-bottom: 5px;
}

.overview-value {
    font-size: 16px;
    font-weight: 600;
}

/* Property Details */
.details-description {
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}

.details-description strong {
    color: #333;
    display: block;
    margin: 15px 0 10px;
}

/* Features List */
.features-list {
    list-style: none;
    padding-left: 0;
}

.features-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.features-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 8px;
    height: 8px;
    background-color: #5C3317;
    border-radius: 50%;
}

/* Contact Card */
.details-right {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.contact-card {
    background-color: #00294C;
    border-radius: 8px;
    padding: 30px;
    color: #fff;
}

.contact-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* Advertiser Info */
.advertiser-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.advertiser-avatar {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advertiser-avatar svg {
    color: #fff;
}

.advertiser-details {
    display: flex;
    flex-direction: column;
}

.advertiser-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
}

.advertiser-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ccc;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    width: fit-content;
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #0066cc;
    background-color: #fff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #2a2929;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.btn-send {
    background: #018E37;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-end;
}

.btn-send:hover {
    background-color: #45a049;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-phone,
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    text-align: left;
}

.btn-phone {
    background-color: #fff;
    color: #00294C;
}

.btn-phone:hover {
    background-color: #f0f0f0;
}

.btn-phone svg {
    stroke: #00294C;
    flex-shrink: 0;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background-color: #22c55e;
}

.post-info {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Similar Properties */
.similar-properties-section {
    margin-top: 50px;
    margin-left: 50px;
    margin-right: 50px;
}

.similar-properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 25px;
}

.similar-property-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.similar-property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.similar-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.similar-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.similar-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.similar-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.similar-favorite:hover {
    background-color: #ff6b6b;
    color: #fff;
}

.similar-favorite.favorited {
    background-color: #ff6b6b;
    color: #fff;
}

.similar-content {
    padding: 15px;
}

.similar-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.similar-sqft,
.similar-type {
    background-color: #f0f0f0;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.similar-price {
    font-size: 20px;
    font-weight: 700;
    color: #d35400;
    margin-bottom: 8px;
}

.similar-price span {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

.similar-description {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.similar-description a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.similar-description a:hover {
    color: #0066cc;
}

.no-similar-properties {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.no-similar-properties p {
    color: #666;
    margin-bottom: 0;
}

/* Mobile Contact Section (Full Width) */
.contact-section-fullwidth {
    display: none;
    margin-bottom: 30px;
    width: 100%;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 1200px) {
    .details-section {
        grid-template-columns: 1fr 350px;
    }
    
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Adjust gallery for medium screens */
    .gallery-section.gallery-layout .main-image {
        height: 450px;
    }

    .gallery-section.gallery-layout .thumbnail {
        min-height: 110px;
    }
}

@media screen and (max-width: 992px) {
    .details-section {
        grid-template-columns: 1fr;
    }
    
    .details-right {
        display: none;
    }
    
    .contact-section-fullwidth {
        display: block;
    }

    /* Navbar responsive behavior */
    .home-navbar .container {
        justify-content: flex-start;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: 12px;
    }

    .home-navbar .nav-link.nav-overflow {
        display: none;
    }
    
    .similar-properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gallery adjustments for tablet */
    .gallery-section.gallery-layout .main-image {
        height: 400px;
    }
}

@media screen and (max-width: 768px) {
    .property-header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-title {
        font-size: 22px;
    }

    .property-actions {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
    }

    .action-btn {
        flex: 0 0 auto;
    }
    
    .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .price-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .price-amount {
        font-size: 28px;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .overview-item {
        width: 100%;
    }
    
    .similar-properties-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-left {
        order: 1;
    }

    .contact-right {
        order: 2;
    }

    .contact-buttons {
        flex-direction: row;
        gap: 10px;
    }

    .btn-phone,
    .btn-whatsapp {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 10px;
        font-size: 13px;
    }

    .contact-section-fullwidth .contact-card {
        padding: 20px;
    }

    .contact-section-fullwidth .contact-form-wrapper {
        gap: 15px;
    }

    .contact-section-fullwidth .contact-left,
    .contact-section-fullwidth .contact-right {
        gap: 10px;
    }

    /* Gallery mobile layout - Stack vertically */
    .gallery-section.gallery-layout {
        flex-direction: column;
        gap: 10px;
    }
    
    .gallery-section.gallery-layout .main-image {
        height: 300px;
        flex: none;
    }
    
    .gallery-section.gallery-layout .thumbnail-grid {
        flex: none;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: auto;
        gap: 8px;
        max-height: none;
    }
    
    .gallery-section.gallery-layout .thumbnail {
        aspect-ratio: 1/1;
        min-height: 80px;
    }

    .similar-properties-section {
        margin-left: 20px;
        margin-right: 20px;
    }

    .home-navbar .container {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: flex-start;
    }
    
    .home-navbar .nav-link {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .details-left,
    .contact-card,
    .contact-section-fullwidth .contact-card {
        padding: 20px;
    }
    
    .property-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .contact-section-fullwidth .contact-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .contact-section-fullwidth .advertiser-info {
        padding: 12px;
        margin-bottom: 20px;
        gap: 12px;
    }

    .contact-section-fullwidth .advertiser-avatar {
        width: 40px;
        height: 40px;
    }

    .contact-section-fullwidth .advertiser-name {
        font-size: 15px;
    }

    .contact-section-fullwidth .form-input,
    .contact-section-fullwidth .form-textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    .contact-section-fullwidth .btn-send {
        padding: 10px 16px;
        font-size: 14px;
    }

    .contact-section-fullwidth .btn-phone,
    .contact-section-fullwidth .btn-whatsapp {
        padding: 10px 12px;
        font-size: 13px;
    }

    .contact-buttons {
        flex-direction: column;
    }
    
    .btn-phone,
    .btn-whatsapp {
        width: 100%;
    }

    /* Gallery mobile - smaller height */
    .gallery-section.gallery-layout .main-image {
        height: 250px;
    }

    .gallery-section.gallery-layout .thumbnail {
        min-height: 70px;
    }

    .similar-properties-section {
        margin-left: 15px;
        margin-right: 15px;
    }

    .breadcrumb-section {
        padding: 10px 0;
    }
    
    .breadcrumb-link,
    .breadcrumb-separator,
    .breadcrumb-current {
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .home-navbar .container {
        gap: 12px;
    }
    
    .home-navbar .nav-link {
        font-size: 13px;
    }
}

/* Large Screens - Better proportions */
@media (min-width: 1400px) {
    .gallery-section.gallery-layout .main-image {
        height: 600px;
    }

    .gallery-section.gallery-layout .thumbnail-grid {
        max-height: 600px;
    }

    .gallery-section.gallery-layout .thumbnail {
        min-height: 145px;
    }
}

/* Ensure overlay and sidebar are above other page elements */
.nav-overlay,
.nav-sidebar {
    will-change: transform, opacity;
}

/* Additional utility classes */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    display: inline-block;
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image transition effects */
#mainImage {
    transition: opacity 0.3s ease;
}

.thumbnail {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Professional Alert Styles (for notifications) */
.professional-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #059669;
}

.professional-alert-error {
    background: #ef4444;
    border-left-color: #dc2626;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

.alert-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    padding: 4px;
    border-radius: 4px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Phone text reveal */
.phone-text {
    display: inline-block;
    transition: all 0.3s ease;
}