/* Variables globales */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --success-color: #25D366;
    --success-hover: #20bd5a;
    --gray-700: #374151;
    --gray-900: #111827;
    --gradient-primary: linear-gradient(45deg, #0d6efd, #0b5ed7);
}

/* Estilos base y reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    overflow-x: hidden;
}

/* Cards de yates */
.yacht-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.yacht-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-img-wrapper {
    position: relative;
    padding-top: 66.67%;
    /* Aspect ratio 3:2 */
    overflow: hidden;
}

.card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 2;
}

/* Animaciones */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yacht-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.caracteristicas {
    list-style: none;
    padding: 0;
}

.caracteristicas li {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Modal de yates */
.modal-content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.modal-body {
    padding: 0;
}

.yacht-gallery {
    background: #f8fafc;
}

.yacht-gallery .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.yacht-info {
    padding: 2rem;
}

.yacht-info h6 {
    color: var(--gray-900);
}

.yacht-info ul li {
    color: var(--gray-700);
}

/* Loading y Error */
.error-message {
    text-align: center;
    padding: 2rem;
    color: var(--gray-700);
}

.error-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    color: white;
    overflow: hidden;
    margin-top: -76px;
    padding-top: 76px;
    background-color: #0f172a;
}

.hero-section .z-2 {
    z-index: 2;
    position: relative;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Divider personalizado */
.divider-custom {
    width: 80px;
    margin: 0 auto;
}

.divider-line {
    height: 4px;
    border-radius: 2px;
}

/* Botones */
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    color: white;
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid white;
    color: white;
    transition: all 0.3s ease;
    background: transparent;
    text-decoration: none;
}

.hero-btn-secondary:hover {
    background: white;
    color: var(--gray-900);
}

/* WhatsApp botón */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--success-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    background-color: var(--success-hover);
    color: white;
}

/* Animaciones */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal personalizado */
.modal-backdrop.show {
    opacity: 0.85;
    backdrop-filter: blur(8px);
}

.modal-content {
    border: none;
    border-radius: 1.5rem;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content {
    max-height: 90vh;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

/* Galería modal */
.modal-gallery {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.modal-gallery .swiper {
    width: 100%;
    height: 400px;
}

.modal-gallery .swiper-slide {
    background-position: center;
    background-size: cover;
}

/* Detalles modal */
.modal-details {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 1rem;
    margin: 1rem 0;
}

.modal-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.modal-details-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.modal-details-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos base */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
}

/* Navegación */
.navbar {
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    margin-top: -76px;
    position: relative;
    background-color: var(--gray-900);
}

.hero-bg {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Botones */
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    color: white;
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
    background: white;
    color: var(--gray-900);
}

/* Tarjetas de yates */
.yacht-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.yacht-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.yacht-card .card-img-wrapper {
    position: relative;
    padding-top: 66.67%;
    /* Ratio 3:2 */
    overflow: hidden;
}

.yacht-card .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.yacht-card:hover .card-img-top {
    transform: scale(1.05);
}

.yacht-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

/* WhatsApp botón */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--success-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.whatsapp-btn:hover {
    background-color: var(--success-hover);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .yacht-card .card-img-wrapper {
        padding-top: 75%;
        /* Ratio 4:3 para móviles */
    }

    .hero-section {
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Utilidades */
.mb-0 {
    margin-bottom: 0 !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.text-center {
    text-align: center !important;
}

.text-white {
    color: white !important;
}

.list-unstyled {
    list-style: none !important;
    padding-left: 0 !important;
}

/* Modal de reserva */
.yacht-info-mini {
    border-left: 4px solid var(--primary-color);
}

.yacht-info-mini h6 {
    color: var(--primary-color);
}

#modal-reserva .form-control:focus,
#modal-reserva .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#modal-reserva .btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    font-weight: 600;
}

#modal-reserva .btn-success:hover {
    background: var(--success-hover);
    border-color: var(--success-hover);
}

/* Formateo de descripción */
.descripcion-formateada {
    line-height: 1.6;
    white-space: pre-line;
}

.descripcion-formateada strong {
    color: var(--primary-color);
    font-weight: 600;
}

.descripcion-formateada br {
    margin-bottom: 0.5rem;
}

/* Galería del modal */
.yacht-gallery {
    max-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.yacht-gallery .swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* Paginación */
.yacht-gallery .swiper-pagination {
    bottom: 15px !important;
    z-index: 10;
}

.yacht-gallery .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 4px;
}

.yacht-gallery .swiper-pagination-bullet-active {
    background: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Botones de navegación */
.yacht-gallery .swiper-button-next,
.yacht-gallery .swiper-button-prev {
    color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    margin-top: -25px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.yacht-gallery .swiper-button-next:hover,
.yacht-gallery .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1);
}

.yacht-gallery .swiper-button-next:after,
.yacht-gallery .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: bold !important;
}

.yacht-gallery .swiper-button-next {
    right: 15px !important;
}

.yacht-gallery .swiper-button-prev {
    left: 15px !important;
}