/* Estilos para el listado de botes */

/* Grid principal */
.botes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Tarjeta de bote */
.bote-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Contenedor de imagen */
.bote-card-imagen {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.bote-card-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.bote-card:hover .bote-card-imagen img {
    transform: scale(1.05);
}

/* Precio */
.bote-precio {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(52, 152, 219, 0.9);
    color: #fff;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
}

/* Contenido */
.bote-card-contenido {
    padding: 20px;
    flex-grow: 1;
}

.bote-titulo {
    margin: 0 0 15px;
    font-size: 20px;
    line-height: 1.3;
}

.bote-titulo a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.bote-titulo a:hover {
    color: #3498db;
}

/* Metadatos */
.bote-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.bote-meta-item {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 8px;
    color: #7f8c8d;
    font-size: 14px;
}

.bote-meta-item i {
    margin-right: 5px;
    color: #3498db;
}

/* Extracto */
.bote-extracto {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 0;
}

.bote-extracto p {
    margin: 0;
}

/* Footer de tarjeta */
.bote-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.bote-ubicacion {
    color: #7f8c8d;
    font-size: 14px;
}

.bote-ubicacion i {
    margin-right: 5px;
    color: #e74c3c;
}

.bote-boton {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.bote-boton:hover {
    background-color: #2980b9;
    color: #fff;
}

/* Buscador de botes */
.buscador-botes {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.buscador-botes h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #2c3e50;
}

.buscador-fila {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.campo-busqueda {
    padding: 0 10px;
    margin-bottom: 15px;
    flex: 0 0 33.333%;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .campo-busqueda {
        flex: 0 0 50%;
    }
}

@media (max-width: 576px) {
    .campo-busqueda {
        flex: 0 0 100%;
    }
}

.campo-busqueda label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #444;
}

.campo-busqueda input,
.campo-busqueda select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

.campo-busqueda input:focus,
.campo-busqueda select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.campo-busqueda-submit {
    padding: 10px;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.boton-buscar {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.boton-buscar:hover {
    background-color: #2980b9;
}

/* Mensaje sin resultados */
.botes-mensaje {
    text-align: center;
    padding: 50px 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    color: #666;
}





/* Formulario para publicar botes */
.formulario-publicar-bote {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.formulario-publicar-bote h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #2c3e50;
    text-align: center;
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    box-sizing: border-box;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-row textarea {
    min-height: 150px;
    resize: vertical;
}

.form-row .hint {
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

.form-row .required {
    color: #e74c3c;
}

.form-columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-column {
    padding: 0 10px;
    flex: 0 0 50%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .form-column {
        flex: 0 0 100%;
    }
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.boton-publicar {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.boton-publicar:hover {
    background-color: #2980b9;
}

/* Mensajes de formulario */
.form-mensaje {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-mensaje.exito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-mensaje.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* new code */

/* Estilos mejorados para la página de detalle de bote */
/* Nueva galería de imágenes */
.bote-galeria-container {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bote-galeria-main {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.bote-galeria-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.bote-galeria-main:hover img {
    transform: scale(1.02);
}

.bote-galeria-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 0 0 10px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f8f9fa;
}

.bote-galeria-thumbs::-webkit-scrollbar {
    height: 8px;
}

.bote-galeria-thumbs::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.bote-galeria-thumbs::-webkit-scrollbar-thumb {
    background-color: #3498db;
    border-radius: 20px;
    border: 3px solid #f8f9fa;
}

.bote-galeria-thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    opacity: 0.8;
}

.bote-galeria-thumb:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.bote-galeria-thumb.active {
    border-color: #3498db;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.bote-galeria-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* para los botoens del media form */
/* Estilos para los botones de selección de medios */
.media-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.media-button {
    background-color: #db34b7;
    color: rgb(17, 193, 70);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.media-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.media-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.2);
}

.upload-option, .media-library-option {
    flex: 1;
    min-width: 200px;
}

.upload-option input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #f8fafc;
}

.upload-option input[type="file"]:hover {
    background-color: #f1f5f9;
}

.preview-item {
    position: relative;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 2px solid #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.preview-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.preview-item img {
    display: block;
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
}

.preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-item:hover .remove-image {
    opacity: 1;
}

.preview-item.featured-preview {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Estilos para el formulario de edición de bote */

/* Modal - solo ajustes mínimos */
.contact-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 70%;
    height: 70%;
    background-color: rgba(0,0,0,0.7);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    padding-bottom: 50px;
    padding-left: 30%;
    padding-right: 30%;
    box-sizing: border-box;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
}

.contact-modal[style*="display: block"] {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .contact-modal {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .modal-body {
        padding: 20px;
        padding-top: 15px;
    }
    
    .modal-body h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .close-modal {
        right: 10px;
        top: 10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}





/* Botón de cerrar visible */
.close-modal {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 10001;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.close-modal:hover,
.close-modal:focus {
    color: #333;
    background: rgba(240,240,240,1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    padding-top: 15px;
}

.modal-body h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 24px;
    color: #333;
    text-align: left;
    padding-right: 40px; /* Espacio para el botón de cerrar */
}

/* Ajustar formulario interno */

/* Responsive design para la tabla de boats */
.mis-botes-admin {
    max-width: 100%;
    overflow-x: auto;
}

.tabla-botes {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.tabla-botes th,
.tabla-botes td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
}

.tabla-botes th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .tabla-botes {
        font-size: 14px;
    }
    
    .tabla-botes th,
    .tabla-botes td {
        padding: 8px 4px;
    }
    
    /* Ocultar algunas columnas en pantallas pequeñas */
    .tabla-botes .hide-mobile {
        display: none;
    }
    
    /* Hacer que las acciones sean más compactas */
    .boat-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .boat-actions .btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    /* En pantallas muy pequeñas, cambiar a diseño de cards */
    .tabla-botes thead {
        display: none;
    }
    
    .tabla-botes,
    .tabla-botes tbody,
    .tabla-botes tr,
    .tabla-botes td {
        display: block;
        width: 100%;
    }
    
    .tabla-botes tr {
        border: 1px solid #e1e5e9;
        margin-bottom: 15px;
        border-radius: 8px;
        padding: 15px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .tabla-botes td {
        border: none;
        border-bottom: 1px solid #f1f1f1;
        position: relative;
        padding: 8px 0;
    }
    
    .tabla-botes td:before {
        content: attr(data-label) ": ";
        font-weight: bold;
        color: #495057;
        margin-right: 10px;
    }
    
    /* Imagen del boat en mobile */
    .tabla-botes .boat-image {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .tabla-botes .boat-image img {
        max-width: 100px;
        height: auto;
        border-radius: 5px;
    }
}

/* Header responsive */
.mis-botes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 768px) {
    .mis-botes-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mis-botes-header h2 {
        text-align: center;
        margin-bottom: 0;
    }
    
    .btn-add-boat {
        width: 100%;
        text-align: center;
        padding: 15px;
        font-size: 16px;
    }
}