/* ===== INDEX PAGE SPECIFIC STYLES ===== */

/* Fix for image overflow clipping issues */
img {
  overflow: visible !important;
  overflow-clip-margin: unset !important;
}

/* Fix for hero image aspect ratio and zoom issues on wide screens */
@media (min-width: 969px) {
  .mainSdr-item img {
    height: 500px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  .mainSdr {
    height: 500px !important;
  }
}

@media (min-width: 1200px) {
  .mainSdr-item img {
    height: 600px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  .mainSdr {
    height: 600px !important;
  }
}

@media (min-width: 1400px) {
  .mainSdr-item img {
    height: 650px !important;
    object-fit: cover !important;
    object-position: center !important;
  }
  
  .mainSdr {
    height: 650px !important;
  }
}

/* Global Container Fixes for Wide Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px !important;
        margin: 0 auto !important;
        display: block !important;
        width: 90% !important;
    }
    
    body > section,
    body > div,
    #hero-container,
    #featured-cars-section,
    #booking-section-wrapper,
    #location-section,
    #info {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px !important;
        width: 85% !important;
    }
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 50px;
    width: 50px;
    background-color: #25d366;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.floating-btn:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Section Layout Fixes */
section, 
#hero-container,
#featured-cars-section,
#booking-section-wrapper,
#location-section,
#info {
    width: 100%;
    display: block;
    clear: both;
}

/* Booking Section */
#booking-section-wrapper {
    background-color: var(--snow);
    padding: 50px 0 70px;
    border-top: 2px solid #eee;
    border-bottom: 2px solid #eee;
    width: 100%;
    display: block;
}

#booking-section-wrapper .container {
    max-width: 900px;
    margin: 0 auto;
    width: 90%;
    position: relative;
    z-index: 1;
    display: block;
}

#booking-section-wrapper .section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 1em;
    color: var(--azul);
}

.section-title {
    color: var(--azul) !important;
}

#booking-section-wrapper .section-description {
    text-align: center;
    color: var(--gris);
    margin-bottom: 1.5rem;
}

.booking-content-area {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    color: var(--drk);
}

.booking-content-area h4 {
    color: var(--azul);
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Service Buttons */
.service-button {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 0, 58, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-button:hover::before {
    left: 100%;
}

.service-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--azul);
}

.service-button.selected {
    background: linear-gradient(135deg, var(--azul) 0%, var(--eblue) 100%);
    border-color: var(--azul);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(6, 0, 58, 0.3);
}

.service-button h5 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--azul);
}

.service-button p {
    margin: 5px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.service-button.selected h5 {
    color: var(--snow);
}

.service-button .service-duration,
.service-button .service-price {
    font-size: 0.9rem;
    color: var(--gris);
    margin: 4px 0;
}

.service-button.selected .service-duration,
.service-button.selected .service-price {
    color: rgba(255, 255, 255, 0.9);
}

/* Info Section */
.info {
    height: fit-content;
    min-height: 42vh;
    display: flex;
    background-color: var(--gris);
    text-align: center;
}

.infocnt {
    width: 90%;
    margin: 0 5%;
    height: 100%;
    justify-content: center;
    align-content: center;
}

.infocnt h2 {
    margin-top: 8%;
    color: #F8F8F8;
}

.infocnt p {
    width: 85%;
    margin-left: 7%;
    color: #F8F8F8;
    font-family: "bentonsans book";
    font-size: 1.5rem;
}

.infocnt button {
    width: 80%;
    height: 12%;
    border-radius: .7rem;
    background-color: var(--snow);
    padding: 2% 20%;
    margin-bottom: 2%;
    font-family: "bentonsans";
    font-size: 1rem;
    border: transparent;
    color: var(--azul);
    margin-bottom: 6%;
}

.infocnt button:hover {
    background-color: var(--eblue);
    color: var(--snow);
}

.infoctnr {
    display: flex;
    margin: 0;
    width: 50%;
    background-image: url(fachada.png);
    background-position: bottom;
    background-size: cover;
}

/* Main Slider for Index */
.mainSdr-photos#indexmainbnr {
    width: 500%;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    height: fit-content;
    transition: transform 0.5s ease;
}

/* Location Section */
#location-section {
    background: linear-gradient(135deg, var(--azul) 0%, var(--eblue) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

#location-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>') repeat;
    background-size: 30px 30px;
    pointer-events: none;
}

.location-content-grid {
    display: flex;
    flex-direction: column-reverse;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    justify-items: stretch;
    min-height: 400px;
    position: relative;
    z-index: 1;
}

.location-details {
    text-align: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.location-details h3 {
    color: var(--rojo) !important;
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.location-details p {
    color: var(--azul) !important;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.map-link {
    display: inline-block;
    background: white;
    color: var(--azul);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.map-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.map-container {
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.2);
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.map-container iframe {
    min-width: 400px;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ===== FEATURED CARS SECTION ===== */
#featured-cars-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--snow) 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block;
    border-top: 1px solid #e0e0e0;
}

#featured-cars-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1.5" fill="%23e0e0e0" opacity="0.2"/></svg>') repeat;
    background-size: 40px 40px;
    pointer-events: none;
}

#featured-cars-section .container {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
    position: relative;
    z-index: 1;
    display: block;
}

/* Wide Screen Specific Adjustments */
@media (min-width: 1200px) {
    #featured-cars-section .container {
        max-width: 1200px;
        width: 85%;
    }
    
    /* Hero Section */
    #hero-container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Booking Section */
    #booking-section-wrapper .container {
        max-width: 1000px;
        width: 85%;
    }
    
    /* Location Section */
    #location-section .container {
        max-width: 1100px;
        width: 85%;
    }
    
    /* Info Section */
    #info .container {
        max-width: 1200px;
        width: 85%;
    }
}

@media (min-width: 1400px) {
    #featured-cars-section .container {
        max-width: 1400px;
        width: 80%;
    }
    
    #booking-section-wrapper .container {
        max-width: 1200px;
        width: 80%;
    }
    
    #location-section .container {
        max-width: 1300px;
        width: 80%;
    }
    
    #info .container {
        max-width: 1400px;
        width: 80%;
    }
}

#featured-cars-section .section-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    text-align: center;
    margin-bottom: 0.5em;
    color: var(--azul);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

#featured-cars-section .section-subtitle {
    text-align: center;
    color: var(--gris);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
}

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

.car-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.car-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image {
    transform: scale(1.05);
}

.car-info {
    padding: 20px;
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.car-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--azul);
    margin-top: 0;
    margin-bottom: auto;
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.car-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #28a745;
    margin-bottom: 15px;
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    height: 35px;
    display: flex;
    align-items: center;
}

.car-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    height: 80px;
    overflow: hidden;
    align-content: flex-start;
}

.car-detail {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--gris);
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
}

.more-info-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--azul) 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.more-info-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, var(--azul) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

.loading-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--gris);
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--azul);
}

.loading-message p {
    font-size: 1.1rem;
    margin: 0;
}

.view-all-container {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Sofia Sans Semi Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.3);
    text-decoration: none;
    color: white;
}

/* Responsive Design */

/* Pantallas muy grandes - limitar a máximo 4 columnas */
@media (min-width: 1400px) {
    .cars-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin: 0 auto 40px auto;
        gap: 35px;
    }
    
    #featured-cars-section .container {
        max-width: 1400px;
    }
}

/* Pantallas grandes - máximo 3 columnas */
@media (min-width: 1200px) and (max-width: 1399px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* Pantallas medianas-grandes - máximo 3 columnas */
@media (min-width: 992px) and (max-width: 1199px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Pantallas medianas - 2 columnas */
@media (min-width: 769px) and (max-width: 991px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .cars-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .car-card {
        margin: 0 10px;
    }
    
    #featured-cars-section {
        padding: 40px 0;
    }
    
    #featured-cars-section .container {
        width: 95%;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .car-name {
        font-size: 1.2rem;
    }
    
    .car-price {
        font-size: 1.3rem;
    }
}
/* ===== Overrides: Featured car card adjustments ===== */
.car-name {
  text-align: center;
}

.car-price {
  color: var(--azul);
  background: transparent;
  text-align: center;
  margin-bottom: 5px;
  margin-top: 0px;
  margin-left: -15px;
  padding: 0;
  border-radius: 0;
  display: block;
  height: auto;
}

@media (max-width: 480px) {
  .cars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .car-price {
    font-size: 1.2rem;
  }
}