/* CSS for immobilie detail page */
:root {
    --twe-primary: #1a97cf;
    --twe-secondary: #18445d;
    --twe-text: #333;
    --twe-light-bg: #f8f9fa;
    --twe-border: #e0e0e0;
    --twe-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    --twe-radius: 8px;
    --twe-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.twe-immo-detail-container {
    font-family: 'Open Sans', Arial, sans-serif;
    line-height: 1.6;
    color: var(--twe-text);
    max-width: 1200px;
    margin: 20px auto;
    padding: 0;
    background-color: white;
    box-shadow: var(--twe-shadow);
    border-radius: var(--twe-radius);
    overflow: hidden;
}

/* Header section with back button */
.immo-detail-header {
    padding: 20px 30px;
    position: relative;
    border-bottom: 1px solid var(--twe-border);
    background: linear-gradient(to right, #ffffff, #f8f9fa);
}

.back-to-list {
    margin-bottom: 10px;
    animation: fadeInLeft 0.5s ease-out;
}

.back-to-list a {
    display: inline-flex;
    align-items: center;
    color: var(--twe-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--twe-transition);
}

.back-to-list a svg {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.back-to-list a:hover {
    color: var(--twe-secondary);
}

.back-to-list a:hover svg {
    transform: translateX(-3px);
}

.twe-immo-detail-container .immo-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--twe-text);
    margin: 0;
    padding: 0;
    background-color: transparent;
    transition: var(--twe-transition);
    animation: fadeInDown 0.5s ease-out;
}

.immo-id {
    margin-top: 10px;
    font-size: 14px;
    color: #777;
    animation: fadeIn 0.8s ease-out;
}

.id-label {
    font-weight: 600;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery */
.immo-detail-gallery {
    margin-bottom: 20px;
    background-color: #fff;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.main-image-container {
    text-align: center;
    margin: 0 auto;
    border: none;
    overflow: hidden;
    position: relative;
    height: 70vh; /* Reduced height */
    width: 100%;
}

#twe-main-immo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    transition: transform 0.6s ease;
}

#twe-main-immo-image:hover {
    transform: scale(1.03);
}

.thumbnail-images-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
    padding: 15px;
    background-color: #fafafa;
    overflow-x: auto;
    scrollbar-width: thin;
    max-width: 100%;
    margin: 0 auto;
}

.thumbnail-images-container::-webkit-scrollbar {
    height: 5px;
}

.thumbnail-images-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 5px;
}

.twe-thumb-immo-image {
    width: 80px; /* Smaller thumbnails */
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--twe-radius);
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 0.8;
}

.twe-thumb-immo-image:hover,
.twe-thumb-immo-image.active {
    border-color: var(--twe-secondary);
    opacity: 1;
    transform: translateY(-3px);
}

/* Facts Overview */
.immo-facts-overview {
    display: flex;
    justify-content: space-between;
    background-color: #f5f5f5;
    padding: 0;
    margin: 0 auto 25px;
    text-align: center;
    max-width: 900px;
    border-radius: 0 0 var(--twe-radius) var(--twe-radius);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fact-item {
    flex: 1;
    padding: 15px 5px;
    border-right: 1px solid rgba(0,0,0,0.05);
    transition: var(--twe-transition);
}

.fact-item:last-child {
    border-right: none;
}

.fact-item:hover {
    background-color: rgba(0, 102, 179, 0.05);
    transform: translateY(-2px);
}

.fact-item .fact-icon {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto 8px;
    background-color: rgba(0, 102, 179, 0.1);
    border-radius: 50%;
    line-height: 36px;
    color: var(--twe-primary);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.fact-item:hover .fact-icon {
    transform: scale(1.1);
    background-color: rgba(0, 102, 179, 0.15);
}

.fact-item.price .fact-icon {
    background-color: rgba(255, 126, 0, 0.1);
    color: var(--twe-secondary);
}

.fact-item.price:hover .fact-icon {
    background-color: rgba(255, 126, 0, 0.15);
}

.fact-item .fact-icon svg {
    margin-top: 10px;
    stroke: var(--twe-primary);
}

.fact-item.price .fact-icon svg {
    stroke: var(--twe-secondary);
}

.fact-item .fact-label {
    display: block;
    font-size: 13px;
    color: #667;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.fact-item .fact-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--twe-primary);
}

.fact-item.price .fact-value {
    color: var(--twe-secondary);
}

/* Detail Columns Layout */
.immo-detail-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    padding: 0 30px 30px;
}

.immo-main-details {
    flex: 2;
    min-width: 320px;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.immo-sidebar-details {
    flex: 1;
    min-width: 280px;
    animation: fadeIn 0.8s ease-out 0.5s both;
}

/* Detail Sections */
.immo-detail-section {
    background-color: #fff;
    padding: 22px 25px;
    margin-bottom: 25px;
    border-radius: var(--twe-radius);
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    border: 1px solid var(--twe-border);
    transition: var(--twe-transition);
}

.immo-detail-section:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: #d8d8d8;
}

.immo-detail-section h2 {
    font-size: 18px;
    color: var(--twe-primary);
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--twe-border);
    position: relative;
}

.immo-detail-section h2:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--twe-secondary);
    border-radius: 2px;
}

/* Detail Table */
.immo-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.immo-detail-table tr {
    transition: background-color 0.2s ease;
}

.immo-detail-table tr:hover {
    background-color: rgba(0, 102, 179, 0.03);
}

.immo-detail-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    line-height: 1.5;
}

.immo-detail-table tr:last-child td {
    border-bottom: none;
}

.immo-detail-table td:first-child {
    font-weight: 600;
    color: #444;
    width: 40%;
    position: relative;
}

.immo-detail-table td:first-child:after {
    content: ':';
    position: absolute;
    right: 3px;
    color: #aaa;
}

/* Descriptions */
.immo-description-text h3 {
    font-size: 17px;
    color: #333;
    margin-top: 22px;
    margin-bottom: 12px;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.immo-description-text h3:before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    height: 70%;
    width: 5px;
    background-color: var(--twe-secondary);
    border-radius: 2px;
}

.immo-description-text div:first-child h3 {
    margin-top: 0;
}

.immo-description-text p {
    margin-bottom: 1.2em;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* Address & Map */
.immo-address-map p {
    font-size: 15px;
    margin-bottom: 15px;
    line-height: 1.6;
}

#twe-immo-map-detail {
    border: 1px solid var(--twe-border);
    border-radius: var(--twe-radius);
    overflow: hidden;
    transition: var(--twe-transition);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}

#twe-immo-map-detail:hover {
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* Contact / Agent Section */
.contact-agent {
    background-color: #f9f9f9 !important;
    border: 1px solid var(--twe-border) !important;
}

.contact-agent h2 {
    color: var(--twe-secondary);
}

.contact-agent p {
    font-size: 15px;
}

/* Contact form styling */
.twe-contact-form .form-row {
    margin-bottom: 15px;
}

.twe-contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
    font-size: 14px;
}

.twe-contact-form input[type="text"],
.twe-contact-form input[type="email"],
.twe-contact-form input[type="tel"],
.twe-contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--twe-radius);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    font-size: 14px;
    transition: var(--twe-transition);
}

.twe-contact-form input:focus,
.twe-contact-form textarea:focus {
    outline: none;
    border-color: var(--twe-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.1);
}

.twe-contact-form .form-privacy {
    display: flex;
    align-items: flex-start;
    margin: 15px 0;
}

.twe-contact-form .form-privacy input[type="checkbox"] {
    margin-top: 4px;
    margin-right: 10px;
}

.twe-contact-form .form-privacy label {
    font-weight: normal;
    font-size: 13px;
    line-height: 1.4;
}

.twe-contact-form .form-privacy a {
    color: var(--twe-primary);
    text-decoration: none;
}

.twe-contact-form .twe-submit-btn {
    background-color: var(--twe-secondary);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--twe-radius);
    cursor: pointer;
    transition: var(--twe-transition);
    display: block;
    width: 100%;
    font-size: 16px;
}

.twe-contact-form .twe-submit-btn:hover {
    background-color: var(--twe-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.twe-contact-form .form-error {
    padding: 10px;
    margin-bottom: 15px;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    color: #d32f2f;
    border-radius: 3px;
    font-size: 14px;
}

.twe-contact-form .success-message {
    padding: 15px;
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    border-radius: 3px;
    text-align: center;
    font-weight: 600;
}

/* Modern badges */
.immo-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--twe-primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    box-shadow: 0 2px 4px rgba(0, 102, 179, 0.2);
}

.immo-badge.energy {
    background-color: #27ae60;
}

.immo-badge.warning {
    background-color: #e67e22;
}

/* Virtual Tour */
.virtual-tour {
    text-align: center;
}

.virtual-tour-link {
    margin: 15px 0;
}

.virtual-tour-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--twe-primary) 0%, #0078d4 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--twe-radius);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(0, 102, 179, 0.2);
}

.virtual-tour-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 102, 179, 0.3);
    color: white;
    background: linear-gradient(135deg, #0078d4 0%, var(--twe-primary) 100%);
}

.virtual-tour-icon {
    margin-right: 10px;
}

.virtual-tour-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 102, 179, 0.25);
}

/* Address Section */
.immo-address {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.address-street {
    font-weight: 600;
}

.address-city {
    color: #555;
}

/* Extra animations */
.animated-section {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

@keyframes pulseLight {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 126, 0, 0.4);
    }
    70% { 
        box-shadow: 0 0 0 8px rgba(255, 126, 0, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(255, 126, 0, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .main-image-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .immo-facts-overview {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .fact-item {
        flex: 1 0 50%;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .immo-detail-columns {
        flex-direction: column;
        padding: 0 15px 20px;
    }
    
    .immo-main-details, .immo-sidebar-details {
        flex: none;
        width: 100%;
    }
    
    .immo-detail-header {
        padding: 15px;
    }
    
    .twe-immo-detail-container .immo-title {
        font-size: 22px;
    }
    
    .fact-item .fact-value {
        font-size: 18px;
    }
    
    .main-image-container {
        height: 300px;
    }
    
    .fact-item .fact-icon {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 14px;
    }
    
    .fact-item .fact-icon svg {
        margin-top: 8px;
        width: 14px;
        height: 14px;
    }
    
    .virtual-tour-button {
        width: 100%;
        padding: 12px 15px;
    }
    
    .twe-contact-form .twe-submit-btn {
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .fact-item {
        flex: 100%;
        padding: 10px 5px;
    }
    
    .main-image-container {
        height: 250px;
    }
    
    .immo-detail-section {
        padding: 15px;
    }
    
    .twe-immo-detail-container .immo-title {
        font-size: 20px;
    }
}
