/* ============================================
   FLAT DETAILS PAGE RESPONSIVE STYLES
   ============================================ */

/* 🔵 Desktop – 1024px to 1439px */
@media (max-width: 1439px) {

  /* Main Content */
  .main-content {
    margin-top: 85px;
  }

  /* Flat Details Header */
  .room-details-header {
    padding: 40px 30px;
  }

  .room-name {
    font-size: 36px;
  }

  .room-reference {
    font-size: 14px;
  }

  .room-description {
    font-size: 20px;
  }
    
  /* Flat Info Section */
  .room-info-container {
    max-width: 1200px;
    padding: 0 30px;
  }

  /* Flat Tabs */
  .room-tabs {
    gap: 15px;
  }

  .room-tab {
    font-size: 19px;
    padding: 10px 20px;
  }

  .room-tab.active {
    color: var(--blue);
    font-size: 20px;
    font-weight: var(--font-semibold);
  }

  /* Characteristics */
  .characteristics-title {
    font-size: 18px;
  }
  .room-info-right {
    height: 560px;
  }
  .characteristic-text {
    font-size: 18px;
  }

  /* Images Gallery */
  .main-image-container {
    height: 400px;
  }

  /* Pricing Section */
  .main-price {
    font-size: 40px;
  }

  .price-subtitle {
    font-size: 15px;
  }

  /* Rental Conditions */
  .rental-conditions-block,
  .availability-block,
  .zona-block,
  .location-block {
    width: 100%;
  }

  .availability-title {
    font-size: 22px;
  }

  .conditions-title,
  .zona-title,
  .location-title {
    font-size: 26px;
  }

  .location-map-container {
    width: 100%;
    max-width: 540px;
  }

  /* Contact Block */
  .contact-block {
    margin-top: 30px;
  }

  .contact-title {
    font-size: 24px;
  }
}

/* 🟡 Tablet – 768px to 1023px */
@media (max-width: 1023px) {
  /* Main Content */
  .main-content {
    margin-top: 80px;
  }

  /* Flat Details Header */
  .room-details-header {
    padding: 30px 20px;
  }
  .pricing-row {
    padding-left: 35px;
  }
  /* Flat Name and Reference Section */
  .room-name-section {
    margin-left: 150px;
    margin-bottom: 15px;
  }

  .room-name {
    font-size: 32px;
  }

  .room-reference {
    font-size: 13px;
  }

  /* Flat Description Section */
  .room-description-section {
    margin-left: 110px;
  }

  .room-description {
    font-size: 18px;
  }

  /* Flat Info Section */
  .room-info-section {
    padding: 30px 0;
  }

  .room-info-container {
    max-width: 100%;
    padding: 0 0;
    flex-direction: column;
  }

  /* Left Column - Full Width */
  .room-info-left {
    max-width: 900px;
    width: 100%;
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 0 20px;
  }

  /* Right Column - Full Width and First */
  .right-column-container {
    width: 100%;
    order: 1;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .room-info-right {
    width: 100%;
    max-width: 100%;
    height: auto;
 padding: 20px 0 20px 0;
  }

  /* Flat Tabs */
  .room-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
  }

  .room-tab {
    flex: 1;
    min-width: 150px;
    font-size: 17px;
    padding: 10px 15px;
  }

  .room-tab.active {
    color: var(--blue);
    font-size: 18px;
    font-weight: var(--font-semibold);
  }

  /* Tab Content */
  .room-tab-content {
    width: 100%;
  }

  /* Characteristics Grid - 2 columns */
  .characteristics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .characteristics-col {
    grid-column: span 1;
  }

  /* Images Gallery */
  .room-images-gallery {
    width: 100%;
  }

  .main-image-container {
    width: 100%;
    max-width: 100%;
    height: 400px;
    margin: 0 auto;
  }

  .thumbnail-gallery {
    margin-top: 15px;
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
  }

  .thumbnails-container {
    width: 100%;
    overflow: hidden;
  }

  .thumbnail-item {
    width: 80px;
    height: 80px;
  }

  /* Pricing and Conditions Container */
  .pricing-and-conditions {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
  }

  /* Pricing Section */
  .pricing-section {
    margin-top: 0;
    width: 100%;
    max-width: calc(50% - 10px);
    flex: 1 1 calc(50% - 10px);
  }

  .pricing-container {
    flex-direction: column;
    gap: 20px;
    padding: 25px 20px;
    max-width: 100%;
    margin: 0;
  }

  /* Rental Conditions Block */
  .rental-conditions-block {
    margin-top: 0;
    margin-bottom: 0;
    max-width: calc(50% - 10px);
    width: 100%;
    flex: 1 1 calc(50% - 10px);
    padding-left: 20px;
    padding-top: 20px;
  }

  /* Apartment Description */
  .apartment-description-section {
    width: 100%;
    margin-top: 25px;
  }

  .apartment-description-paragraph {
    font-size: 14px;
  }

  /* Contact Block */
  .contact-block {
    width: 100%;
    max-width: 550px;
    margin-top: 30px;
    padding: 25px 20px;
  }

  .contact-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .contact-actions {
    flex-direction: row;
    gap: 15px;
  }

  .whatsapp-button,
  .contact-button {
    max-width: 100%;
  }

  /* Renting Reservation Section */
  .renting-reservation-section {
    padding: 40px 0;
  }

  .renting-reservation-container {
    max-width: 100%;
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
  }

  .renting-left,
  .renting-right {
    width: 100%;
    max-width: 700px;
  }

  .renting-left {
    order: 1;
    margin-bottom: 30px;
  }

  .renting-right {
    order: 2;
  }

  .characteristics-title,
  .other-rooms-title,
  .apartment-description-title,
  .conditions-title,
  .zona-title,
  .location-title {
    font-size: 22px;
  }

  /* Reservation Form */
  .date-selection-row {
    flex-direction: column;
    gap: 15px;
  }

  .date-col {
    width: 100%;
    flex: 1 1 calc(50% - 10px);
    padding-left: 20px;
    padding-top: 20px;
  }

  .availability-block,
  .zona-block,
  .location-block {
    margin-bottom: 25px;
    max-width: 650px;
    width: 100%;
  }

  /* Months Grid */
  .months-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
  }

  .month-item {
    width: 100%;
  }

  /* Location Map */
  .location-map-container {
    height: 300px;
    max-width: 650px;
    width: 100%;
  }
}

/* 🟠 Large Phones – 480px to 767px */
@media (max-width: 767px) {
  /* Main Content */
  .main-content {
    margin-top: 70px;
  }

  .room-info-left {
    padding: 0 12px;
  }

  /* Hide original header on mobile, show mobile duplicate */
  .room-details-header:not(.room-details-header-mobile) {
    display: none;
  }

  .room-details-header-mobile {
    display: block;
    padding: 25px 0 15px 0;
    /* Adjust padding for mobile placement */
  }

  /* Room Details Header */
  .room-details-header {
    padding: 8px 15px;
  }

  .room-name-section {
    margin-left: 25px;
    margin-bottom: 8px;
  }

  .room-name {
    font-size: 26px;
    margin-bottom: 8px;
  }

  .room-description-section {
    margin-left: 25px;
  }

  .room-description {
    font-size: 16px;
    line-height: 1.4;
  }

  /* Flat Info Section */
  .room-info-section {
    padding-top: 25px;
    padding-bottom: 0;
  }

  .room-info-container {
    padding: 0 0;
  }

  /* Flat Tabs - Stack Vertically */
  .room-tabs {
    gap: 8px;
    margin-bottom: 0px;
  }

  .room-tab {
    width: 100%;
    font-size: 15px;
    padding: 12px 15px;
    text-align: center;
  }

  .room-tab.active {
    font-size: 16px;
    font-weight: var(--font-medium);
  }

  .room-tab.active::after {
    height: 2px;
  }

  /* Tab Content */
  .room-tab-content {
    padding: 8px 10px;
  }

  .characteristics-title {
    font-size: 20px;
    margin-bottom: 5px;
  }

  /* Characteristics Grid - 1 column on mobile */
  .characteristics-grid {
    gap: 12px;
  }

  .characteristic-item {
    padding: 10px 0;
  }

  .characteristic-icon {
    width: 29px;
    height: 29px;
  }

  .characteristic-text {
    font-size: 16px;
  }

  /* Floor Plan */
  .floor-plan-container {
    padding: 15px 0;
  }

  .floor-plan-image {
    max-height: 300px;
    cursor: pointer;
  }

  /* Apartment Description */
  .apartment-description-section {
    margin-top: 0;
    padding: 10px 10px;
    padding-bottom: 0px;
    padding-left: 0px;
  }

  .apartment-description-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .apartment-description-paragraph {
    line-height: 1.5;
    margin-bottom: 0px;
  }

  /* Images Gallery */
  .right-column-container {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
  }

  .room-info-right {
    margin-bottom: 20px;
    width: 100%;
    /* Full width on mobile */
    max-width: 100%;
    /* Override any max-width */
    padding: 0;
    /* Remove padding to eliminate white space */
    background-color: transparent;
    /* Remove background if needed */
  }

  .room-images-gallery {
    width: 100%;
    /* Full width */
    gap: 8px;
    /* Reduce gap between main image and thumbnails */
  }

  .main-image-container {
    width: 100%;
    /* Full width */
    max-width: 100%;
    /* Override desktop max-width */
    height: 280px;
    border-radius: 10px;
    touch-action: pan-x;
    /* Enable horizontal swipe */
    cursor: grab;
    /* Mobile scrolling properties */
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    scroll-behavior: smooth;
  }

  .main-image-container::-webkit-scrollbar {
    display: none;
  }

  .main-image-container:active {
    cursor: grabbing;
  }

  /* Hide navigation arrows on mobile */
  .main-image-nav {
    display: none !important;
  }

  .main-room-image {
    border-radius: 10px;
    /* Mobile scrolling properties */
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* Thumbnail Gallery */
  .thumbnail-gallery {
    margin-top: 12px;
    padding: 0;
    /* Remove padding for full width */
    width: 100%;
    /* Full width */
  }

  .thumbnails-container {
    padding: 0;
    /* Remove padding for full width */
    width: 100%;
    /* Full width */
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .thumbnails-track {
    /* Faster transitions on mobile for snappier feel */
    transition: transform 0.25s cubic-bezier(0.2, 0.65, 0.3, 0.95);
  }

  .thumbnail-item {
    width: 90px;
    /* Increased from 70px */
    height: 90px;
    /* Increased from 70px */
    transition: all 0.15s cubic-bezier(0.2, 0.65, 0.3, 0.95);
  }

  .gallery-nav {
    width: 32px;
    height: 32px;
  }
  .gallery-nav {
    display: none !important;
  }
  /* Pricing and Conditions Container - Keep in Row on Mobile */
  .pricing-and-conditions {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
  }

  /* Pricing Section */
  .pricing-section {
    margin-top: 15px;
    width: 100%;
    max-width: calc(50% - 7.5px);
    flex: 1 1 calc(50% - 7.5px);
  }

  .pricing-container {
    flex-direction: row;
    gap: 3px;
    padding: 15px 10px;
    border-radius: 15px;
  }

  .pricing-row {
    padding-left:20px;
  }

  .main-price {
  }

  .pricing-col {
    width: 100%;
  }

  /* Rental Conditions Block */
  .rental-conditions-block {
    margin-top: 15px;
    margin-bottom: 0;
    padding: 15px 10px;
    border-radius: 15px;
    width: 100%;
    max-width: calc(50% - 7.5px);
    flex: 1 1 calc(50% - 7.5px);
  }

  .conditions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .condition-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .condition-label {

  }

  .condition-value {
    display: block;
  }

  /* Contact Block */
  .contact-block {
    margin-top: 25px;
    padding: 20px 15px;
    border-radius: 15px;
  }

  .contact-title {
    font-size: 20px;
    margin-bottom: 18px;
  }

  .contact-actions {
    flex-direction: row;
    width: 100%;
  }

  .whatsapp-button,
  .contact-button {
    width: 100%;
    height: 45px;
    font-size: 16px;
  }

  /* Renting Reservation Section */
  .renting-reservation-section {
    padding: 30px 0;
  }

  .renting-reservation-container {
    padding: 0 15px;
  }

  /* Rental Conditions */
  .rental-conditions-block,
  .availability-block,
  .zona-block,
  .location-block {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding: 20px 15px;
    border-radius: 15px;
  }

  .conditions-title,
  .availability-title,
  .zona-title,
  .location-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .conditions-list {
    gap: 3px;
  }

  .condition-item {
    font-size: 13px;

    gap: 5px;
  }

  .condition-label {
    font-weight: var(--font-regular);
  }

  .condition-value {
    display: block;
  }

  /* Availability */
  .availability-header {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
  }

  .availability-guide {
    justify-content: center;
    gap: 20px;
  }

  .guide-text {
  }

  .months-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .month-item {  }

  /* La Zona */
  .zona-list {
    gap: 3px;
  }

  .zona-item {
    font-size: 12px;
    display: contents;
    gap: 5px;
  }

  .zona-label {
    font-weight: 600;
  }

  .zona-value {
    display: block;
    margin-bottom: 10px;
  }

  .zona-transport-detail {
    padding-left: 15px;
  }

  /* Location Map */
  .location-map-container {
    height: 250px;
    border-radius: 10px;
  }

  /* Floor Plan Modal */
  .floor-plan-modal .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 15px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    font-size: 28px;
  }
  .characteristics-col {
    gap: 0px;
  }
}

/* 🔴 Small Phones – up to 479px */
@media (max-width: 479px) {
  /* Main Content */
  .main-content {
    margin-top: 60px;
  }

  .room-title-line {
    gap: 5px;
  }

  /* Flat Details Header */
  .room-details-header {
    padding-top: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .room-name {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .room-description {
    font-size: 12px;
    font-weight: var(--font-semibold);
    line-height: 1.4;
  }

  /* Flat Info Section */
  .room-info-section {
    padding-top: 20px;
    padding-bottom: 0;
  }

  .room-info-container {
    padding: 0 0;
    gap: 5px;
  }

  /* Flat Tabs */
  .room-tab {
    font-size: 15px;
    padding: 10px 12px;
  }

  .room-tab.active {
    font-size: 16px;
  }

  /* Tab Content */
  .room-tab-content {
    padding: 15px 5px;
  }

  .characteristics-title {
    margin-bottom: 6px;
  }

  /* Characteristics */
  .characteristic-item {
    padding: 8px 0;
  }

  .characteristic-icon {}

  .characteristic-text {}

  /* Floor Plan */
  .floor-plan-image {
    max-height: 250px;
  }

  /* Apartment Description */
  .apartment-description-section {
    width: 100%;
    padding: 15px 5px;
    padding-bottom: 0px;
    margin-top: 0;
  }

  .apartment-description-title {
    margin-bottom: 5px;
  }

  .apartment-description-paragraph {
    line-height: 1.5;
    margin-bottom: 10px;
  }

  /* Images Gallery */
  .main-image-container {
    height: 240px;
    border-radius: 8px;
  }

  /* Thumbnail Gallery */
  .thumbnail-gallery {
    margin-top: 10px;
  }

  .thumbnail-item {
    width: 80px;
    height: 80px;
  }

  .gallery-nav {
    width: 28px;
    height: 28px;
  }

  .gallery-nav svg {
    width: 16px;
    height: 16px;
  }

  /* Pricing and Conditions Container - Stack Vertically on Small Phones */
  .pricing-and-conditions {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: center;
  }

  /* Pricing Section */
  .pricing-section {
    margin-top: 15px;
    width: 100%;
    max-width: 100%;
  }

  .pricing-container {
    padding: 18px 10px;
    max-width: 350px;
    margin: 0 auto;
  }

  .main-price {
   
  }

  /* Rental Conditions Block */
  .rental-conditions-block {
    margin-top: 0;
    padding: 18px 35px;
    width: 100%;
    max-width: 100%;
  }

  .conditions-list {
    max-width: 350px;
    margin: 0 auto;
  }
  .condition-item {
    display: flex;
    flex-direction: row;
    gap: 3px;
  }
  .expenses-icon {
    width: 20px;
    height: 20px;
  }

  /* Contact Block */
  .contact-block {
    margin-top: 20px;
    padding: 18px 12px;
  }

  .contact-title {
    /* font-size: 18px; */
    margin-bottom: 15px;
  }

  .whatsapp-button {
    padding: 10px;
  }

 

  .contact-button {
    padding: 12px;
    font-size: 14px;
  }

  /* Renting Reservation Section */
  .renting-reservation-section {
    padding-top: 0;
    padding-bottom: 25px;
  }

  .renting-reservation-container {
    padding: 0 12px;
  }

  /* Rental Conditions */
  .availability-block,
  .zona-block,
  .location-block {
    margin-bottom: 20px;
    padding: 0 12px 18px 12px;
  }

  .conditions-title,
  .availability-title,
  .zona-title,
  .location-title {
    margin-bottom: 12px;
  }

  .condition-item,
  .zona-item {
    font-size: 12px;
  }

  /* Availability */
  .availability-guide {
    gap: 15px;
  }

  .guide-color {
    width: 12px;
    height: 12px;
  }

  .guide-text {}

  .months-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .month-item {}

  /* Location Map */
  .location-map-container {
    height: 220px;
  }

  /* Floor Plan Modal */
  .floor-plan-modal .modal-content {
    width: 98%;
    padding: 10px;
  }

  .modal-close {
    top: 5px;
    right: 5px;
    font-size: 24px;
    width: 30px;
    height: 30px;
  }

  .modal-image {
    max-height: 70vh;
  }
  .contact-block .whatsapp-button {
  width: 200px;
  height: 50px;

}

.contact-block .contact-button {
  width: 200px;
  height: 50px;
  font-size: 16px;
  font-weight: var(--font-regular);
}
}

/* ============================================
   UTILITY CLASSES FOR RESPONSIVE
   ============================================ */

/* Hidden class for mobile */
@media (max-width: 767px) {
  .hidden {
    display: none !important;
  }

  .visible-mobile {
    display: block !important;
  }
}

/* Ensure proper spacing on all devices */
@media (max-width: 1023px) {
  .form-section {
    margin-bottom: 20px;
  }
}

/* Touch-friendly click areas on mobile */
@media (max-width: 767px) {
  button,
  .room-tab,
  .thumbnail-item {
    min-height: 44px;
    min-width: 44px;
  }
}
